Repository navigation
feat(cuda): a DeepSeek-V4.1 projection a pack keeps as a float matrix runs on _plain - #4076
Conversation
Receipt detail for the float-linear pull requestThis is the second comment: the receipt files, the numbers behind the body's summaries, and the proofs in full. Where every number comes fromFiles are named by their path inside the receipt set. Each section below names the files it uses.
The files this change touches
The two binaries, and what the plan seesFrom
With the setting off the two images enumerate the same programs: Gate 1, per arm and per cellFour arms, one fresh boot each, The two earlier attempts were refused by that check while another session's builds held the host; no margin was The prefill tool's rows: row 0 is Decode, round by roundFour cells, per round the four boots in ABBA order.
Aggregate over all three rounds, six boots an image: main 57.4, this 57.2 (-0.39 %, floor 2.46 %) on fibonacci-raw Boots READY after 136, 136, 137 and 147 s in r0; 136, 153, 136 and 142 in r1; 158, 158, 147 and 158 in r2 Non-quiet samples in the census: r1 has 3 of 16, r2 has 8 of 15, r0 has 0, and the gate-1 cell has 0 of 18. The speed table in the bodyBuilt by The seam on the deviceWith the reference's own
The launches the setting adds, from the emitters by a probe test outside this change (decode windows of 1, 8 and 64
The fp32 copies, and where the pool check sees themThe 27 matrices are 225,968,128 bytes as stored (215.50 MiB) and 451,936,256 bytes as loaded (431.00 MiB), whole on The derived packThe overlay is 108 tensors over 8 shards, 70,985,836 bytes fetched, 70,996,476 bytes written, sha256 The comparer defect, in fullThe first pass over the four arms counted 4 differing fingerprints in each prefill cell and 30 in concurrent. Every The fixed comparer prints The sampling defect, in fullAll four decode arms exited 1 with So both The overlap, line by lineThe recorded The host gates, step by stepFrom
The aggregate and the mutants were measured on The bridge from The served numbers in this receipt were measured on the images built from the pre-reseat tree What is not in this receipt
|
|
A re-run of the merge test on this head, as upstream's steps ask.
This branch itself conflicts with current This replaces the earlier "four conflicts, all in |
|
Thanks @BadAd84. The gate is the one agreed in the tracking issue: unset behaves exactly as main and still refuses such a pack, and with it the float matrices run on the reference plain path with the receipts behind every number. The host steps ran base against head and the new tests land. One thing is open: the head has not been through the checks yet. Please push it and post the green run. The changelog hunk is the usual take-both at merge time. We will run the device check on our side once it rides: one GB10 serving that pack with the switch on and off.
|
|
On M5 Max with Zig 0.17.0, the trial merge of zig build test-dsv41-cuda-host test-dsv41-env-host test-environment-host \
compile-dsv41-cuda -Dcpu=apple_m1 -j5 --summary allAll 473 host tests passed, and the CUDA compile target passed. This covers the opt-in refusal and admission, plus the launch-plan checks. It leaves the PR's two-device receipt as the served CUDA evidence. One small documentation gap for the refresh: Igor Lessio - AIFLOW LABS |
|
Thanks @BadAd84 for the detailed receipts, and for rerunning the merge test on this head. The gate is resolved:
One thing is still open: we don't see a CI run at
|
5fe7fbc to
2981fb8
Compare
… runs on _plain With TF_DSV41_FLOAT_LINEAR=1, a backbone projection a pack keeps as a float `.weight` alone is planned as a native matrix, held as fp32 with bf16 values, and run on the reference's `_plain` in decode windows and in prompt segments, where the load stopped with MissingTensor. The five are attn.wq_a, the compressor's wkv and wgate, the indexer's wk and wq_b, in the layers the pack holds them; one with an EXL3 form, rotation scales, a rank split or in a DSpark block keeps its group, and unset the planner, the AOT needs and every emitter are as before. Sixteen mutants, one per decision, each fail the named test with that check removed, and with the setting off the device-free AOT needs and the four emit fingerprints are unchanged.
2981fb8 to
545aa51
Compare
|
Thank you @BadAd84. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
What this changes
Main plans
attn.wq_a, the compressor'swkvandwgateand the indexer'swkandwq_bas EXL3 groups only,so a pack that keeps any of them as a float
.weightalone stops at load withMissingTensor.Mia-AiLab's EXL3 EAQ v1.1 pack of DeepSeek-V4.1-Flash keeps 27 such matrices, all bf16, in layers 2, 8, 14, 20, 24, 28, 32 and 36.
With
TF_DSV41_FLOAT_LINEAR=1such a projection is planned as a native matrix, held as fp32 with bf16 values,and run on the reference's
_plainin decode windows and in prompt segments.Unset, the planner, the AOT needs and every emitter behave as on main, and such a pack is still refused.
Issue:
Refs #3083, where the gate was agreed. The second pull request, a multi-row launch whose bits equal_plain's, follows this one.Stacked on:
main8c3e7b809, one commit, 19 files, +415 -20, treefec2d8ba5.atc overlap --json: the recorded run (at08f1de594, snapshot partial) found 59 open pull requests sharing a file and 4 hard conflicts, all inCHANGELOG.md(GLM on CUDA: the latent split's per-rank page book and owner (TF_GLM_KV_SPLIT, #1431 part 1; stacked on #1411) #2415, Nemotron 3.5 Bolt (nemotron_h_puzzle) on Metal — serves end to end #1038, ocr: PDF documents and pages on /v1/ocr, one page at a time (#2440 step 2) #2571, glm cuda: TF_GLM_GRAPHS=1 replays verify windows as CUDA graphs (#1490) #2279). A fresh scan of my own (overlap-now.json) finds 227 of 450 sharing a path, 186CHANGELOG.md; a line-range pass over those 227 (overlap-lines.json, which over-reports) has 144 touching a line, six outsideCHANGELOG.md.Touches
plan.zig,named.zig,float_linear.zig, the three block emitters,block_prefetch.zig,aot_needs.zigand one shared-table row; the per-file account is in the next comment.Checks on this head
5fe7fbc37, treefec2d8ba5, parent8c3e7b809. The served images came from077998f7dand commit42801695f, treebd6cf6af1, the pre-reseat tree; this tree also carries main's 611 later commits, so it differs from that tree across 1,206 files, and the 19 patch files are the bridge: 16 hunks byte-identical to the gated patch, andCHANGELOG.md,docs/profiles.mdandenvironment.zigcontext-only with the same added and removed lines.pr_check.py0 errors, 1 warning (no PR number yet).8c3e7b809and on this head, on x86_64 Linux;zig fmt --checkandgit diff --checkare clean on both.zig build <step> --summary all -j4a step), base then head, passed (skipped):8c3e7b809test-dsv41-device-hosttest-dsv41-cuda-hosttest-dsv41-drafttest-dsv41-forwardtest-dsv41-sharedtest-dsv41-env-hosttest-dsv41-state,-kv,-bounds-host,-wait-reasons-hosttest-environment-host,test-environment-report-hosttest-goldencompile-dsv41-server,-tool,-cuda,-device-hostzig build test test-goldenwas measured on30365d01a, not re-run here, and carries by the same hunk identity: 725/725 steps and 10,510 of 10,588 tests passed (78 skipped), rc 0.test-kernel-contract: 36/36 steps and 256/256 tests passed (299 s) on this head.zig build test-hostas a whole (the DeepSeek and environment steps the change reaches are above, and CI runs the whole suite), Metal, macOS and HIP (no file of theirs changes), the Windows job.Receipt
projection.zigandmetal/untouched.TF_DSV41_FLOAT_LINEAR: default off (unset, empty or0),1on, spaces trimmed, other text refused. A shared-table row (82 rows, 49 switches), not a profile entry.077998f7d; the served head image's tree isbd6cf6af1, this commit'sfec2d8ba5; the recipe's image (Zig 0.17.0, CUDA 13.3), Triton 3.7.1, ptxas 13.3.73; two GB10 (driver 580.178.04) at TP=2 over the direct cable pair; checkpointMia-AiLab/DeepSeek-V4.1-Flash-1017-EXL3-EAQ-v1.1-2.9-bpwataee640e2;TF_DSV41_CONTEXT=262144,TF_DSV41_SLOTS=8.bench_concurrent.py --alone --serial0 failed, 0 unmeasured, four cells; drafted equals"draft": falseon 4 prompts; 4 streams equal solo, at once and 0.4 s apart; 104 lengths (96 replay floor) equal; resume equals fresh._plain.aot-needslists the same 123 kernel entries over 18 functions, no new constexpr set; only launch counts move (_plain'sBF16-true entry 431,976 to 5,507,311).Gate 1, served
main, this, this,main, setting offRan on the derived all-EXL3 pack with
off.env, one fresh boot an arm (base1, head1, head2, base2), boots READY after 142, 141, 136 and 137 s; the cell recorded QUIET (18 samples, no foreign builds).bench_cache.py --require-coldbench_cache.py --require-coldbench_concurrent.py --alone --serialbench_openai.py --temperatures 1.0,0Pairwise (base1/base2, head1/head2, base1/head1): 0 of 17, 0 of 17 and 0 of 300, and 0 of 36 in decode, so two boots of one image agree as the head agrees with the base.
Decode ran as its own three-round ABBA on
off-sampling.env, every round 36 fingerprints, 0 differing.Decode, six boots an image over the three rounds:
fibonacci-rawseeded T=1gpu-chat-no-thinkseeded T=1fibonacci-rawgreedygpu-chat-no-thinkgreedyThe floor is the largest same-image spread in any round used, and every gap is smaller.
The first round read the two seeded cells 1.89 % and 1.44 % slower; the next two reversed the sign and the six base boots span 5.5 % of their mean, which two boots cannot separate.
Only the first round is QUIET; the other two carry 3 and 8 non-quiet samples, are labelled CONFOUNDED and are extra boots only.
One concurrent cell reads faster than its floor: chat 4 streams, +2.5 %, not claimed as a gain.
Setting off, the plan-level proof
tf-dsv41 aot-needs, no GPU, both ranks, base image against this image: byte-identical JSON on all four runs, 78,968 programs and 123 kernel entries over 18 functions, sha25658d0e24900e22b92....The binaries differ only in placement:
.text+7,252 bytes at+0x2038,.rodata+7,928,.data.rel.ro+416, binary +63,936.The pack is still refused at boot on both images,
rank 0 failed in boot: MissingTensor, after 6 s.Setting on, the exactness list
exactness: 4 PASS 0 FAIL: drafted equals"draft": falseon 4 prompts, 4 streams equal solo at once and 0.4 s apart, 104 lengths (96 on the replay floor) equal after two different requests and with"draft": false.sane: 7 ok, 0 broken;broken lengths: noneover 96 lengths from 10 to 200 tokens;bench_concurrentfour cellsfailed 0, unmeasured 0.Needles, as they happened: 1,021, 4,601, 11,622, 23,206 and 55,260 prompt tokens exact (prefill 349.1 to 387.9 tok/s), then
HTTP Error 500at 111,720 andHTTP Error 503at 168,164.Both sizes then passed alone on a fresh boot (111,720 in 297.56 s at 375.7 tok/s, 168,164 in 453.74 s at 370.8, no request error logged), so seven of seven are measured, five in the cell and two in the probe.
Resumed equals fresh
Raw token ids, so
P's end is a strict prefix ofQ: serial freshdd5ced43equals resumeddd5ced43, draftedec75f9aeequalsec75f9ae, each resumed arm carrying the engine's linesessions: slot 0 resumed 8240 of 8256 prompt tokens from RAM.The in-chain FAIL came from a guard on
cached_tokens, 0 in every request; re-judged with the engine's line, with a negative control on an empty log that FAILs.Fidelity, both margins
One instrument, both packs: 112 windows of 16 rows, teacher-forced, against the reference's own forward.
Mixed (setting on) 261 top-token differences of 1,792; all-EXL3 baseline 261, same windows; verdict
pass: true,reasons: []; 82 rows in common, 179 only in each, so the tie is two measurements.The bit-exact digest gate fails on both arms alike (0 of 4,480 block digests, 99.2 % of logits), including an arm with no float projection, so it is the instrument and stack.
What it does not prove: neither that the float path is bit-equal to the reference, nor that it is bit-different at a named seam.
The all-EXL3 baseline is DERIVED
Built, not published: v1.1's bytes plus Mia-AiLab's published quantisation of the 27 matrices, byte-proven (
tensors 108, true 108, shifted 0, neither 0, sha2563621ea36...).Eight
weights_projtensors are F16 in the published v1 pack and BF16 here, so it may not be called the published pack.Three defects in our own gate, and their proofs
data_offsets[0], so all 108 tensors were shifted by each shard's8 + header length; every name check passed and the engine refused it withUnknownCodebookMarker. Fixed; the byte gate now compares against the published source, 108 of 108 true.tool_sha256, null in all four arms, as a difference, so gate 1's first pass failed on the 4 + 4 + 30 fields no arm emits; it now reports them ABSENT, and a field missing from some arms still fails (kept three-case test).temperature > 0is refused unlessTF_DSV41_SAMPLING=1, unset in both env files, so all four arms exited 1 withRuntimeErrorand every rank 0 log saysstream error: Sampling. Fixed by the one-lineoff-sampling.env; the re-run is the 36-fingerprint row.Limits
TF_DSV41_CONTEXT=262144in every cell, against the model's 1,048,576.What we ask of upstream
Detail in the next comment (
RECEIPTS-DETAIL.md): receipt files, launch table, seam, memory, decode rows, overlap, full proofs.Checklist
30365d01a, carried here by the hunk identity, every file restored,git status0 before and after.pr_check.py0 errors, its one warning the Unreleased line."draft": false, a resumed prompt equals a fresh one, concurrent equals solo:exactness: 4 PASS 0 FAIL._plain, whose fp64 sum and roundings the seam measures equal to the fp64 reference.--drafter, no slower than without it, greedy and sampled. Level with the setting off; unticked for one clause: drafter on against drafter off was not run, all arms serving the same drafted settings. Setting-on speed is not claimed.