Skip to content

feat(cuda): a DeepSeek-V4.1 projection a pack keeps as a float matrix runs on _plain - #4076

Merged
ashhart merged 2 commits into
ashhart:mainfrom
BadAd84:float-linear-pr1d
Nov 21, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
BadAd84:float-linear-pr1d

Conversation

@BadAd84

@BadAd84 BadAd84 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

What this changes

Main plans attn.wq_a, the compressor's wkv and wgate and the indexer's wk and wq_b as EXL3 groups only,
so a pack that keeps any of them as a float .weight alone stops at load with MissingTensor.
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=1 such a projection 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.
Unset, the planner, the AOT needs and every emitter behave as on main, and such a pack is still refused.

Checks on this head

  • Head commit: 5fe7fbc37, tree fec2d8ba5, parent 8c3e7b809. The served images came from 077998f7d and commit 42801695f, tree bd6cf6af1, 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, and CHANGELOG.md, docs/profiles.md and environment.zig context-only with the same added and removed lines.
  • Lean checker, each tree's own copy: base 6,857 files and 189 problems, head 6,858 and 189, 0 new; pr_check.py 0 errors, 1 warning (no PR number yet).
  • All of these ran on pristine 8c3e7b809 and on this head, on x86_64 Linux; zig fmt --check and git diff --check are clean on both.
  • Tests run (x86_64 Linux, Zig 0.17.0, one zig build <step> --summary all -j4 a step), base then head, passed (skipped):
step base 8c3e7b809 this head
test-dsv41-device-host 224 (0) 229 (0)
test-dsv41-cuda-host 410 (0) 423 (0)
test-dsv41-draft 149 (0) 152 (0)
test-dsv41-forward 184 (1) 189 (1)
test-dsv41-shared 102 (1) 105 (1)
test-dsv41-env-host 14 (0) 14 (0)
test-dsv41-state, -kv, -bounds-host, -wait-reasons-host 4, 29, 6, 2 4, 29, 6, 2
test-environment-host, test-environment-report-host 26, 41 26, 41
test-golden 5/5 steps 5/5 steps
compile-dsv41-server, -tool, -cuda, -device-host 8/8, 6/6, 6/6, 6/6 steps the same
  • The full zig build test test-golden was measured on 30365d01a, 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.
  • CI: not run; nothing is pushed.
  • Not run: zig build test-host as 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

  • Main against branch: gate 1 below, setting off, in a quiet window: every fingerprint equal, every speed cell level.
  • Boxes it reaches: CUDA only, with the setting on, only for a pack keeping one of the five projections as a float alone; projection.zig and metal/ untouched.
  • New switch? TF_DSV41_FLOAT_LINEAR: default off (unset, empty or 0), 1 on, spaces trimmed, other text refused. A shared-table row (82 rows, 49 switches), not a profile entry.
  • Environment: base 077998f7d; the served head image's tree is bd6cf6af1, this commit's fec2d8ba5; 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; checkpoint Mia-AiLab/DeepSeek-V4.1-Flash-1017-EXL3-EAQ-v1.1-2.9-bpw at aee640e2; TF_DSV41_CONTEXT=262144, TF_DSV41_SLOTS=8.
  • Paths and platforms: decode windows of 1 to 64 rows, prompt segments up to 2,048 rows, in layers holding a float projection; CUDA only, a GB10 pair at TP=2. Not run: other chips, Metal, HIP.
  • Exactness: bench_concurrent.py --alone --serial 0 failed, 0 unmeasured, four cells; drafted equals "draft": false on 4 prompts; 4 streams equal solo, at once and 0.4 s apart; 104 lengths (96 replay floor) equal; resume equals fresh.
  • Main against this branch: gate 1 with the setting off. With it on main cannot plan the pack at all, so there is no main arm there.
  • Decode speed: level over three ABBA rounds, six boots an image (table below).
  • Prompt speed: level at 8,192 and 32,768 cold, TTFT and rate (table below).
  • Licence of any new weights or drafter: n/a. No weights, no drafter, no new kernel: the added launch runs the existing _plain.
  • Kernel contract: n/a, no kernel is new or changed; the step ran on this head anyway and passed, 36/36 steps and 256/256 tests. With the setting on, aot-needs lists the same 123 kernel entries over 18 functions, no new constexpr set; only launch counts move (_plain's BF16-true entry 431,976 to 5,507,311).

Gate 1, served main, this, this, main, setting off

Ran 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).

cell tool fingerprints differing
prefill 8,192 cold, 64 reply tokens bench_cache.py --require-cold 17 0
prefill 32,768 cold, 64 reply tokens bench_cache.py --require-cold 17 0
concurrent, code and chat at 1 and 4 streams bench_concurrent.py --alone --serial 300 0
decode, greedy and seeds 1234-1236, 2 prompts bench_openai.py --temperatures 1.0,0 36 0

Pairwise (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.

cell metric main (base1 / base2) this (head1 / head2) this vs main same-image spread
prefill 8192 cold TTFT s 6.47 / 6.35 6.44 / 6.38 -0.0 % 1.9 % base, 0.9 % head
prefill 8192 cold prefill tok/s 1265.2 / 1289.5 1271.7 / 1283.7 +0.0 % 1.9 % base, 0.9 % head
prefill 32768 cold TTFT s 19.84 / 19.47 19.84 / 19.41 -0.2 % 1.9 % base, 2.2 % head
prefill 32768 cold prefill tok/s 1651.4 / 1682.9 1652.0 / 1688.3 +0.2 % 1.9 % base, 2.2 % head
concurrent code 1 stream, aggregate tok/s 96.3 / 96.2 95.3 / 96.2 -0.5 % 0.1 % base, 0.9 % head
concurrent code 4 streams, aggregate tok/s 230.9 / 234.1 230.7 / 230.4 -0.8 % 1.4 % base, 0.1 % head
concurrent chat 1 stream, aggregate tok/s 50.9 / 51.1 51.3 / 53.0 +2.3 % 0.4 % base, 3.3 % head
concurrent chat 4 streams, aggregate tok/s 139.0 / 139.8 143.6 / 142.1 +2.5 % 0.6 % base, 1.1 % head

Decode, six boots an image over the three rounds:

decode cell main, n=6 this, n=6 this vs main floor verdict
fibonacci-raw seeded T=1 57.4 tok/s 57.2 -0.39 % 2.46 % LEVEL
gpu-chat-no-think seeded T=1 52.7 52.6 -0.13 % 1.10 % LEVEL
fibonacci-raw greedy 95.6 95.0 -0.61 % 3.42 % LEVEL
gpu-chat-no-think greedy 51.6 51.4 -0.43 % 1.53 % LEVEL

The 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, sha256 58d0e24900e22b92....
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": false on 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: none over 96 lengths from 10 to 200 tokens; bench_concurrent four cells failed 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 500 at 111,720 and HTTP Error 503 at 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 of Q: serial fresh dd5ced43 equals resumed dd5ced43, drafted ec75f9ae equals ec75f9ae, each resumed arm carrying the engine's line sessions: 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, sha256 3621ea36...).
Eight weights_proj tensors 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

  • Overlay builder: it fetched at data_offsets[0], so all 108 tensors were shifted by each shard's 8 + header length; every name check passed and the engine refused it with UnknownCodebookMarker. Fixed; the byte gate now compares against the published source, 108 of 108 true.
  • Comparer: it counted 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).
  • Decode tool: temperature > 0 is refused unless TF_DSV41_SAMPLING=1, unset in both env files, so all four arms exited 1 with RuntimeError and every rank 0 log says stream error: Sampling. Fixed by the one-line off-sampling.env; the re-run is the 36-fingerprint row.

Limits

  • GB10 pair at TP=2 only. No Windows or macOS build, no other CUDA chip, no Metal or HIP.
  • TF_DSV41_CONTEXT=262144 in every cell, against the model's 1,048,576.
  • The baseline is derived, not published.
  • Speed: two boots an image for prefill and concurrent, six for decode (only one round QUIET); the floor is the resolution.
  • Setting-on speed is not claimed: main cannot serve that pack, so no main arm exists.

What we ask of upstream

  • Review against these receipts.
  • Run the same ABBA on a published all-EXL3 pack if you have one within reach; ours is derived, and that is gate 1's one caveat.
  • Say whether the fidelity instrument should be its own small pull request.
  • The gate for the second pull request when this one lands.

Detail in the next comment (RECEIPTS-DETAIL.md): receipt files, launch table, seam, memory, decode rows, overlap, full proofs.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change and pass after it. 16 mutants, one per decision: 16 of 16 killed on 30365d01a, carried here by the hunk identity, every file restored, git status 0 before and after.
  • Comments and docstrings are one line, no measurements or history. Lean 189 before and after, 0 new.
  • No personal data, machine names, internal hosts or local paths, no AI attribution; pr_check.py 0 errors, its one warning the Unreleased line.
  • Every token still goes through the lane rounds. The setting changes which launch a projection's rows go to, not the row or lane arithmetic, and nothing needs drafts off.
  • Drafted equals "draft": false, a resumed prompt equals a fresh one, concurrent equals solo: exactness: 4 PASS 0 FAIL.
  • No precision traded for speed. The added launch is the reference's own _plain, whose fp64 sum and roundings the seam measures equal to the fp64 reference.
  • Decode and prompt processing no slower than main at one stream and the widest admitted; with --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.

@BadAd84

BadAd84 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Receipt detail for the float-linear pull request

This is the second comment: the receipt files, the numbers behind the body's summaries, and the proofs in full.
It carries no claim the body does not make; it carries the working.

Where every number comes from

Files are named by their path inside the receipt set. Each section below names the files it uses.

  1. Branch and packet: git rev-parse float-linear-pr1d (head, tree, parent), git diff --stat 8c3e7b809..float-linear-pr1d,
    verify-hunks.py over the gated and the re-seated patch, and pairrun-tree.txt (base 077998f7d, head 42801695f).
  2. Open pull requests: overlap-now.json (450 open, 227 sharing a path) and overlap-lines.json (the line-range scan
    and the titles outside CHANGELOG.md), plus atc-overlap.json (the recorded merge test) and
    atc-overlap-077998f7d.json (the re-run that saw no working tree).
  3. Host gates: reseat-8c3e7b809/evidence/floatpr-seat4-steps.tsv and reseat-8c3e7b809/REPORT.md (every base and head step on
    the re-seated tree, zig fmt, git diff --check, lean, pr_check, the kernel contract, the aggregate), and
    logs/gates.out with logs/mutants.out for the gated tree's run,
    logs/lean-base.txt, logs/lean-head.txt, logs/lean-new.txt, logs/pr-check.log, logs/mutants.out,
    logs/mutant-m6-rerun.out.
  4. Gate 1: gate1-attempt3/gate1-attempt3-cell.log, gate1-attempt3/gate1/ (the four arms' receipts, .boot files,
    quiet.log, the pre-fix compares) and gate1-attempt3/receipts/g1/ (the corrected compares).
  5. Decode rounds: decode-abba/ (round r0), decode-abba2/r1/ and decode-abba2/r2/, their twelve *.boot files,
    decode-abba2/TABLE.txt, and decode-rounds-table.py, which reproduces TABLE.txt byte for byte from them.
  6. Speed table: gate1-speed.json and gate1-speed.md, produced by gate1-speed-table.py from the four arms.
  7. Pairwise comparer runs: gate1-pairs/ (twelve files, three pairs by four cells).
  8. Comparer proof: compare-arms.py and prove-compare-arms.py (four cases).
  9. Sampling: off-sampling.env (and receipts/off.env, which it is one line longer than), the four
    gate1-attempt3/gate1/*-rank0.log lines stream error: Sampling, and sampling-bisect/ (bisect.txt,
    serve-sampling.txt, boot.txt); receipts/on.env for the setting-on env.
  10. Plan proof: needs/base-off-r{0,1}.json, needs/head-off-r{0,1}.json, needs/head-on-r{0,1}.json,
    receipts/a/needs-on-vs-off-r0.txt, logs/aot-fill.log.
  11. Binaries: elf-sections.txt (the executable sections and the binary hashes of the two images).
  12. Setting-on cells: exacton-serial/receipts/on/ (exactness.txt, sane.txt, len-sweep.txt, concurrent.json,
    concurrent.txt, needles.txt, on.boot, boot-trace-rank{0,1}.txt), needle-probe/receipts/needle-probe/
    (needles.txt, serve-errors-after.txt), resume/receipts/resume-{serial,drafted}/.
  13. Fidelity: fidelity-attempt2/ (fidelity-report.json, out-{mixed,base}/digest-gate.txt, ref-base/capture.log)
    and fidelity/0002-forward-digests-dump.patch (the instrument).
  14. Derived pack: rebuilt-overlay/overlay-bytes.json, fidelity/logs/current-pack-bytes.txt,
    logs/derived-baseline.txt, logs/derived-baseline.json, the restage logs restage-v2-<rank>.log,
    canary-pass/, receipts/pack-float-bytes.txt, fidelity/BASELINE.md.
  15. Launches and seam: logs/probe.log, receipts/seam.txt, receipts/off.env.
  16. Refusals and results: receipts/base-off.boot, receipts/head-off.boot, gate1-attempt2/gate1/cell.log, and
    decode-abba2/RESULTS.tsv with its predecessors RESULTS.tsv.pre-gate1-correction, .pre-decode-row and
    .pre-resume-fix.

The files this change touches

plan.zig and names.plainOf: a float-only .weight becomes a native; a projection with an EXL3 form, rotation
scales, a rank split or in a DSpark block keeps its group. named.zig: those natives load as fp32 holding bf16 values,
twice their stored bytes. float_linear.zig and the three block emitters: one _plain launch a float projection into
the same columns of its buffer; a float member leaves the fused x and q launches; under RMS_FOLD the indexer's
wq_b is normed with _rms first. block_prefetch.zig: a float projection's source is its fp32 matrix whole.
aot_needs.zig: a second width table, so the new launches are enumerated. The setting's row in the shared table is
read by serve_knobs.floatLinear, default off, and is not a profile-registry entry.

The two binaries, and what the plan sees

From elf-sections.txt, read inside each image with no GPU:

item base image head image delta
tf-dsv41 sha256 29a652bb... dbe53c7c... different
tf-dsv41 size 67,895,056 67,958,992 +63,936
.text addr / size 0x37ea49c / 3,638,752 0x37ec4d4 / 3,646,004 start +0x2038, size +7,252
.rodata 41,548,656 41,556,584 +7,928
.data.rel.ro 63,528 63,944 +416
.got 32 32 0
executable total (.text + .plt) 3,640,960 3,648,212 +7,252

With the setting off the two images enumerate the same programs: aot-needs is byte-identical on all four rank files
(sha256 58d0e24900e22b92..., 78,626 bytes each), 78,968 programs, 123 kernel entries over 18 functions. With the
setting on it is 157,936 programs from those same 123 entries, with the same constexpr and runtime-type sets key for
key, and only the launch count of 120 of them moved (_plain's BF16-true entry 431,976 to 5,507,311). The AOT fill
compiled nothing new: needs 123, had 123, compiled 0, failed [].

Gate 1, per arm and per cell

Four arms, one fresh boot each, off.env, on the derived all-EXL3 pack. Boots READY after 142, 141, 136 and 137 s.
The cell's quiet log: 18 samples, every one rc=0 on both hosts. One line of the 23:03 attempt that finally ran:

error: kv: rank 1: boot growth 3.46 GiB measured (MemAvailable 5.44 at the check - pool 1.55 - 0.42 now);
worst serving point -0.48 GiB (post-boot reserve 0.00, TF_DSV41_POST_BOOT_GIB; dip 0.90,
TF_DSV41_SERVE_DIP_GIB; hard floor 2.0): the pool does not fit; the largest that does: TF_DSV41_POOL_TOKENS=0

The two earlier attempts were refused by that check while another session's builds held the host; no margin was
trimmed for them, and the third ran in a quiet window.

The prefill tool's rows: row 0 is phase: first (the cold one used in the table), rows 1 to 3 are repeats. Every row
reports cached_tokens: 0, a field this engine leaves 0 in every request, so "cold" rests on the fresh boot and the
row's phase.

Decode, round by round

Four cells, per round the four boots in ABBA order. base spread and head spread are the same-image gaps inside a
round; round gap is this versus main in that round.

cell round base1 head1 head2 base2 base spread head spread round gap census
fibonacci-raw seeded r0 59.2 58.2 57.2 58.5 1.19 % 1.88 % -1.89 % QUIET
fibonacci-raw seeded r1 56.7 57.5 57.5 56.8 0.13 % 0.00 % +1.39 % CONFOUNDED
fibonacci-raw seeded r2 56.0 55.7 57.0 57.4 2.46 % 2.24 % -0.61 % CONFOUNDED
gpu-chat-no-think seeded r0 53.4 52.9 52.8 53.8 0.86 % 0.11 % -1.44 % QUIET
gpu-chat-no-think seeded r1 52.6 52.4 53.0 52.5 0.23 % 1.10 % +0.35 % CONFOUNDED
gpu-chat-no-think seeded r2 52.0 52.3 52.3 51.9 0.17 % 0.08 % +0.73 % CONFOUNDED
fibonacci-raw greedy r0 96.3 94.3 97.6 96.4 0.13 % 3.42 % -0.42 % QUIET
fibonacci-raw greedy r1 95.9 95.2 94.0 95.3 0.66 % 1.22 % -1.02 % CONFOUNDED
fibonacci-raw greedy r2 95.8 94.7 94.4 94.0 1.80 % 0.33 % -0.38 % CONFOUNDED
gpu-chat-no-think greedy r0 52.0 51.8 52.6 52.1 0.20 % 1.53 % +0.25 % QUIET
gpu-chat-no-think greedy r1 51.4 50.9 50.9 51.4 0.11 % 0.04 % -1.01 % CONFOUNDED
gpu-chat-no-think greedy r2 51.7 51.2 51.1 51.2 0.90 % 0.15 % -0.55 % CONFOUNDED

Aggregate over all three rounds, six boots an image: main 57.4, this 57.2 (-0.39 %, floor 2.46 %) on fibonacci-raw
seeded; 52.7 against 52.6 (-0.13 %, floor 1.10 %) on gpu-chat-no-think seeded; 95.6 against 95.0 (-0.61 %, floor
3.42 %) and 51.6 against 51.4 (-0.43 %, floor 1.53 %) on the two greedy cells. The main-vs-main control per round is
1.19 %, 0.13 % and 2.46 % on the fibonacci seeded cell and 0.86 %, 0.23 % and 0.17 % on the chat seeded cell. The
within-image range across all six boots is up to 5.5 % (base) and the per-rep spread at T=1 is 15 % to 26 %.
The QUIET-only aggregate is the two-boot reading: -1.89 % and -1.44 %, both with disjoint True, which is why one
round looked like a cost; the per-round gaps on the seeded fibonacci cell are -1.89 %, +1.39 % and -0.61 %. Every round's comparison is 36 fingerprints, 0 differing.

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
(base1, head1, head2, base2 in each round).

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 body

Built by gate1-speed-table.py from the four arms' tool output. The same-image spread is the floor; one concurrent
cell (chat 4 streams, +2.5 %, floors 0.6 % and 1.1 %) reads faster than its floor and is not claimed as a gain. No
cell reads slower than its floor.

The seam on the device

With the reference's own _plain and the AOT fill's launch options (num_warps 2, num_stages 3,
enable_fp_fusion true), on this pack's own matrices widened to fp32 and 64 random bf16 rows, layers 2, 20 and 24:

  • a row alone, in a launch of 8 rows at another position and in a launch of 64: identical bits, every projection;
  • BF16 true against BF16 false followed by the prefill glue's cast: 0 of 81,920 values differ for wq_a,
    0 of 32,768 for wkv, 0 of 8,192 for wk, 0 of 262,144 for wq_b;
  • the fp64 output against numpy's fp64 product: worst relative difference 0.000e+00;
  • _rms against _rms2's q output: 0 of 81,920 bf16 values differ.

The launches the setting adds, from the emitters by a probe test outside this change (decode windows of 1, 8 and 64
rows, prompt segments of 16 and 512 rows), all BK 256, PDL false, BF16 true, w_rs = K:

projection layers outputs K x_rs out row stride, first column
attn.wq_a 2, 8, 14, 20, 24, 28, 32, 36 1,280 5,120 5,120 1,280, 0
attn.compressor.wkv, ratio 2 2, 8, 14 512 5,120 5,120 decode 1,024, 0; prompt 512, 0
attn.compressor.wgate, ratio 2 2, 8, 14 512 5,120 5,120 decode 1,024, 512; prompt 512, 0
attn.compressor.wkv, ratio 1 20 512 5,120 5,120 512, 0
attn.indexer.wk 2, 8, 14, 20 128 512 512 128, 0
attn.indexer.wq_b 2, 8, 14, 20, 24, 28, 32, 36 4,096 1,280 1,280 4,096, 0

The fp32 copies, and where the pool check sees them

The 27 matrices are 225,968,128 bytes as stored (215.50 MiB) and 451,936,256 bytes as loaded (431.00 MiB), whole on
every rank. The plan counts them at their stored size; the loader widens them; the pool check reads MemAvailable after
the weights are resident, so it already holds the widened bytes. The setting-on boot trace shows the weights step at a
drop of 103.292 GiB on rank 0 and 107.005 GiB on rank 1, device 98.64 GiB in 2,406 driver allocations; the
boot ends at MemAvailable 5.31 GiB on rank 0 and 4.98 GiB on rank 1, device 103.87 GiB on both.

The derived pack

The overlay is 108 tensors over 8 shards, 70,985,836 bytes fetched, 70,996,476 bytes written, sha256
3621ea3627eab138cb18079fb8af959de653ec943ec035810014d90fbe8d3e37, and byte-for-byte equal to the published
source at the true safetensors offset (tensors 108, true 108, shifted 0, neither 0). Four host gates pass on both
ranks: places 27, overlay_tensors 108, hardlinked 46, copied 0; the byte gate above; 192,522 tensors with
47,900 groups carrying a trellis, all 47,900 markers 0x83dcd12d, loader mirror: 0 error(s), 0 note(s);
verify-pack --expect all-exl3 192,495 tensors over 40 shards, total_size 210,735,685,708, form: all-EXL3.
It resolves inside the base image (entries 49, index 13,963,464 bytes) and the base image serves it:
READY after 168 s, loaded in 164.9s, /health with "warming": false. The builder defect and its fix are in the
body; the discrimination is fidelity/logs/current-pack-bytes.txt (108 shifted, 108 FAIL lines) against
rebuilt-overlay/overlay-bytes.json (108 true, 0 shifted).

The comparer defect, in full

The first pass over the four arms counted 4 differing fingerprints in each prefill cell and 30 in concurrent. Every
one is tool_sha256, which reads None in all four arms:

DIFFER /rows/0/tool_sha256: base1=None  head1=None  head2=None  base2=None

The fixed comparer prints ABSENT ... no arm emits it (not a difference) and does not count it, while a field present
in some arms and absent in others still fails. prove-compare-arms.py asserts four cases against the real comparer:
absent everywhere passes, equal in all passes, present in one arm fails, a real difference fails. The corrected
re-run over the same receipts is 17, 17 and 300 fingerprints with 0 differing, and the pairwise runs are in
gate1-pairs/. The chain's own row was rewritten to DONE with this detail after that correction, and the file it replaced is kept
as RESULTS.tsv.pre-gate1-correction, so both the verdict as first recorded and the corrected one are in the tree.

The sampling defect, in full

All four decode arms exited 1 with RuntimeError and no reason. Patched to surface the server's frame, the log names
it: [tensorfold] stream error: Sampling, on base and head alike, with reason=error (Sampling) on every ended
request. A parameter bisect on its own boot pins the cause to temperature > 0 alone:

OK    A temp0 control            first=... last=DONE
ERROR B temp1 bare               {"message": "Sampling", "type": "server_error"}
ERROR C temp1 seed               {"message": "Sampling", "type": "server_error"}
ERROR D temp1 top_k20 top_p.95   {"message": "Sampling", "type": "server_error"}
ERROR E temp1 top_p.95 only      {"message": "Sampling", "type": "server_error"}
OK    F temp0 seed               first=... last=DONE
ERROR G temp1 top_k20 only       {"message": "Sampling", "type": "server_error"}
ERROR H temp1 ignore_eos         {"message": "Sampling", "type": "server_error"}

So both temperature 0 cases pass, with and without a seed, and every temperature 1 case fails whatever else it
sets. TF_DSV41_SAMPLING=1 is the switch, and neither env file set it. off-sampling.env is off.env with exactly
one line added (TF_DSV41_SAMPLING=1, sha256 c2d998f5b2f1b435); the decode cell then ran and compared 36
fingerprints, 0 differing.

The overlap, line by line

The recorded atc overlap run, the patch on 08f1de594 at 10:08 UTC, reports 19 changed files, 59 open pull
requests sharing a file, and 4 hard conflicts, each in CHANGELOG.md (#2415, #1038, #2571, #2279), with the
snapshot partial; that is the merge test of record. Separately, a fresh file-level scan of the 450 open pull
requests (overlap-now.json, not an atc result) finds 227 sharing a path: 186 CHANGELOG.md, 69
zig/src/platform/environment.zig, 15 docs/profiles.md, and six or fewer each of the DeepSeek-V4.1 files. The line-range scan of those 227 patches (it
over-reports by construction: two insertions at one line always intersect) finds 144 touching a line this change
touches: 138 in CHANGELOG.md, and six pull requests in four DeepSeek files, plan.zig 5, block.zig 4,
env_validate_test.zig 2, serve_knobs.zig 1, being the five drafts #3530 to #3534 (the release weights series) and
#3557 (the settings validator); no other file has a hit. The atc re-run on 077998f7d returned changedFiles: null with workingTreeUnavailable and six limitations, so the
recorded run above is the merge test of record. It has not been re-run on this head, which was cut on a main 611 commits later.

The host gates, step by step

From reseat-8c3e7b809/evidence/floatpr-seat4-steps.tsv, one zig build <step> --summary all an invocation, pristine
8c3e7b809 then this head, every step exit 0: test-dsv41-device-host 224 to 229, -cuda-host 410 to 423, -draft
149 to 152, -forward 184 (1) to 189 (1), -shared 102 (1) to 105 (1), -env-host 14 to 14, -state 4, -kv 29,
-bounds-host 6, -wait-reasons-host 2, test-environment-host 26, test-environment-report-host 41,
test-golden 5/5 steps, compile-dsv41-server 8/8, -tool 6/6, -cuda 6/6, -device-host 6/6. zig fmt --check
and git diff --check are clean on both, lean is 6,857/189 against 6,858/189 with 0 new (main's own count fell from
191 to 189 between the seats), and pr_check.py reports 0 errors and 1 advisory warning naming the missing PR number.

test-kernel-contract ran on this head and passes: 36/36 steps, 256/256 tests, 299 s (main added five tests to it
since the previous seat's 251).

The aggregate and the mutants were measured on 30365d01a, the previous seat, and are NOT re-run here. They carry to
this tree by the hunk identity below: zig build test test-golden, 725/725 steps succeeded; 10510/10588 tests passed (78 skipped), rc 0, 1182 s (reseat-4fda6a020/evidence/floatpr-seat3-steps.tsv); and sixteen of sixteen mutants
killed, every row KILLED restored=True with the named step's exit 1, all mutants killed, rc 0, with the chain's own
close mutants done; git status after: 0 files and head still 30365d01a27e01750b3e8226d257b9dc763b3411, tree 4cabbdbaa52e465a6547b55e8772cf848fd2d485 (reseat-4fda6a020/evidence/floatpr-seat3-mutants.out and
reseat-4fda6a020/evidence/logs/chain.txt). The multirank RoCE timeout seen on the seat before that did not recur on
an idle box; it is not any of these seats' result and is not claimed as one. The seat before 30365d01a was cut by
that lane's one-hour cap after twelve verdicts, so its record is kept only as MUTANTS-479cee44b.md.

The bridge from 30365d01a's tree 4cabbdbaa to this tree fec2d8ba5: 16 of the 18 non-CHANGELOG hunks are
byte-identical to the gated patch, and CHANGELOG.md, docs/profiles.md and environment.zig are context-only with
the same added and removed lines (2/0, 3/1 and 1/0). docs/profiles.md and environment.zig are files main changed in
its 173 commits, so the moved set is fully accounted for.

The served numbers in this receipt were measured on the images built from the pre-reseat tree bd6cf6af1 (commit
42801695f). Its base is 077998f7d, and 077998f7d to 8c3e7b809 is 611 commits across 1,206 files, so the two
trees differ everywhere outside this change; the bridge is the hunk identity above, 16 files byte-identical and three
context-only.

What is not in this receipt

  • Speed with the setting on, and the drafter-on against drafter-off clause.
  • Windows and macOS builds, and any chip other than GB10.
  • A published all-EXL3 pack: the baseline here is derived.

@BadAd84

BadAd84 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

A re-run of the merge test on this head, as upstream's steps ask. atc overlap --json ran from a full clone of upstream with this branch (5fe7fbc37) checked out. It is read-only and exited 0.

This branch itself conflicts with current main (144964f8d) in CHANGELOG.md only. main is 132 commits past the branch's base 8c3e7b809. We have not re-seated again: the changelog line is the ordinary merge at landing, and we will re-seat if you prefer.

This replaces the earlier "four conflicts, all in CHANGELOG.md" line in the detail comment above. That line came from the earlier run on a different base.

@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

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.

  • Synthena

@AIFlowML

Copy link
Copy Markdown
Contributor

On M5 Max with Zig 0.17.0, the trial merge of 5fe7fbc3 into d26d5b06b had a single conflict in CHANGELOG.md. I kept main's changelog in scratch and ran this against the combined sources:

zig build test-dsv41-cuda-host test-dsv41-env-host test-environment-host \
  compile-dsv41-cuda -Dcpu=apple_m1 -j5 --summary all

All 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: TF_DSV41_FLOAT_LINEAR is in the startup registry and the changelog, and a row in docs/environment.md would give readers the accepted forms and default beside the other DeepSeek switches.

Igor Lessio - AIFLOW LABS

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks @BadAd84 for the detailed receipts, and for rerunning the merge test on this head.

The gate is resolved:

  • TF_DSV41_FLOAT_LINEAR is off by default (serve_knobs.zig:177-178), and a pack with it unset behaves as on main and is still refused (plan.zig:212).
  • The plan tests cover both settings (plan.zig:421 and :447), as do the AOT-needs tests.

One thing is still open: we don't see a CI run at 5fe7fbc37 yet. Please post the checks once they finish green at this head; that's the last step before landing.

  • Synthena

BadAd84 and others added 2 commits November 21, 2026 08:16
… 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.
@ashhart
ashhart merged commit fa13df5 into ashhart:main Nov 21, 2026
2 of 11 checks passed
@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants