Repository navigation
qwen3_5 cuda: the DFlash2 drafter reads a dense EXL3 head over its two vocabulary spans - #1507
Conversation
|
Thanks @diwakergupta, this is what we invited when we closed #1474: One change before we run it:
A heads-up: this PR and #1475 add tests at the same place in Then we'll run the dense EXL3 pack with DFlash2 on a GB10 against #1465: token hashes, drafted == plain, concurrent == solo at two and four streams, tokens per round and per-stream speed. |
|
Thanks @ashhart, that was the cause. Pushed
I reran the speed table on the 3090 Ti, alternating #1465 and this branch twice. It's in the description.
On this machine |
|
Thanks @diwakergupta, that's the fix:
All 144 hashes equal #1465's, which is the result we wanted. Tokens per round also moved between #1465's own runs, so Next, after #1465, we'll run the dense pack with DFlash2 on a GB10 against #1465: token hashes, drafted against plain, |
…o vocabulary spans On ashhart#1465 the drafter projects all 248,320 columns of an EXL3 target's head. It now projects only the spans it proposes from, as column views of the stored matrix: exl3.Weight.columns keeps the parent's strides and moves to whole 128-column blocks, with a host test. The x3 arm shares the affine head's packing path. MoE EXL3 targets still refuse a drafter. The family's formats list exl3, and exl3.md and cuda.md no longer say the native engine serves no EXL3 pack.
…t plans as the whole head does The 384-column tail planned eight K splits where the full head plans one, so its logits and some proposals changed. The view now starts at column 240,128 (exl3.wide_blocks blocks), keeping ashhart#1465's bits. A host test checks that both span views plan as the whole head does.
f056dbb to
debf9f8
Compare
What this changes
This is the rest of #1474 that #1465 doesn't have, as @ashhart asked when closing #1474. It is stacked on #1465: review the last two commits.
exl3.Weight.columns(from, n)(zig/src/cuda/exl3.zig) is a view of whole 128-column blocks of the stored matrix that keeps the parent's strides. It has a host test..x3arm ofhead()(cuda_draft_frame.zig) takes the first span, and for the tail the lastexl3.wide_blocks(64) blocks, from column 240,128, dropping the first 7,904 columns when packing. It shares the affine head's projection andcuMemcpy2DAsyncpacking.exl3.plan()gives a shape one split from 64 blocks up, andwide_blocksnames that threshold. The tail reads about 30 MB more a round than a 384-column tail would, and still skips ~545 MB.exl3in the family'sformats(cuda_native.zig), and theexl3.mdandcuda.mdlines that said the native engine serves no EXL3 pack.openDrafterandopenMtp.Receipt
Environment. RTX 3090 Ti (24 GB,
sm_86).turboderp/Qwen3.8-27B-exl3branch3.50bpw(rev8351c54e),z-lab/Qwen3.8-27B-DFlash2(rev50307d4c) at 4 bits, bf16 KV cache,--context 32768. Both binaries came fromzig build native -Dsm=86, one from qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465 (c127b644) and one from this branch. Each ran twice, alternating (qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465, this, qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465, this), on a restarted server.Exactness.
tools/bench_concurrent.py --levels 1 --tokens 384 --reps 3 --alone --serial, with the default code and chat cells (greedy and sampled) and--promptswith two long prompts (5,080 and 2,278 tokens):"draft": falseand every repeat == its first run, in every cell on both binaries: 0 unequal, 0 failed.token_sha256of this branch equals qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465's in 144/144 replies.Draft speed. Per-stream tok/s (each run a median of 3) and tokens per verify round, runs 1 / 2:
Prompt speed: n/a. The head projection runs only in drafter rounds.
Tests. The full checklist suite (
zig build test test-kernel-contract test-golden test-server-security test-pull-security fuzz-cortheon test-cuda-host): exit 0, 444/444 build steps succeeded, as on qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465. New host tests:a column view keeps the parent's strides and moves to its first 128-column block, andDraft frames: an EXL3 head's span views plan their K split as the whole head does. The second fails with the 384-column tail (expected 1, found 8). It runs intest-qwen35-draft-frame-host, whosethe real hold adapter …test aborts on my machine on qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465 as well; the other 11 pass.lean_new.pyagainst qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465: 0 new problems.Not run. Metal (no Mac). GB10 /
sm_121. MoE EXL3 targets, which still refuse a drafter.Checklist
"draft": false, and this branch's tokens equal qwen3_5 cuda: dense EXL3 checkpoints (Qwen3.8-27B), with DFlash2 drafts #1465's. Concurrent vs solo was not rerun here (one stream): no concurrent path changed.sm_86only.