[None][feat] add commit-min snapshots and per-conversation KV reuse - #15916
Closed
jiaganc wants to merge 5 commits into
Closed
[None][feat] add commit-min snapshots and per-conversation KV reuse#15916jiaganc wants to merge 5 commits into
jiaganc wants to merge 5 commits into
Conversation
jiaganc
force-pushed
the
codex/integrate-commit-min-snapshot
branch
4 times, most recently
from
July 8, 2026 07:55
9217adf to
b9fdcf0
Compare
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
jiaganc
force-pushed
the
codex/integrate-commit-min-snapshot
branch
from
July 8, 2026 09:48
24ddbd7 to
fa46198
Compare
Collaborator
|
We no longer use the ds v4 side branch. Closing this PR. Please prepare PR against main. |
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.
@coderabbitai summary
Description
Integrates
commit_min_snapshotsupport from #15752 and per-conversation KV cache block reuse from #16115 into the DeepSeek-V4 feature branch.The runtime now supports minimum snapshots for SSM reuse, including partial final-page commits. It also exposes
CommittedBlockRecord, which keeps selected committed SWA-window pages reusable until the record is released. Full-attention and attention-sink pages remain managed by the existing global reuse policy; recording SSM state for a conversation remains a TODO.The PyTorch KV cache manager V2 now:
commit_min_snapshotwhen block reuse is enabled and the policy is notall_reusable;all_reusable,per_request, andper_conversationpolicies;per_requestandper_conversationcommits until the final context chunk while allowing a partial final commit;per_requestbehavior when conversation parameters are absent.The executor also documents a follow-up optimization: a disaggregated prefill server can pass
is_end=Truefor the final context chunk to avoid unnecessary final-page copies.Test Coverage
tests/unittest/kv_cache_manager_v2_tests/test_kv_cache_manager_v2.py.tests/unittest/_torch/executor/test_kv_cache_manager_v2.py.KvCacheConfigvalidation coverage forper_conversation.git diff --check, and all relevant pre-commit hooks passed locally.pytestmodule.PR Checklist
Please review the following before submitting this PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions).
Any new dependencies have been scanned for license and vulnerabilities.
CODEOWNERS updated if ownership changes.
Documentation updated as needed.
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.