[Bugfix] Separate target and draft scheduling budgets - #53080
Open
slippersss wants to merge 1 commit into
Open
Conversation
Signed-off-by: Zetong Li <slippersss@126.com>
slippersss
requested review from
ApostaC,
ProExpertProg,
WoosukKwon,
alexm-redhat,
heheda12345,
houseroad,
ivanium,
mgoin,
njhill,
orozery,
robertgshaw2-redhat,
tlrmchlsmth,
yewentao256,
youkaichao and
ywang96
as code owners
August 20, 2026 08:53
Contributor
|
I think it is useful. |
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.
Purpose
This PR aims to fix #52922. The idea is simply to track target and draft token budgets separately, since these two stages may process different numbers of tokens for the same request.
We define draft input cost model for each request as below:
Here,
extend_target_batchindicates whether the draft input batch extends the scheduled target batch andfixed_overheadrepresents the additional per-request draft input size.Take mtp/eagle3/dflash/dspark/peagle/pard as examples:
extend_target_batch=Trueandfixed_overhead=0. At later draft steps, the draft will forward just one token per request, which does not exceed first step batch size.extend_target_batch=Falseandfixed_overhead=num_speculative_tokens+offset.extend_target_batch=Trueandfixed_overhead=num_speculative_tokens+offset.Note that
offsetis -1 or 0 or +1, depending on how each method arranges anchor/bonus and mask tokens. Detailed values have been listed in speculative config.This PR is still a work in progress. Feedbacks and suggestions are welcome.
Test Plan
Test Result
By removing the overly conservative input budget constraint in scheduling, DSpark can reach the concurrency configured by the user, improving output throughput from 2928.34 to 3574.55 tok/s (+22.1%).
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.