feat(qwen35): support sampled concurrent speculation - #654
Conversation
5644008 to
0e7da88
Compare
|
Benchmark results after the commit-stack rewrite, at head 0e7da88. Setup: Radeon gfx1201 32 GB; Qwen3.8-27B-Q4_K_M target; Q8_0 DFlash2 draft; concurrency 3; draft width 8; max context 4096. Each batch launched three concurrent requests and generated 96 tokens per lane with DFLASH_MIN_TOKENS=96. Results are aggregate completion tokens divided by batch wall time, after one warmup and across three measured batches. Every measured batch produced exactly 288 tokens. Sampled lanes used temperature 0.8, top_p 0.9, top_k 40, frequency_penalty 0.4, and presence_penalty 0.2.
The control used the same #654 binary with no drafter loaded. It measures concurrent one-token AR and is not a source-level A/B against #651. Server logs confirmed packed DFlash2 batches with lanes=3 and q_len=8 for the speculative runs. The final gfx1201 build passed, as did the five focused CTests. |
0e7da88 to
1359020
Compare
e064784 to
a0526a9
Compare
Restore the paged-attention C ABI through a separate tree entry point. Reject unsupported GDN variants, initialize root-only chain trees, and size draft metadata from graph capacity.
Keep GDN journals inside the result buffer, restore the 10-source tensor layout, validate every tree destination before mutation, and allow selector widths that use the CPU top-k fallback.
Add fixed-width DFlash2 concurrent decoding for Qwen3.8 and batch the shared dense draft projections across active lanes. Keep convolution, cache updates, RoPE, masks, and attention lane-local. Preserve transactional state promotion and fixed-chain validation through C6.
a0526a9 to
b21867e
Compare
Stack
This draft PR is built on top of #651 at
f1c85e05. It therefore contains the exact current #642 history, #651's projection batching, and the separate replay-log rename.#654 adds two commits:
0445b161—feat(sampler): add distribution-preserving spec verificatione0647848—feat(qwen35): speculate sampled concurrent lanesBoth commits are patch-equivalent across the final restack.
Summary
For a proposed token
x, verification accepts withmin(1, p(x) / q(x)). At the first rejection, it samples from normalizedmax(p - q, 0). If the chain fully accepts, it samples the bonus token from the target distribution on the final verifier row. Target and residual distributions use the same sampler policy as ordinary generation.Three-lane reference benchmark
These measurements were taken on the previous stacked head
13590205, before the latest #625 refresh. They remain useful as a reference for the unchanged #654 patches, but they are not presented as final-head measurements. A clean rerun was deferred because another user continuously occupied the shared GPU host; contaminated numbers were excluded.Setup:
gfx1201)DFLASH_MIN_TOKENS=96Sampled lanes use temperature 0.8, top-p 0.9, top-k 40, frequency penalty 0.4, and presence penalty 0.2. The mixed batch is greedy, sampled, greedy.
Every measured batch produced exactly 288 tokens. The speculative server reported W8,
SWA layers: 5/5 (window=2048), and one packed three-lane draft backbone. The AR control used the same binary without a drafter.Verification
git range-diffreports both feat(qwen35): support sampled concurrent speculation #654 commits patch-equivalent across the final restack.f1c85e05, the final perf(qwen35): batch draft projections across lanes for concurrency #651 head.e0647848.max_abs=0before the final test-only parent update.git diff --check.