feat(qwen36): add all-C request-granular adaptive verification - #617
Closed
Graffioh wants to merge 18 commits into
Closed
feat(qwen36): add all-C request-granular adaptive verification#617Graffioh wants to merge 18 commits into
Graffioh wants to merge 18 commits into
Conversation
Graffioh
force-pushed
the
codex/adaptive-speculation-goodput
branch
2 times, most recently
from
August 17, 2026 09:49
fc6e493 to
f31ce6e
Compare
Graffioh
force-pushed
the
codex/adaptive-speculation-goodput
branch
from
August 18, 2026 06:30
5284034 to
66c1578
Compare
Graffioh
force-pushed
the
codex/adaptive-speculation-goodput
branch
from
August 18, 2026 12:35
ae3e6c6 to
cd6cf30
Compare
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
This draft adds request-granular adaptive speculation for every supported active concurrency (
C <= 16). It does not classify prompts as code/chat and it has no fixed concurrency cutoff: each request may use the configured speculator or remain autoregressive, based on measured useful-token goodput.The implementation is split into a reusable planning policy and a concrete DDTree adapter:
(speculator, shape, proposal nodes, verifier rows)work key, with a shared exact-CAR baseline.The common selector accepts one configured speculator per call. DDTree, DSpark, and future speculation methods can implement the same adapter contract without changing the ranking policy. Simultaneously racing multiple speculators would be a separate portfolio policy and is intentionally not claimed here.
Decision process
At each decode step:
CAR cost.There is no prompt keyword heuristic, fixed code/chat label, or per-model offline performance table. Confidence expires by generated-token progress, and costs continue adapting through bounded EWMAs. New/refilled cohorts, draining tails, transient scout failures, AR-peer protection, and
Always/Neverrequest semantics have explicit safeguards.DDTree integration
C <= 3retains the established full DDTree verifier shape while routing requests independently.C = 4profiles the established full shape before a compact fallback.C > 4offers bounded compact shapes first, then wider work only after the cheaper exact profile loses.This PR wires DDTree end to end. DSpark is not executed concurrently by this PR; adding it later means implementing its scout/menu/executor adapter against the common contract.
Strix Halo results
All GPU workloads were pinned with
HIP_VISIBLE_DEVICES=1; runtime logs confirmed Radeon 8060S /gfx1151. The R9700 was not used.Protocol: Qwen3.6-27B Q4_K_M, local DFlash Q4_K_M draft, greedy decoding, fresh server per workload and mode, 24-token warmup, then two measured runs with exactly 64 output tokens per request. All requests completed with the exact token count and zero failures.
Mixed matrix
At
C=2, both requests used DDTree in the measured runs: the code request accepted 63/63 speculative tokens per run, while chat accepted 22 and 19. This is a real aggregate win for that fixed mixed workload, but it is not evidence that the controller selected only the code request.For
C >= 4in this matrix, every measured request reported zero DDTree steps and exactlyC * 63target forwards. The controller therefore converged safely to pure AR; these rows demonstrate bounded overhead/parity, not a high-concurrency DDTree speedup. Sub-1% differences should be treated as noise-level parity, while theC=4-1.37% is the clearest residual scout cost.Targeted cohorts
A separate forced
C=5smoke test produced 5 x 24 tokens with zero failures, and all five requests recorded DDTree steps and accepted tokens. This confirms that hard capacity is not accidentally limited to the adaptive lane count.Current conclusion: the controller preserves the real
C=2-3DDTree gains and avoids a steady regression at higher concurrency, but this Strix/Qwen/DDTree configuration does not yet demonstrate profitable steady speculative work atC >= 4. A cheaper/fused DSpark scout or a faster verifier shape can reuse the policy and be evaluated independently.Validation
dflash_serverandtest_speculation_goodputbuild: passed.server_unit, recurrent snapshots, engine contracts, batch plans, speculation policy): 375/375 passed.C=5DDTree capacity smoke: passed on Strix Halo.git diff --check: passed.Stack
This remains the existing draft PR #617 and keeps its current stack/dependency relationship with #605. The latest cohesive implementation commit is
cd6cf301.