dspark: scope scheduler no-draft pause defaults by backend - #776
Open
vincenzopalazzo wants to merge 1 commit into
Open
dspark: scope scheduler no-draft pause defaults by backend#776vincenzopalazzo wants to merge 1 commit into
vincenzopalazzo wants to merge 1 commit into
Conversation
The scheduler pauses proposing for 3/4/7 cycles after a declined proposal. Those lengths were tuned for Metal propose economics; on CUDA (GB10, memory-bound decode at ~55-60 ms/token vs ~20 ms propose) the pauses never win and cost up to 8% generation speed on edit and refactor style prompts, where the model re-emits prompt spans and DSpark accepts long drafts. Scope the three defaults by backend like the existing DSpark confidence-gate default: Metal keeps 3/4/7, CUDA defaults to 0/0/0. Env overrides are unchanged, and the pause counters stay deterministic cycle counts, so greedy DSpark output remains reproducible. Benchmarks (DGX Spark GB10, IQ2XXS+w2Q2K quant, --temp 0 --nothink, 128 tokens, medians of 3, old defaults restored via env on the same binary): edit 17.91 -> 19.41 t/s, refactor 19.62 -> 21.13, QA over a passage 17.78 -> 18.42, code 18.67 -> 18.97, prose and math unchanged within noise. make cuda-regression OK, DSpark acceptance fixture 5/5 output_match=1, make cpu builds, macOS build clean.
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.
Summary
NO_DRAFT_SKIP,SHORT_ACCEPT_NO_DRAFT_SKIP,COLD_LOW_CONFIDENCE_SKIP) by backend, following the existing DSpark confidence-gate precedent (0.6Metal /0.7CUDA).--dsparksettings, with no measured regression outside run-to-run noise.Root cause
After a declined proposal the scheduler pauses proposing for 3/4/7 cycles. That trade was tuned for Metal, where a propose stage is cheap relative to decode. On CUDA the economics invert: GB10 decode is memory-bound at ~55-60 ms/token while a propose stage costs ~20 ms, so a paused cycle saves ~20 ms but every accept it forfeits costs a full extra decode. The pauses are most expensive exactly where DSpark is strongest — edit/refactor/QA prompts where the model re-emits prompt spans and accepts long drafts right after a declined cycle.
The pause counters are deterministic cycle counts, not wall-clock measurements, so unlike the timing-based scheduler knobs (which stay opt-in for reproducibility) changing their default keeps greedy DSpark output reproducible across runs.
Benchmarks
DGX Spark (GB10, sm_121, CUDA), DeepSeek-V4-Flash IQ2XXS+w2Q2K+AProjQ8+SExpQ8+OutQ8 quant. "Old" restores the previous defaults via env on the same binary, so the comparison isolates the default change:
Generation t/s, medians of 3:
The two small negatives are inside the ~1% run-to-run band observed on this machine; the wins are far outside it. DSpark stats on the refactor prompt at the new defaults: accept_rate 83.5%, avg_accept 1.42, net_saved +1172 ms over 128 tokens.
Plain decode is unaffected (the pause logic only runs inside the DSpark scheduler); before/after
ds4-benchsweep per CONTRIBUTING.md:All 32 frontiers agree within ≤1.1% (plain decode never enters the DSpark scheduler; the drift is run-to-run noise — the main sweep ran first on a cold server).
Metal defaults resolve to the same 3/4/7 values as before, so Metal behavior is unchanged by construction; the change builds clean on macOS (
make) and CPU (make cpu). I don't have a Metal machine with the model to re-run the Metal speed check — it would be great if someone can sanity-run it, though no change is expected.Verification
Related measurements: #773.