Repository navigation
Conversation
Sy0307
marked this pull request as ready for review
September 14, 2026 09:16
Sy0307
requested review from
ApostaC,
WoosukKwon,
alexm-redhat,
heheda12345,
ivanium,
njhill,
orozery,
robertgshaw2-redhat and
ywang96
as code owners
September 14, 2026 09:16
Signed-off-by: Sy03 <1370724210@qq.com>
Sy0307
force-pushed
the
fix-kda-intermediate-checkpoint-retention-clean
branch
from
September 14, 2026 09:18
798039c to
105db25
Compare
Sy0307
marked this pull request as draft
September 14, 2026 09:19
Sy0307
marked this pull request as ready for review
September 14, 2026 09:21
β¦ tests - Make retention_interval a required parameter of _cache_partial_tail_block so future callers cannot silently fall back to dense behavior. - Evict via block_pool._maybe_evict_cached_block directly instead of the connector-facing evict_blocks API. - Add regression tests pinning that a mid-prompt internal checkpoint stays out of the prefix cache under latest-only retention while the prompt-end checkpoint is still published, and that a stale boundary hash on the checkpoint slot is evicted rather than left pointing at overwritten state. Co-authored-by: Kimi Code <noreply@moonshot.ai> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Co-authored-by: Kimi Code <noreply@moonshot.ai> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Member
|
I directly pushed some changes:
|
ZJY0516
approved these changes
Sep 14, 2026
Member
|
/ci run |
ZJY0516
enabled auto-merge (squash)
September 14, 2026 12:30
|
β
Triggered Buildkite CI #88813 for commit |
Signed-off-by: Sy03 <1370724210@qq.com>
auto-merge was automatically disabled
September 14, 2026 20:14
Head branch was pushed to by a user without write access
Contributor
Author
|
Follow-up: updated the existing Mamba checkpoint regression test to pass the newly required |
Contributor
Author
|
/ci run |
|
β
Triggered Buildkite CI #88907 for commit |
Contributor
Author
|
CI have passed. Can you merge it? Thx. @ZJY0516 |
keneoneth
pushed a commit
to keneoneth/vllm
that referenced
this pull request
Sep 16, 2026
β¦tion (vllm-project#56794) Signed-off-by: Sy03 <1370724210@qq.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: Kimi Code <noreply@moonshot.ai>
3 of 4 tasks
6 tasks done
This was referenced Sep 28, 2026
Closed
michael-gpu
pushed a commit
to practical-inference/vllm-ampere-extended
that referenced
this pull request
Oct 20, 2026
β¦tion (vllm-project#56794) Signed-off-by: Sy03 <1370724210@qq.com> Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: Kimi Code <noreply@moonshot.ai>
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.
Summary
Keep transient KDA/Mamba prefill checkpoints out of the ordinary prefix-cache eviction set when sparse retention is explicitly active.
This change targets Kimi-K3's hybrid attention path.
Problem
FlashKDA creates internal checkpoints so the current prefill can continue from a recurrent-state boundary without an additional scheduling step. A checkpoint in the middle of a prompt is useful to the current request, but it is not necessarily a reusable shared-prefix boundary.
Before this change, such a checkpoint could be re-keyed and registered as a normal prefix-cache block. It then participated in the same GPU LRU eviction pool as reusable hot prefixes:
Before/after cache lifecycle:
This is particularly problematic when
prefix_cache_retention_interval == 0: intermediate checkpoints are not intended to be retained as dense semantic checkpoints, but their temporary hash could still make them eviction candidates.Fix
Pass the active retention interval into checkpoint publication. When sparse retention is active and the checkpoint is neither at the end of the prompt nor at the shared-prefix boundary, treat it as request-local state:
Prompt-end and shared-prefix-boundary checkpoints retain the existing publication behavior. This change does not disable KDA checkpoint computation or change the state written by FlashKDA.
Performance
On a representative B200 Kimi-K3 hybrid workload using TP8/PP2/direct DCP8, the isolated production-style comparison was:
The fixed configuration improved throughput by 7.78% over the checkpoint-disabled diagnostic baseline while retaining the internal checkpoint feature. A separate run with the GEMM-AR option disabled measured 1108.89 tokens/s; that result is included only as context and is not an isolated measurement of this patch.
These measurements are workload-specific and are not used as a claim that this small cache-lifecycle change explains every difference between software stacks. The primary regression signal is the cache-manager reproduction: temporary checkpoint publication changes which blocks compete in the local prefix-cache eviction pool.
Why this is not a duplicate
Validation
Focused prefix-cache tests should be run with:
The change is intentionally small and preserves the current-request checkpoint path. Model-scale performance validation is still required on a representative hybrid KDA workload.
This change was prepared with AI assistance; the author should review the complete diff and test results before merging.