[Kimi K3][Pref] Reuse internal checkpoint blocks for partial prefix caching - #52971
Closed
ZeldaHuang wants to merge 2 commits into
Closed
ZeldaHuang wants to merge 2 commits into
ZeldaHuang wants to merge 2 commits into
Conversation
ZeldaHuang
requested review from
AndreasKaratzas,
ApostaC,
DarkLight1337,
Harry-Chen,
LucasWilkinson,
ProExpertProg,
WoosukKwon,
alexm-redhat,
heheda12345,
houseroad,
ivanium,
mgoin,
njhill,
orozery,
robertgshaw2-redhat,
tdoublep,
tlrmchlsmth,
tomeras91,
yewentao256,
youkaichao,
ywang96 and
zhuohan123
as code owners
August 19, 2026 17:02
ZeldaHuang
marked this pull request as draft
August 19, 2026 17:02
yewentao256
requested changes
Aug 20, 2026
| flashkda | ||
| GIT_REPOSITORY https://github.com/vllm-project/FlashKDA.git | ||
| GIT_TAG 053de1b716ef3255873e02d2d28f4adf09951978 | ||
| GIT_TAG f23a5b0e845b0b6ee22a187e477e676fbf031447 |
Member
There was a problem hiding this comment.
We should only use main branch when it is fully tested and reviewed, please hold until vllm-project/FlashKDA#7 landed
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Ziming Huang <zelda.huanghuang@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Ziming Huang <zelda.huanghuang@gmail.com>
ZeldaHuang
force-pushed
the
k3-checkpoint-mode
branch
from
August 22, 2026 15:25
e12cbc5 to
2f3efe9
Compare
ZeldaHuang
changed the base branch from
main
to
wentao-mamba-kda-one-forward-only
August 22, 2026 15:25
Member
|
I think previous PR doesn't support spec yet, @ZeldaHuang @ZJY0516 shall we open a new PR for this? |
Member
We will do it |
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.
Purpose
This PR is stacked on #52789 and extends its Kimi-K3 prefill checkpoint path to fine-grained partial prefix caching.
Main changes:
req_to_blocksallocation, prefix hash, eviction, and free lifecycle.This is not a duplicate of #52789: that PR provides the internal full-block checkpoint infrastructure; this stacked PR makes the same block lifecycle work for partial prefix boundaries and removes the remaining separate causal-conv checkpoint reconstruction.
Speculative decoding remains governed by #52789. The checkpoint fast path is not enabled with EAGLE in this PR.
Usage
No environment variable is required. The optimization is selected automatically when Kimi-K3 uses FlashKDA, prefix caching, and aligned Mamba cache mode.
The required FlashKDA checkpoint support was merged in FlashKDA#7.
Performance
Setup:
Correctness and tests
Three consecutive full OCRBench runs with checkpoint mode and partial128:
Local regression after rebasing:
CUDA-only causal-conv and KDA metadata tests are included for CI/GPU validation.
AI assistance was used to rebase the branch, implement the lifecycle refactor, and add tests. The human submitter must review and validate the final change.