Repository navigation
[BugFix][Model Runner V2][Spec Decode] Fix decode instance's multi-layer MTP kv caches during P/D - #55055
Merged
WoosukKwon merged 1 commit intoSep 16, 2026
Conversation
TheEpicDolphin
force-pushed
the
bugfix/mrv2-multi-module-mtp-pd
branch
3 times, most recently
from
September 11, 2026 17:32
5ee6a77 to
b84a1b3
Compare
TheEpicDolphin
marked this pull request as ready for review
September 11, 2026 17:51
TheEpicDolphin
requested review from
ApostaC,
NickLucche,
ProExpertProg,
WoosukKwon,
alexm-redhat,
heheda12345,
houseroad,
ivanium,
mgoin,
njhill,
orozery,
robertgshaw2-redhat,
tlrmchlsmth,
yewentao256,
youkaichao and
ywang96
as code owners
September 11, 2026 17:51
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #88418 for commit |
…yer MTP kv caches during P/D Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
TheEpicDolphin
force-pushed
the
bugfix/mrv2-multi-module-mtp-pd
branch
from
September 12, 2026 06:23
b84a1b3 to
0beece0
Compare
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #88486 for commit |
WoosukKwon
approved these changes
Sep 16, 2026
MK-BK
pushed a commit
to MK-BK/vllm
that referenced
this pull request
Sep 23, 2026
…yer MTP kv caches during P/D (vllm-project#55055) Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
4 tasks done
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.
Context
During multi-module MTP with P/D, the prefill instance runs prefill on the full prompt and the last N MTP layers each generate a draft token. This is problematic on the last prefill chunk, because MTP layer i will embed its draft token into MTP layer i + 1. Those draft tokens are unverified, and remain in the KV cache for those last N-1 MTP layers. See the visualization below:

During standalone serving, the next decode step would receive the number of rejections, and would re-prefill those stale cache slots accordingly. During P/D, the decode instance doesn't receive this information, and thus the unverified draft tokens remain in the KV cache, hurting acceptance rates.
This PR
Generalizes the 1-token backoff used by Mamba to skip prefilling the last token on the prefill instance, and recompute that token on the decode instance, for multi-module MTP. Now, the prefill instance no longer pollutes the last N-1 MTP modules with unverified draft tokens, and the decode instance completes prefill for the last N-1 prompt tokens.
I created a helper method in
VllmConfigcallednum_prefill_lookahead_tokensthat is used to get the number of MTP modules, and use them for this prefill backoff. It is now called by several other callsites to reduce code duplication.Benchmarks
Inkling-Small-NVFP4, 1P1D on one 4×GB200 node (prefill GPUs 0,1 / decode GPUs 2,3, TP=2 each),
{"method":"mtp","num_speculative_tokens":8}, SPEED-Benchthroughput_16k/low_entropy,2048 in / 2048 out, concurrency 64, 512 prompts. Acceptance read from the decode instance's
/metrics.ae71862c51)5ee6a77da2)Both arms completed 512/512 requests with 0 failures on identical input (1,048,576 tokens).
Output token counts differ by 2.3%. An acceptance length of 1.089 means ~99% of drafts were
rejected. Speculative decoding was effectively inert under P/D before the fix.