core: Kimi-K3 decode/prefill scaffolding (distributed weight store, DeepEP-LL exchange, resident MoE) - #316
Merged
Merged
Conversation
…eepEP-LL exchange, resident MoE, --enable-deepep) Core-only slice of the K3 support branch (PR_MERGE_POLICY: scaffolding layer): - core/ C++: Weights_Storage + distributed_weight_daemon (compact per-node host store), HtoD_Engine, GPU_Weight_Buffer, KV_Storage host-paged views, batchgen binding. - batchgen/moe/: deepep_ll.py (DeepEP low-latency EP exchange), marlin_grouped_moe, streamed_sp8_mxfp4, k3_prefill_dequant_once, fused_moe_mxfp4_resident, routing/cuda_routing. - worker/ (decode/prefill/kv_manager/boundary), server/ (server_args --enable-deepep, worker_manager, worker_readiness, batch_scheduler), kv_cache/, continuous_batching, batchgen_worker. - triage: planner/base_planner, sequence, server_worker_main_loop, config, decode_dp_group, kernel_compat, op_builder/core_engine, ckpt_converter, install_deps, docs/troubleshooting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Core scaffolding to serve Kimi-K3 (2.8T, 93 layers, 896 MXFP4 experts, top-16) on 2×8 H200 — the runtime/serving layer only:
core/Weights_Storage/**)batchgen/moe/deepep_ll.py)--enable-deepep(boolean: default off = NCCL, on = require DeepEP or fail fast) and--distributed-weight-configModel + kernels are the companion PR #317, stacked on this.
Motivation
Kimi-K3 needs runtime/serving changes a
modelPR may not touch (PR_MERGE_POLICY §2.5). Splitting the scaffolding into thiscorePR keeps the model PR inside its allowlist and lets the two layers review independently.Type of Change
model— add/extend model support (models/**+ registration seam + model kernels only)kernel— add/optimize a compute kernel (batchgen_kernels/**+ in-tree kernel dirs)core— change scheduling/serving/runtime scaffolding (the only type that may)fix— narrow bug fix (+ a regression test)infra— build / CI / packaging / scripts / Dockerdocs— documentation onlyFile changes
batchgen/batchgen_worker.pybatchgen/ckpt_converter/ckpt_converter.pybatchgen/config/config.pybatchgen/continuous_batching.pybatchgen/decode_dp_group.pybatchgen/kernel_compat.pybatchgen/kv_cache/gpu_paged_kv_manager.pybatchgen/kv_cache/host_kv_mananger_config.pybatchgen/moe/deepep_ll.pybatchgen/moe/dispatch_scatter_3d.pybatchgen/moe/fused_moe_bf16_resident.pybatchgen/moe/fused_moe_mxfp4_resident.pybatchgen/moe/fused_wgmma_expert.pybatchgen/moe/fused_wgmma_grouped.pybatchgen/moe/grouped_fp8_blockwise_moe.pybatchgen/moe/k3_prefill_dequant_once.pybatchgen/moe/marlin_grouped_moe.pybatchgen/moe/marlin_weight_prep.pybatchgen/moe/mxfp4_grouped_gemm.pybatchgen/moe/mxfp4_oracle_vector.pybatchgen/moe/routing/cuda_routing.pybatchgen/moe/streamed_sp8_mxfp4.pybatchgen/other_kernels/hadamard_transform/__init__.pybatchgen/planner/base_planner.pybatchgen/sequence.pybatchgen/server/batch_scheduler.pybatchgen/server/server_args.pybatchgen/server/worker_manager.pybatchgen/server/worker_readiness.pybatchgen/server_worker_main_loop.pybatchgen/worker/boundary.pybatchgen/worker/decode.pybatchgen/worker/kv_manager.pybatchgen/worker/prefill.pycore/GPU_Weight_Buffer/GPU_Weight_Buffer.cppcore/GPU_Weight_Buffer/GPU_Weight_Buffer.hcore/HtoD_Engine/HtoD_Engine.cucore/HtoD_Engine/HtoD_Engine.hcore/KV_Storage/compressed_state_host_manager.hcore/KV_Storage/host_paged_kv_worker_view.hcore/Parameter_Server/posix_shm.cppcore/Weights_Storage/Weights_Storage.cppcore/Weights_Storage/Weights_Storage.hcore/Weights_Storage/distributed_weight_daemon.cppcore/Weights_Storage/distributed_weight_daemon.hcore/Weights_Storage/distributed_weights_protocol.hcore/batchgen.cppcore/batchgen.hcore/batchgen_Binding.cppcore/numa_compat.hdocs/troubleshooting.mdop_builder/core_engine.pyscripts/install_deps.shChecklist