[None][fix] Share Eagle3 draft KV layers in aggregated serving, not only under attention DP - #17548
Draft
zheyuf wants to merge 1 commit into
Draft
[None][fix] Share Eagle3 draft KV layers in aggregated serving, not only under attention DP#17548zheyuf wants to merge 1 commit into
zheyuf wants to merge 1 commit into
Conversation
…nly under attention DP One-model speculative decoding puts the drafter's KV either in the target manager's blocks (shared) or in a separate draft manager. The choice was gated on attention DP, which reflected the layout existing deployments had been validated with rather than a technical requirement -- so aggregated serving with attention DP off took the separate manager for every model. That path silently costs acceptance whenever prefix reuse fires. When the target reuses a prefix it does not recompute those tokens, so the drafter never gets a chance to compute its own KV for them either; it enters generation blind over the reused span and its drafts are rejected until it regrows the state. Measured with a controlled warm/cold probe (32 x 1684-token prompts sent twice in one process; round 2 hits the prefix cache, so the two rounds differ only in where the drafter's prefix KV comes from): arm cold warm delta separate manager, 4 KV heads 3.458 3.195 -0.263 separate manager, 64 KV heads 3.555 3.282 -0.273 shared layers, 4 KV heads 3.553 3.617 +0.064 shared layers, 64 KV heads 3.603 3.596 -0.007 reuse disabled (control) -- -- +-0.02 The loss is the same for both Eagle3 head geometries, so it is a property of the separate-manager path, not of a particular drafter; sharing removes it. The control rules out a systematic round-2 effect. A manager can still opt out through supports_shared_draft_layers, which is how MiniMax-M3 keeps the separate manager for its coalesced index-K pool. Signed-off-by: Zheyu Fu <zheyuf@nvidia.com>
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.
Description
One-model speculative decoding places the drafter's KV either in the target
manager's blocks (shared) or in a separate draft KV cache manager.
Today that choice is gated on attention DP:
The gate reflects the layout existing deployments were validated with, not a
technical requirement. The consequence is that aggregated serving with
attention DP off takes the separate manager for every model using
Eagle3-one-model / MTP one-model.
Why that costs acceptance
When the target reuses a prefix it does not recompute those tokens. The
drafter therefore never gets a chance to compute its own KV for them either,
and it enters generation blind over the reused span — its drafts are rejected
until it regrows the state. Sharing the layers removes the failure mode
structurally: one set of blocks, one lifetime, one reuse decision.
Measurement
Controlled warm/cold probe: 32 x 1684-token prompts sent twice in the same
process. Round 2 hits the prefix cache, so the two rounds have identical
prompts and identical work and differ only in where the drafter's prefix KV
comes from. MiniMax-M3 NVFP4 target, TP4/EP4, Eagle3 draft_len 3, greedy.
Two Eagle3 heads that differ only in
num_key_value_heads(64 vs 4) lose thesame ~7.5%, so this is a property of the separate-manager path rather than of
a particular drafter. The reuse-disabled control rules out a systematic
round-2 effect.
Scope
supports_shared_draft_layers;MiniMax-M3 uses that to keep the separate manager for its coalesced
index-K pool.
this only changes the aggregated non-DP path.
introduced; this widens which configurations reach it.
Draft — what still needs doing before this leaves draft
that aggregated non-DP acceptance improves and nothing regresses.
instead of their own budget split; check
_split_kv_cache_budget_for_draftis not left double-counting for the shared path.
back silently.
PR Checklist
[JIRA/NVBUG/None][type]format/bot run)