Repository navigation
ricursive: load Ripple's EXL3 packs through main's shared EXL3 code - #2514
ajensenwaud wants to merge 19 commits into
Conversation
|
Thanks @ajensenwaud. #2171 now has a yes for Ripple-65B-Preview from the publisher's bf16 and NVFP4 releases, landing as #2231, #2260, #2302 and #2475 after our 1.2.6 release. This PR is on hold until those are in. It's a hold, not a no. We're applying one CUDA family per model and one activation precision per pack format, and this PR already fits. The packs load inside #2302's family, and their activations stay in bf16. Our contributing guide says to keep the checkpoint's activation precision, and the release these packs are made from is bf16, so bf16 is the precision for Ripple's EXL3 packs. #2522 will move from fp16 to match, and the Once #2475 lands, please:
Thank you for the fidelity table against exllamav3. It made this easy to judge.
|
|
Thanks, Ash. I will take care of all four once #2475 lands, and the PR will admit only the 5.0 bpw pack, which is published at a fixed revision. |
|
@ajensenwaud, this remains under the agreed prerequisite hold. Your stated lack of the NVFP4 release answers the alternative in that request; we will run that non-regression check on a GB10 and handle the landing rebase and changelog attribution. The fixed 5.0 pack is identified. Please align the description and published qualification with the agreed 5.0-only scope, or supply the fixed pack revision and receipts if you want 6.0 included. A 5.0-average pack can still contain an 8-bit head, so the scope must identify the qualified pack rather than require every tensor to be 5-bit.
|
The config must name 5.0 bits with an 8-bit head, as in ashhart#2514. The loader no longer checks each tensor's bit width.
|
Thanks, Ash. The PR now admits only the 5.0 bpw pack at revision
|
|
Is there anything else we need to get this PR over the line, noting it is in draft mode? |
The config must name 5.0 bits with an 8-bit head, as in ashhart#2514. The loader no longer checks each tensor's bit width.
|
Thanks @ajensenwaud for narrowing the loader to the published 5.0 bpw pack and using the shared Three items remain on your side. First, The supplied full stack also conflicts with current main in 22 files and reconstructs two lower-stack files over 600 lines:
|
|
Thanks, Ash. All three are fixed in
Thanks for taking the NVFP4 run and the rebase. |
|
I reran the capability regression on M5 Max with Zig 0.17.0. With only the new test applied to Against Igor Lessio - AIFLOW LABS |
The config must name 5.0 bits with an 8-bit head, as in ashhart#2514. The loader no longer checks each tensor's bit width.
a763b8a to
f466f6c
Compare
|
Rebased onto the new #2475 head (
Checked on the rebased head: |
The config must name 5.0 bits with an 8-bit head, as in ashhart#2514. The loader no longer checks each tensor's bit width.
f466f6c to
b29961a
Compare
|
I checked the rebased zig build test-ricursive-cuda-host test-gradient-serving check-native-cuda-host -Dcpu=apple_m1 -j3 --summary all
zig build compile-cuda-tests -Dtarget=aarch64-linux-gnu -Dcpu=baseline -Doptimize=ReleaseSafe -j3 --summary allFor landing order, the embedded parent Igor Lessio - AIFLOW LABS |
|
Thank you, @ajensenwaud. The current head offers EXL3 explicitly, limits admission to the measured 5.0-bit pack with its 8-bit head, and refuses a lambda that would need rounding. The earlier drafting and resumed-prompt results are now recorded too. The EXL3 slice looks ready for controlled comparisons using the published pack. Maintainer integration needs to preserve the current draft backend and notices, followed by exact token comparisons and the existing NVFP4 control on that final tree. No further pack download or rebase is needed from you for this review.
|
…re hooks tf_rc_tap copies a tapped layer's residual rows into a slot's ring, as dflash2.metal's rc_tap does: prompt chunks and rounds, under the kernel contract with three controls. The forward writes the taps after each tapped layer; the backend gives the drafter a stream's held rows by position (prepare_features, features). The slots' caches move to cuda_arena.zig and the forward tests' weight fixture to ripple_fixture.zig, unchanged, so each file stays under 600 lines.
…er's packed weights and the selector walk The drafter's config parse moves from dflash2_config.zig to dflash2_spec.zig, which needs no Metal, so the CUDA build shares it; dflash2_config.zig re-exports it. ashhart#2260's refusal of a clamped MLP (ffn_clamp_threshold) moves with it, and max_streams stays in dflash2_config.zig. cuda_dflash2_weights.zig reads the release through that parse and packs its projections for the lane matmul; cuda_dflash2_select.zig is the host walk over each row's top-32 candidates, as rc_df_walk.
…s under the contract ricursive_dflash2.cu runs dflash2.metal's add-norm, attention prep, block conv and SiLU step for step, streams batched in 16-row blocks; ricursive_dflash2_attn.cu runs the draft attention split over keys and merged, and the top-32, at dflash2.metal's rounding points. Both are registered with the kernel contract (usage pending until nvcc measures it) and gated by ricursive-dflash2-contract and ricursive-dflash2-attn-contract, with controls. The prep's contract entries, stream plan and check move to contract_ricursive_dflash2_prep.zig, unchanged, so each file stays under 600 lines.
…rafted replies equal plain ones The drafter runs dflash2.zig's op order over the target's taps, streams batched in 16-row blocks, and serves through the lane core's Drafted wrapper. --drafter's config.json goes through ashhart#2260's qualified parse and the CUDA kernels' gate before any stream, so its bytes are admitted with the streams'; a drafter that leaves no room for one stream is refused by name. ripple-drafted checks drafted == plain at 1, 2 and 8 streams. The config read and the gate move to cuda_dflash2_config.zig, unchanged, with a test that a clamped MLP (ffn_clamp_threshold) is refused as ashhart#2260 refuses it. THIRD_PARTY_NOTICES lists the CUDA drafter files beside dflash2.zig and dflash2.metal.
…masks The drafted wrapper always offers first_masked and forwards to the family, so a family without masks answered response_format and forced tool calls with HTTP 500. Read the family's own vtable, as hip.zig does, so the server refuses them up front with 400.
… SMs kernel-contract-limits on the Spark measured tf_rc_tap and the eight DFlash2 launches on sm_80, 86, 89, 120 and 121. Their receipts go in pending_133.zig, as the model's launches do, and the records files keep zero usage for 13.0.
…shared drafts by them
calibrate() copied the measured window and lane costs into the facts but not the shared-round costs, so rows past the widest window were priced as one stream's widest window scaled by rows. At 8 Ripple streams that made every round past 16 rows look 1.5x dearer than measured, and the allocator held one draft a stream. Drafters that time no shared rounds are unchanged.
The CUDA family from ashhart#2302 (jrb-ai) on the host config from ashhart#2231 (BobClawblaw) loads an ExLlamaV3 pack of the bf16 release besides the NVFP4 one: config.zig reads quant_method exl3, cuda_exl3.zig maps the pack's trellises (mul1, suh, svh) and refuses a leftover tensor, and every projection and the head become a Proj, either the lane weight as before or an exl3.Weight. Model.linear runs the latter on exl3.Dense (128-row blocks for prompt chunks and decode rows alike), with its scratch grown at init so captured rounds allocate nothing. q, k and g stay three EXL3 projections, written as planar blocks that prep and the gate read at their own strides. Metal refuses a pack.
A pack's quantization_config must name 5.0 bits with an 8-bit head, the pack measured against exllamav3; any other is refused by name.
The family's formats now list exl3 beside modelopt-nvfp4, as its loader admits the 5.0-bit pack; a test ties the two. The recipe's intro, licence and the recipe index name the pack.
Keep current main’s detailed Ricursive attribution and Qwen3 ASR control while adding the CUDA reference files, DFlash2 attribution and Ricursive preparation controls from the stacked patches. The split control file keeps contract_controls.cu beneath the 600-line ceiling.
897b0f8 to
b6b0a6e
Compare
|
Thank you, @ajensenwaud. The rebase retains your EXL3 commits, measured pack admission and refusal to round lambda, along with the current draft backend and notices. The earlier drafting and resumed-prompt results remain recorded. This is ready for controlled comparisons after maintainer integration. Exact tokens against the same pack's serial path, plus the existing NVFP4 output and speed control on the final tree, remain before landing.
|
What this changes
Before, the CUDA
ricursivefamily (#2302, with its drafter from #2475) served only the publisher's NVFP4 release. After, it also serves the5.0 bpw ExLlamaV3 pack of the bf16 release (
quant_methodexl3, mul1 codebook, 8-bit head): every projection and the head run throughmain's
cuda.exl3.Densewith bf16 inputs and outputs, and everything else in the forward is #2302's unchanged (glue,Q/K prep, window and tree attention, caches, graphs, lanes, kept states). This is not a second family: it is one
loader path and one dispatch in @jrb-ai's family, on @BobClawblaw's host config from #2231.
config.zig:quantization_config.quant_method == "exl3"setsexl3only for the measured pack, 5.0 bits a weightwith an 8-bit head. Any other EXL3 pack is refused by name (
UnmeasuredRicursiveBitrate). The NVFP4 check is unchanged.cuda_exl3.zig(new): maps a pack's tensors (trellis,suh,svh, themul1marker) by dtype and shape andrefuses a leftover tensor, as
cuda_weights.mapdoes;value_res_lambda(fp32 in a pack) must hold a bf16 valueand goes through ricursive: Ripple-65B-Preview on native CUDA (NVFP4) #2302's
blendOf.Projis either ricursive: Ripple-65B-Preview on native CUDA (NVFP4) #2302's lane weight or anexl3.Weight;Qkgkeeps q, k andg fused for the release and three EXL3 projections for a pack.
cuda_model.zig:linearruns an EXL3 projection onexl3.Dense(promptfor chunks,decodefor rounds; bothare 128-row blocks of the same kernel, so a row's bits do not depend on the path or the chunk); a pack's q, k and
g land as three planar blocks that prep and the gate read at their own strides (no copy for g).
Dense's scratchis grown for every projection at
init, so captured rounds allocate nothing. The head goes through the samelinear. The file stays at 600 lines.exl3.Dense, on the releasethrough the lane matmul as before.
UnsupportedRicursivePrecision) instead of failing on a missing tensor.cuda_native.zig: the family's capability formats listexl3besidemodelopt-nvfp4, socapabilities --jsonoffers what the loader admits.
No kernel is added or changed, and no shared file outside the family is touched (Metal's
weights.ziggets the onerefusal line).
3065161da), on ricursive: Ripple-65B-Preview on native CUDA (NVFP4) #2302 and ricursive: Ripple-65B-Preview on native Metal (NVFP4 and bf16 releases) #2231; this PR adds three commits (cd9e0209d,ce544b413,a763b8a78). The pack path does notneed the drafter, but both change
cuda_model.zig, so it sits on top of the drafter instead of beside it.atc overlap --json: not run (the tool is not installed here). Like ricursive: Ripple-65B-Preview's DFlash2 drafter on native CUDA #2475, the branch conflicts with main throughricursive: Ripple-65B-Preview on native Metal (NVFP4 and bf16 releases) #2231 (
CHANGELOG.md,zig/src/server/chat.zig); these commits apply cleanly on ricursive: Ripple-65B-Preview's DFlash2 drafter on native CUDA #2475.Checks on this head
a763b8a78.under (
cuda_model.zig600).zig build test-ricursive-cuda-host: 69 of 69 passed (ricursive: Ripple-65B-Preview's DFlash2 drafter on native CUDA #2475's 63 and 6 new). New: the pack's config is admitted asexl3and qualifiedas Ripple-65B-Preview; a pack at any other bitrate is refused by name; the family's capability formats include
exl3for the config the loader admits (fails on
ce544b413:FormatNotOffered); a tiny pack (5 layers, 5-bit trellises) mapsevery tensor with no leftover; the gate admits a pack; q, k and g rows fused and planar; a 5-bit mul1 projection's
strides and scratch, an unbuilt bit width refused.
zig build native compile-cuda-tests compile-cuda-cli: all three compile (every family path; kernels emptywithout nvcc).
zig fmt --checkandgit diff --check: clean.GPU checks (one GB10, nvcc build of #2475's head
3065161daandcd9e0209d, 2026-11-08)ce544b413anda763b8a78only narrow which packs load and add the capability entry, so these runs still describe the head.tf-cuda-test ricursive-contract: 22 kernels, 22 pass gates 1-4, 0 fail; 27 controls, 27 red as planted, 0 missed(base and head alike).
ripple-forward40/40,ripple-serve9/9,ripple-drafted10/10 PASS lines on both base and head (the NVFP4 lanepath through the new
Projdispatch).tensorfold kldumps at 2,048-row and 64-row chunks are bit-identical on every row (agent 211, code210, prose 155 rows) on the 5.0 pack.
exllamav3 under bf16-rounded attention as the floor:
The floor rounds only attention to bf16; this family keeps every activation in bf16 with fp32 sums, which
exllamav3 (fp16 activations) does not, so the KL sits above that floor; true-token NLL stays within 0.5 % of exllamav3's for every text and path.
--context 32768(8 streams), greedy unless stated:tools/bench_concurrent.py --levels 1,4 --alone --serial: chat 1 stream 13.3 tok/s, 4 streams 38.5 tok/saggregate; code 4 streams 50.5 tok/s aggregate; every concurrent reply equal to its solo run (chat 3/3 and 12/12,
code 12/12) and to the serial run.
tools/bench_openai.py: fibonacci-raw 31.5 tok/s at temperature 0 and 21.7 at 1.0; gpu-chat-no-think 14.6 and12.5.
tools/bench_cache.py --require-cold: qualified; a cold 2,570-token prompt reaches its first token in 9.7-10.2 s(4 of 5 runs; one 19.8 s), with equal first tokens on every run.
around ricursive: Ripple-65B-Preview on native CUDA (NVFP4) #2302's calls, covered by its suites above.
GPU checks on this head (one GB10, nvcc build of
a763b8a78, 2026-11-21)5.0 pack,
--drafter,--context 131072; streamed chat requests, token SHAs from the server'stensorfoldblock.capabilities --json:ricursivelists["modelopt-nvfp4", "exl3"]."draft": false, 512-token replies, code, chat and agent (with tools), 6 streams: token SHAs equalgreedy 3/3, seeded (T 0.7, seed 7) 3/3.
token 0.3 s vs 125.9 s).
fresh server (first token 2.5 s vs 121.0 s).
Receipt
ajensenwaud/Ripple-65B-Preview-exl3-5.0bpw(revision
1d260f752b753d2b17571de237029b5e2251db07, 39 GB; exllamav3 1.6.6, mul1, head 8 bits, embeddingsbf16). It is the only pack this PR admits. Apache-2.0, as the release.
sm_121).
ricursivefamily's loader and projections; Metal's loader (arefusal). No shared kernel, server or lane code.
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.