Repository navigation
Conversation
The k-pool indexer stores the pooled index keys of index_kpool consecutive 64-token pages in the first page of the group, but the radix tree shared and deduplicated single pages. A request whose prompt diverged from a cached one mid-group was repointed to the other request's group page after its prefill and read that request's pooled keys for up to 255 tokens past the divergence, dropping needles from top-k selection (#41494). Widen the tree page to page_size * index_kpool, place prefill mamba checkpoints on the absolute grid when the tree page is wider than the allocator page, free streaming-session KV on the allocator page, and let the HiCache DSA indexer host pool move one tree page as several device pages.
kpham-sgl
requested review from
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
September 29, 2026 07:19
Collaborator
Author
|
Closing in favor of a redesign of the DSA k-pool index pool: pooled keys addressed by token slot (index slot = loc // 4) with a 256-slot logical page, matching DeepSeek-V4 C4. That fixes #41494 without splitting the radix tree page from the allocator page, and shrinks the index pool to 1/4. |
4 of 5 tasks
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.
Fixes #41494.
The k-pool indexer stores the pooled index keys of pages 4g..4g+3 in page 4g, but the radix tree shared and deduplicated single 64-token pages. After prefill,
cache_unfinished_reqrepointed a request onto another request's group page, so its decode read that prompt's pooled keys for up to 255 tokens past the divergence point, which in RULER is the needle.page_size * index_kpoolfor k-pool models.GLM-5.3-Flash FP8, TP4 H200, RULER-style niah_single_2 16K (n=20): main 12/20, fix 20/20 (Python and Rust tree core, also with HiCache L2). GSM8K 0.935.
CI States
Latest PR Test (Base): ❌ Run #36535978763
Latest PR Test (Extra): ❌ Run #36535978256
Latest PR Test (AMD ROCm 10): ❌ Run #36535978906