Skip to content

fix(spec-decode): separate DFlash target and query input budgets - #605

Merged
lukealonso merged 2 commits into
local-inference-lab:dev/jovian-judgementfrom
voipmonitor:fix/dflash-input-budget-pr-20260903
Sep 4, 2026
Merged

fix(spec-decode): separate DFlash target and query input budgets#605
lukealonso merged 2 commits into
local-inference-lab:dev/jovian-judgementfrom
voipmonitor:fix/dflash-input-budget-pr-20260903

Conversation

@voipmonitor

Copy link
Copy Markdown

Purpose

DFlash executes its target forward and its K + 1 parallel-query forward
sequentially in the same model-runner input buffer. The scheduler previously
reserved both peaks additively, so DFlash K7 reduced an 8,192-token target
prefill step even though the query forward used the buffer only after target
execution completed.

This change tracks a separate parallel-draft input budget. Target scheduling
can use the full configured token budget, while request admission remains
bounded so all DFlash query rows fit. DSpark retains the same independent-budget
contract with K query rows per request.

Attribution and duplicate analysis

The first commit is the unmodified logical change from
vllm-project#52996 and retains guptaishaan as author. The second commit
extends that accounting to DFlash and retains Martin Vit as author.

vllm-project#52996 covers DSpark but not DFlash. vllm-project#41971
allocates DFlash lookahead KV slots during first prefill; it does not separate
model-runner input-buffer peaks. #519 and #520 change
DFlash cache geometry, not scheduler input accounting. Searches of both the
upstream and local repositories found no open DFlash input-budget PR.

Correctness contract

  • Ordinary speculative methods retain the additive per-request reservation.
  • DSpark uses K rows from its separate query budget.
  • DFlash uses K + 1 rows from its separate query budget.
  • Preemption restores both target and parallel-query budgets.
  • The final scheduler assertions require both budgets to remain nonnegative.

Validation

Directly on this two-commit pull-request head:

pytest -q tests/v1/core/test_scheduler.py \
  -k "draft_slots_budgeted or dspark_uses_separate or dflash_uses_separate"
5 passed

The complete scheduler file produced 154 passed, 1 failed. The single failure
is test_abort_request_when_structured_output_fsm_cannot_advance, which fails
identically on the unmodified dev/jovian-judgement base because its manually
constructed Scheduler lacks acceptance_length_controller; it is unrelated
to input-budget accounting. The composed GLM integration tree, whose fixture
already initializes that field, passed all 165 scheduler tests.

TP4/DCP1 GLM-5.3-Flash DFlash2 K7 serving on four stock-clock RTX PRO 6000
Blackwell Workstation Edition GPUs completed a cold 32k prefill at 15,019
prompt tok/s. The run used 2,048-token target/recurrent pages, an 8,192-token
scheduler budget, B12X attention/MoE/linear backends, 16 NCCL channels, and a
2 MiB NCCL buffer.

AI assistance was used to inspect execution contracts, prepare the DFlash
extension, run tests, and draft this description. The submitter reviewed the
changed files and validation results.

guptaishaan and others added 2 commits September 3, 2026 04:37
Track DSpark target inputs and fixed draft-query inputs with separate
scheduler budgets. This lets each execution stage use the configured batch
capacity while retaining an independent limit for the draft stage.

Add scheduler coverage for both target-stage and draft-stage saturation.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
DFlash executes its target forward and K+1 parallel-query forward sequentially in the same model-runner input buffer. Account for the two peaks independently so draft queries do not reduce target prefill capacity, while still limiting the number of scheduled requests to the query-buffer capacity.

The full core scheduler suite passes 165 tests. The preceding DSpark budget commit retains guptaishaan as its author.

Signed-off-by: Martin Vit <martin@voipmonitor.org>
@voipmonitor

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: de97b3ee-69d4-4503-9cef-76fcafae0593

📥 Commits

Reviewing files that changed from the base of the PR and between ba233a6 and 860b106.

📒 Files selected for processing (2)
  • tests/v1/core/test_scheduler.py
  • vllm/v1/core/sched/scheduler.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@voipmonitor

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@voipmonitor

Copy link
Copy Markdown
Author

Independent integration qualification

Status: qualified at the PR head embedded in
voipmonitor/vllm:jovian-judgement-community-20260903-r20.

Five focused scheduler cases passed for ordinary speculative reservation,
DSpark's separate K-row budget, DFlash's separate K + 1-row budget, budget
restoration after preemption, and nonnegative final accounting. The composed
scheduler fixture passed all 165 scheduler tests.

The R20 serving gate used four stock-clock RTX PRO 6000 Blackwell Workstation
Edition GPUs, TP4, a 4,096-token target scheduler budget, FP8 target KV cache,
16 NCCL channels, and a 2 MiB NCCL buffer. DFlash2 K7 retained the complete
target budget and measured:

DCP 32K prefill C1 target steps/s C8 target steps/s
1 14,691 prompt tok/s 89.46 291.12
4 13,028 prompt tok/s 81.12 263.11

All cells completed without API errors or queued requests. This validates
sequential reuse of the model-runner input buffer: target scheduling and the
parallel DFlash query forward retain independent peak budgets rather than an
additive reservation.

@lukealonso
lukealonso merged commit 0f54f47 into local-inference-lab:dev/jovian-judgement Sep 4, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants