Repository navigation
[Experimental] Preserve speculative decoding during prefill across DP ranks - #40118
Conversation
| speculative_moe_a2a_backend_context(), | ||
| spec_stage_span("draft"), | ||
| ): | ||
| verify_input = self.draft_worker.draft(draft_batch) |
There was a problem hiding this comment.
[bug] The pure-decode prologue is not used on a heterogeneous step. speculative_num_steps == 0 normally builds a 1-node verify input and can skip draft-extend under SGLANG_SPEC_SKIP_ZERO_STEP_DRAFT_EXTEND (adaptive spec reaches 0 steps). This path always calls draft(). On a non-idle rank draft_forward's loop is range(0) and then indexes token_list[0]; the prefill rank's idle draft returns Nones and builds an idle verify input, so the ranks do not even fail together. The same call also drops pp_proxy_tensors (the prefill branch forwards them) and never runs the PP tail-draft that the pure-decode branch runs after verify.
Suggestion: Share the decode prologue: activate_step_by_batch, the steps==0 trivial verify and draft-extend skip, and pass pp_proxy_tensors into verify. Run the PP tail-draft for non-prefill ranks when pp_size > 1.
There was a problem hiding this comment.
Still open on faa4f78. This commit does not consult speculative_num_steps before this draft() call, and verify() just below still omits pp_proxy_tensors. The steps==0 prologue remains only on the pure-decode arm of forward_batch_generation.
|
/rerun-test test/registered/spec/eagle/test_dp_spec_prefill_coordination.py test/registered/unit/spec/test_dp_spec_prefill_coordination.py test/registered/unit/model_executor/test_mlp_sync_pad_unpad.py |
|
Results for 🚀 🚀 |
ch-wan
left a comment
There was a problem hiding this comment.
Reviewed by agent.
This commit closes the startup algorithm gate, the EAGLE3 reject, the MAX_LEN extend rewrite, the dataclass, and the test-base gaps. With the flag left off, scheduling and the forward path still match the previous behavior.
The heterogeneous path still always calls draft(), so speculative_num_steps == 0 misses the trivial-verify prologue and verify() still drops pp_proxy_tensors. That existing thread is unchanged.
Issue counts by severity
- bugs: 1
- suggestions: 0
- nits: 0
Motivation
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 #35924758446
Latest PR Test (Extra): ❌ Run #35924758238
Latest PR Test (AMD ROCm 10): ❌ Run #35924758471