Repository navigation
[Feat] kimi-k3.1: HiCache under decode context parallelism - #48877
Merged
Merged
Conversation
Copy the Kimi-K3.1 DCP hunks of the Day-0 branch for PD disaggregation (Mooncake moves the token-sharded DSA index-K with the KV rows; decode pages index-K like the prefill) and for HiCache (the DSA indexer host pool translates widened slots like the MLA anchor, on L2 and L3) onto the DCP runtime port as they are. Follow-up commits adapt them to main. Co-authored-by: Khoa Pham <[email protected]> Co-authored-by: Shuwen Wang <[email protected]>
- disaggregation/utils: main registers PD state from the storage's wire entries; record the index-K token bytes from the DSA entry's view. - DSAIndexerPoolHost takes dcp_size / dcp_rank as constructor arguments (main builds it from buffer info, not an anchor host); the assembler passes the MLA host's only when index-K is sharded by token, so replicated index-K under DCP keeps its current slot space.
The DCP-collapsed MLA draft pool comes with the speculative-decoding DCP port; until then HiCache L3 under DCP accepts only the MLA anchor, KDA state and Kimi-K3.1's sharded index-K.
kpham-sgl
requested review from
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
stmatengss,
xiezhq-hermann and
yizhang2077
as code owners
November 6, 2026 09:39
This was referenced Nov 6, 2026
Collaborator
Author
|
/rerun-test test/registered/unit/mem_cache/test_hicache_dcp_host_pool.py test/registered/unit/mem_cache/test_mem_pool_host.py test/registered/unit/mem_cache/test_dsa_pool_host_unit.py test/registered/unit/mem_cache/test_hybrid_pool_assembler.py test/registered/unit/managers/test_scheduler_hicache_attach.py test/registered/unit/mem_cache/test_hicache_storage_registration_hook.py |
Contributor
|
🚀 🚀 |
EricKing626
added a commit
to EricKing626/sglang
that referenced
this pull request
Nov 8, 2026
sgl-project#48877 gave DSAIndexerPoolHost a dcp_size/dcp_rank of its own for the Kimi-K3.1 layout, where the index-K is sharded across the group. The host mirror only spans every rank's slots when that index-K is replicated, so the widened page count now asks the same question the two new arguments below it do, and the sharded layout keeps main's per-rank count.
5 tasks done
11 of 13 tasks
5 tasks done
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.
Original authors: @yhyang201, @kpham-sgl, @alphabetc1
Split from #48741, which now carries only PD.
Port of #48414
Kimi-K3.1 shards the DSA index-K cache by token under DCP (#48721), so HiCache has to store index-K the way it already handles the sharded MLA KV. This PR ports that path from the Kimi-K3.1 Day-0 branch (#48414) and lifts #48721's DCP rejection of HiCache.
dcp_size/dcp_rankand pages by the widened logical page._storage_page_index(moved from the MLA host to the base class), and storage backends key pages byl3_page_span.check_dcp_l3_extra_pooladmits the sharded indexer next to the MLA anchor and KDA state.Against the raw port (first commit):
DSAIndexerPoolHosttakesdcp_size/dcp_rankas constructor arguments, not from an anchor host. The assembler passes them only when index-K is sharded by token, so replicated index-K under DCP (other DSA models) keeps its current slot space.API changes for the source's callers:
MLATokenToKVPoolHost._storage_page_indexmoves toHostKVCache, andDSAIndexerPoolHost.__init__gainsdcp_size/dcp_rank.Left for later ports: the DFLASH draft in the HiCache L3 check; prefill CP / L3 deduplication stays with #48715; the direct external linker under DCP.
Modifications
mem_cache/pool_host/{base,dsa,mla}.py,mem_cache/hybrid_cache/hybrid_pool_assembler.py: DCP translation for the indexer host pool.managers/cache_controller.py,mem_cache/hybrid_cache/hybrid_cache_controller.py,mem_cache/hicache_storage.py,mem_cache/storage/mooncake_store/mooncake_store.py: L3 under DCP with the sharded indexer.arg_groups/model_overrides/kimi_k3.py: Kimi-K3.1 DCP allows HiCache. This gate edit overlaps [Feat] kimi-k3.1: PD disaggregation under decode context parallelism #48741's; whichever merges second takes both.Tests
ruff formatandruff check --select Fon the touched files.CI States
Latest PR Test (Base): ❌ Run #42339654945
Latest PR Test (Extra): ❌ Run #42339654848
Latest PR Test (AMD ROCm 10): ❌ Run #42339655023
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: