Repository navigation
[Feat] KVShard: Support kv cache sharding for MTP - #40929
Merged
Merged
Conversation
Shunkangz
requested review from
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
September 23, 2026 14:55
Contributor
Author
|
/tag-and-rerun-ci |
Shunkangz
force-pushed
the
mtp_kvshard
branch
from
September 28, 2026 07:26
582f69d to
8121f9f
Compare
Shunkangz
force-pushed
the
mtp_kvshard
branch
2 times, most recently
from
September 29, 2026 06:55
a259236 to
156b0db
Compare
Contributor
Author
|
/rerun-failed-ci |
1 similar comment
Contributor
Author
|
/rerun-failed-ci |
This was referenced Oct 7, 2026
The main merge brought in sgl-project#35594, which threads the resolved MLA pool class into _build_mla_kv_pool. Expect that kwarg in the fallback-path test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Main sgl-project#43503 dropped the always-skipped 2-GPU section from the CPU-registered test_page_interleave_shard.py. Move it, including the MTP gather tests, into test_page_interleave_gather_multi_gpu.py registered on 2-gpu-large so it runs in CI. kv_cache_configurator.py: union of both sides' page_interleave imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
/rerun-failed-ci |
Preserve MTP shared-pool imports alongside upstream DSA indexer sharding. Keep CPU, two-GPU MTP, and four-GPU DSA tests in their registered suites.
Contributor
Author
|
/rerun-failed-ci |
This comment has been minimized.
This comment has been minimized.
5 of 6 tasks
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Preserve upstream shard footprint and P/D send-filter tests while keeping MTP coverage and the split multi-GPU suites.
hzh0425
reviewed
Oct 21, 2026
Keep upstream page-interleave test pruning while preserving the MTP scratch-budget regression test.
Preserve the dedicated MLA/MHA/MTP gather suite while keeping upstream's expanded DSA tests. Remove the superseded indexer test copy and update the CPU shard suite's coverage references.
Collaborator
Collaborator
|
/rerun-test test/registered/unit/mem_cache/test_page_interleave_gather_multi_gpu.py test/registered/unit/mem_cache/test_page_interleave_shard.py test/registered/unit/managers/test_prefill_adder.py |
Contributor
|
🚀 🚀 |
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.

Motivation
This PR adds pool-level MTP KV-cache sharding support for dense MLA and MHA models. The draft reuses the target’s allocator and shard layout while maintaining separate KV storage and scratch buffers. MTP-specific compatibility checks currently run during pool construction; we will move them into argument validation when those checks are added.
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #39891565092
Latest PR Test (Extra): 🚫 Run #39891565015
Latest PR Test (AMD ROCm 10): ⏳ Run #39891565052