Repository navigation
ricursive: speed up Ripple-65B on two GB10s - #2523
ajensenwaud wants to merge 30 commits into
Conversation
449c34b to
4dd1313
Compare
4dd1313 to
210a6b2
Compare
210a6b2 to
fc874f3
Compare
fc874f3 to
970a311
Compare
970a311 to
a13fee7
Compare
a13fee7 to
a666bf0
Compare
|
@ajensenwaud thanks for the drafter; running it through |
a666bf0 to
56e0aaf
Compare
56e0aaf to
daa016c
Compare
daa016c to
02c30a1
Compare
02c30a1 to
a060764
Compare
|
Thanks, Ash.
The branch is rebased on main |
|
Thanks @ajensenwaud for the quick answers, and for the seeded, two-stream and resumed receipts. #2171 now has a yes, landing #2231, #2260, #2302 and #2475 after our 1.2.6 release. This PR is on hold behind #2522. It's a hold, not a no. The drafter's arithmetic follows SGLang's When it's rebuilt, please post the receipts you posted here again: drafted == plain at
|
nvcc 13.0 and 13.3 give tf_rtp2_lerp 12 registers on sm_80 to sm_89. The other kernels' records are unchanged.
At an 8-bit weight the two lerp forms round to the same bf16, so the start-anchored control stayed green. A full fp32 weight tells them apart.
…ces at 600 lines
Follow main 4b997f8 (glm metal dflash2: account tap-stage bytes, fix host build core import, trim comments). Keep all current dispatches and refusals beside the incoming Ripple entries. Remove two interior blank lines to restore the 600-line source limit.
…tays at 600 lines
… (seven blank lines fewer) Main's cuda.zig (last 833c695, the MOSS-Image recognizer) is at 590 lines with the special families moved into open_family.zig; ashhart#2522's ranked registry loop, its ranks refusal and its test put it at 607. Seven blank lines between adjacent tests at the end of the file go; no code changes.
…does The blend is now the bf16 sigmoid of the stored lambda, shared with Metal's blendOf, and a lambda that is not a bf16 value is refused.
Model.load and Ripple.init now release what earlier steps made, and a failed open stops rank 1's follow loop.
|
Thanks @ajensenwaud. We've looked at the branch again. It's still a hold, not a no: we want the drafter at two ranks. What's right: the What's still needed:
There's nothing for you to do about main: the branch conflicts with it in four files, and we'll handle that when it's ready. We can't promise a date.
|
51ffb46 to
6db8771
Compare
|
Thanks, Ash. I have rebased the drafter onto #2522's current head, which settles points 2 and 3. Point 1 waits on #2475: once it lands, I will rebuild the drafter from it.
|
|
Thanks @ajensenwaud. Confirmed on the new head, which now sits on #2522:
That leaves the drafter rebuild, which waits for #2475 as agreed. Nothing else is needed from you before then.
|
The refusal tests called refusals.family directly, so they passed when openWith stopped calling it. This test goes through cuda.open for every registered family and fails with the call removed.
The release's DFlash2 draft model (BF16) behind lanes.drafter, cut over both ranks as the target is (heads, FFN, fc/o/down inputs; the vocab halves' top-k gathered on rank 0): taps of the target's residuals (the target's tap ring), 4-tap block convolutions, a NoPE full-attention layer split over keys and merged, and a 32-candidate selector. Rank 1 opens its share when rank 0's plan word says so, from its own --drafter. Drafted replies equal "draft": false token for token. Kernels: ricursive_tp2_draft.cu (tf_rtp2d_*), with gate-5 launch records (nvcc 13.0 base, 13.2 pending, 13.3).
…gh gates 1-4, each with a planted control Exact by host rule: tap gathers, embed, f2b, top-k. Inside float64's range: rms, silu, both convolutions, head norms, kv_put, and attn with its merge. Controls tf_rtp2d_ctl_* sit beside the served kernels, whose SASS is unchanged (nvcc 13.0 and 13.3, sm_80/86/89/120/121), so the launch records stand. Both Ripple groups join the kernel-contract run; ricursive-tp2-draft-contract runs the drafter's alone.
…e two-rank glue's
…o one-rank branches, current file names The drafter runs its BF16 weights as published, so --drafter-bits 0 is served and 4 is refused with DrafterBitsUnsupported (explained), as Gemma 4 refuses what it does not run, instead of a warning. The world == 1 paths in tp2_draft.zig and tp2_draft_load.zig (and Cut's one-rank default) go, as the target's did: admission takes two ranks only. Comments name ricursive_tp2_draft.cu and the drafter's cut over both ranks, not rank 0's device.
…model its maths follow; --drafter on both ranks
6db8771 to
dd1faac
Compare
What this is
The publisher's DFlash2 draft model for Ripple-65B-Preview, on the two-GB10 path of #2522 (
--tp 2), behindlanes.drafterwith--drafter <dir>. Stacked on #2522 (and through it on #2231), on mainc5a044877; six commits on top(the drafter
b0cb85dd0, its kernel contractd67bceee6, the contract's docsfc8a8314c, the review's fixesc1811454eande4f51d606, its changelog linedaa016ce1). Theone-GPU path has its own drafter in #2475; the two do not share files.
--drafter-bits 0(the BF16 weights as published) is served; 4 is refused by name (DrafterBitsUnsupported).Give both ranks the same
--drafter <dir> --drafter-bits 0(the recipe says so).blocks follow
inference/server/model.pyin the Ripple-65B-Preview release, and the draft model it runs is SGLang0.5.19's
DFlashDraftModel(python/sglang/srt/models/dflash.py); THIRD_PARTY_NOTICES names both.vocab halves' top-k are gathered on rank 0. Rank 1 opens its share when rank 0's plan word says so, from its own
--drafter.tf_rtp2_taps),runs 4-tap block convolutions, a NoPE full-attention layer split over keys and merged in order, and the release's
32-candidate selector.
ricursive_tp2_draft.cu(tf_rtp2d_*: tap gathers, RMS norms, the two convolution branches, head norms withRoPE, K/V puts, bf16 casts, SiLU, embed, split attention, merge, top-k), loaded from the family's own image.
contract_family_sets.ziga group, one command in the CUDA runner).Kernel contract
contract_ricursive_tp2_draft*.zig(tf-cuda-test ricursive-tp2-draft-contract; both Ripple groups also joinkernel-contract). Each of the twelve kernels through gates 1-4, each with a planted control (tf_rtp2d_ctl_*, red atshapes):tf_rtp2d_gathertf_rtp2d_embedtf_rtp2d_f2btf_rtp2d_topktf_rtp2d_rmstf_rtp2d_silu__expfwithin 2 + 1.2 |x| ulps)tf_rtp2d_conv_intf_rtp2d_conv_outtf_rtp2d_headstf_rtp2d_kv_puttf_rtp2d_attn+tf_rtp2d_mergeThe controls sit beside the served kernels in the same image; the twelve served kernels' SASS is identical to the
drafter commit's for nvcc 13.0 and 13.3 on sm_80/86/89/120/121 (60 of 60 functions each,
cuobjdump -sasscompare atthe image's flags), so the gate-5 records stand unchanged.
On GB10 (sm_121, nvcc 13.3 build of
23f77f300, the same drafter and contract files as this head on mainb4db86321):The last is
tf-cuda-test kernel-contract "cuda ricursive_tp2"(both groups at the full run's seed). Not run on otherGPUs.
Checks
On
56e0aaffb(these commits on mainc15d80023; main's moves since are changelog lines, server tool-call ids, qwen27 and deepseek_v41), host, Zig 0.17.0:zig build test-ricursive-tp2-host native ricursive-tp2-cuda compile-cuda-tests test-kernel-contract test-kernel-symbols-host test-native-options-host test-cuda-host test-golden:every step passed, EXIT 0.
tools/zig/lean_check.py398 problems on the branch and on main, none new; every touchedsource file at or under 600 lines;
zig fmt --checkandgit diff --checkclean. nvcc 13.3, sm_121:zig build install native compile-cuda-tests ricursive-tp2-cudaEXIT 0 on0fb762b2f(since then two comment lines and main'smoves). Gate-5 records from
cuobjdump -res-usage(13.0 base, 13.3 inpending_133.zig, 13.2 pending).Measured on the same drafter code on 1.2.3 (two GB10s, 5.0 pack, one stream, greedy, 512 tokens): drafted replies
equal
"draft": falsetoken for token; decode 46.6 tok/s on code, 19.2 on chat, 31.7 on an agent tool-call prompt,against 9.9 plain.
Served (two GB10s,
--tp 2, 5.0 pack)On
0fb762b2f(2026-11-09; since then two comment lines and main's moves),--parallel 2 --drafter <DFlash2> --drafter-bits 0, 512 tokens a reply, prompts code, chat and an agent prompt with tools:"draft": false(shas6cda6ef3,82cd27f9,e83a546cboth ways)."draft": false(shasbc152a9b,8ece1837,bee04af2bothways).
--parallel 2, code and chat), greedy and seeded: every concurrent reply equals its solo reply,drafted and plain, and drafted == plain. Aggregate 35.1 tok/s drafted, 19.1 plain (greedy).
accepted 184 of 346) equals the same turn on a freshly started serve.
Credits: ricursiveAI for the drafter release; turboderp's ExLlamaV3 and @auryn-macmillan for the target's EXL3 packs.