Repository navigation
[Spec Decode] Remove eager metadata rebuild during MTP fused multi-step decode - #58463
Conversation
cfb93de to
e230f58
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #90794 for commit |
|
/ci retry |
|
✅ Queued 2 failed job(s) for retry in Buildkite CI #90794. |
6674644 to
e0eaf5a
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #90856 for commit |
|
This pull request has merge conflicts that must be resolved before it can be |
CI selector (shadow): 51 test steps (93 jobs) instead of 88 (115 jobs)Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works. Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.
Selector would run (51)
Would skip (today's rules run them) (57)
Would add (today's rules do not run them) (20)
AMD mirrors: would skip (54)
AMD mirrors: would add (10)
8 changed files · base |
…ep decode Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
e0eaf5a to
89bb941
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #92970 for commit |
781af0b to
afea33b
Compare
9165493 to
1878566
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #93021 for commit |
Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
441a240 to
e95249a
Compare
|
/ci run --allow-stale |
…ep decode (vllm-project#58463) Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>

Context
#46849 added the infrastructure to fuse last N-1 draft steps into a single cudagraph for models with attention backends that support it. Currently DeepSeek V4 satisfies the conditions to enable this, when using MTP > 1.
This PR
It turns out we can remove the first attention metadata build before drafting the last N-1 speculative tokens in a fused loop. In this PR, I make the necessary changes to
DeepseekSparseSWAMetadataBuilder.update_draft_decode_metadataand refactorAutoRegressiveSpeculatorso that the first draft metadata build can be safely skipped during FULL cudagraph replay.With these changes, DSV4 + MTP no longer rebuilds metadata during proposal, resulting in a correctness-preserving removal of about 1ms of host work per decode step. No significant throughput improvement was observed from these changes.
Profile
Captured while serving DeepSeek-V4-Flash + MTP=3 on 4xGB200:


Before
After
In the decode step above,
propose's CPU time shrinks by an entire millisecond.Benchmarks / Evals
Setup. DeepSeek-V4-Flash, MTP with
num_speculative_tokens=3, 4x GB200 (TP4),--block-size 256 --kv-cache-dtype fp8 --moe-backend deep_gemm --no-enable-prefix-caching,VLLM_USE_V2_MODEL_RUNNER=1. Baseline ismainat34b069080d; PR iscfb93dedca. One server per arm; trace, benchmark and eval share it.Speed-Bench 2K/2K (
throughput_16k,low_entropy, temperature 0)Prompts scaled 8x concurrency (min 16), seed 0. Greedy decoding keeps acceptance deterministic, so ITL p50 is the step-time metric.
Step time is unchanged at every concurrency. The ~1 ms of host work removed per step is not on the critical path for this model at TP4; throughput deltas track the small acceptance-length differences and are within noise.
AIME25 (MQA, 2 epochs x 30 problems, thinking on, temperature 1.0, top-p 0.95, max 98304 tokens, 64 concurrent)
Mean accuracy identical. pass@2 differs by one problem in 30, which is expected sampling variance at temperature 1.