From 838c388c560da6dfc9ec26ec396e95a795ecd439 Mon Sep 17 00:00:00 2001 From: wakesync <60821182+wakesync@users.noreply.github.com> Date: Sun, 29 Nov 2026 02:48:23 +0000 Subject: [PATCH 1/6] research: PREREG for #240 packed DeltaNet trace reference (one head, layer 0, 4 tokens) --- .../PREREG.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/PREREG.md diff --git a/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md b/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md new file mode 100644 index 00000000..92ab4c4c --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md @@ -0,0 +1,47 @@ +# PREREG: 20261129-240-qwen-packed-trace-ref +Issue: #240. Lane: packedref. Date (UTC): 2026-11-29 02:45. Base commit: 02d62eb63760fcaf68f47099c70f42aba04a7707 (origin/main). + +## Hypothesis +A CPU reference that lays out the packed DeltaNet trace of one V head (layer 0, V head 0, real stock weights, the first 4 tokens of the fixture prompt, from sequence start) as signed-byte limbs, array by array as DESIGN 7.3 and `research/operators/qwen_m3/count_m3.py` `deltanet_limbs('per_token')` describe, and that also lays out the floor remainders the head's relations need but the design does not list, produces a limb count per V head per token within 10% of the design's 85,861.33, with every limb in its class. + +## Metric +The design's count, read from main (checked by this lane, `count_m3.packed(..., strategy='per_token')` reproduces 95,057,841.16 entries per token, DeltaNet mixer share 88.07%, limbs per V head per token 85,861.33, overhead 1.2696): + +| array (design) | per V head per token | limbs per value | design limbs | +|---|---|---|---| +| state S' (D x D) | 16,384 | 3 | 49,152 | +| floor remainder of S' (12-bit, committed) | 16,384 | 2 | 32,768 | +| per value channel j: conv out c_v, v, M, delta, o, w, s, t, y | 128 each | 3,3,3,3,3,2,2,3,4 | 3,328 | +| q/k path of the QK head (shared by 3 V heads, /3): conv out q, conv out k, SiLU q, SiLU k, q^, k^ | 128 each | 3,3,2,2,2,2 | 597.33 | +| scalars | not listed by the design | | 16 | +| total | | | 85,861.33 | + +The reference (new directory `research/operators/qwen_packed_ref/`, numpy and Python integers) lays out, per token: +- A. every array of the table above, with the design's limb count, filled from the harness head's integer values; +- B. the scalars (the design counts a flat 16 and does not list them). Registered list and widths: a 2, beta 2; output norm sigma 3, Rc 5, e1 3, e2 3, rr 3, gap 3; q norm (the M2 isqrt form of IntHead.l2n, no Rc) sigma 3, e1 3, e2 3; k norm sigma 3, e1 3, e2 3 (42 limbs; the q/k scalars counted per V head, not shared). sigma of q is the isqrt before the factor 46,341. ar, br, z and the conv inputs xq, xk, xv are in_proj outputs, which count_m3 counts in the dense part, so they are not laid out here; +- C. the floor remainders the head's relations need that the design does not list. Registered widths: per value channel, remainders of M (divisor 2^24, 4 limbs), delta (2^12, 2), o (2^12, 2), conv out c_v (2^12, 2), w (2^24, 4), t (2^12, 2), y (2^8, 2): 18 limbs x 128 = 2,304; q/k path (/3): conv remainders of q and k (2^12, 2 each), the L2-norm rounding remainders (IntHead.l2n: 2 u 2^12 s' + s = 2 s k + r, r in [0, 2 s); for q s = 46,341 sigma and the numerator carries 2^12 more, 5 limbs; for k 3 limbs): 12 x 128 / 3 = 512. + +Class of a value with n limbs: the balanced signed-byte digits l_i in [-128, 127], x = sum l_i 256^i, produced by l = ((x + 128) mod 256) - 128, x <- (x - l) / 256, n times; the value is in class iff the residue after n digits is 0 (3 limbs: -8,421,504 .. 8,355,711; 2 limbs: -32,896 .. 32,639, the upstream "two limbs end at 32,639" of docs/model.md). A remainder is also checked against its exact class [0, divisor). Every value is recomposed from its limbs and compared with the harness value exactly. + +Primary number: built limbs per V head per token = A + B + C, and ratio built / 85,861.33. Also reported: per-array counts next to the design's, max |value| and max |limb| per array, the count of A alone, and the full-model entries per token with the built per-head figure substituted in count_m3's formula (48 V heads x 48 DeltaNet layers / 3 limbs per entry x the planner overhead 1.2696, the dense parts unchanged). That full-model number is a COUNT; the overhead factor and the dense parts are not built here. + +Harness values: `experiments/20261109-8-qwen-real-weights/real_head.py` `IntHead` (PR #68, merged; the M2 contract of `research/operators/qwen_deltanet_m2/head_reference.py` on real weights, F = 12, tap scale 2^12), imported unchanged. The reference steps the head token by token with IntHead's own methods to obtain the intermediates (conv out, SiLU, q^, k^, a, beta, M, delta, S', o, w and the norm scalars), and checks that its S', o and y equal `run_int`'s outputs exactly at every token. The design's M3 gated-norm values s, t, y have no harness counterpart (M2 has cg and y = floor(cg w / 2^12)); this reference forms them as DESIGN 5.4 says: s = SiLU(z) at 2^12 by IntHead.silu, t = floor(s w / 2^12), y = floor(gain_int t / 2^8), gain_int = row 0 entries 1536..1663 of PR #231's table M (RNE(2^8 sqrt(128) gain), exponent 8 in PR #231's summary). These three are labelled "derived here, not harness values". + +Input: stock Qwen/Qwen3.8-27B at the pinned revision 37561816e66b5b9153b1b64c10968c18c1e6f4a0, layer 0, V head 0 (QK head 0). Weights: PR #231's head-0 data, read only, each tensor's SHA-256 checked against the merged `experiments/20261109-8-qwen-real-weights/runs/stream-stock.json`, and M.i32 against `experiments/20261121-229-qwen-m3a1-weight-side/runs/weights-head0.json`. Tokens: the first 4 of PR #124's fixture prompt `FIXTURE = [760, 6511, 314, 14898, 369]` ("The capital of Italy is", `experiments/20261110-8-qwen-q1-deep-fidelity/q1_forward.py`), so 760, 6511, 314, 14898. Head inputs as PR #68's `inproj` and `heads`: float64 zero-centred RMSNorm of the embedding rows with `layers.0.input_layernorm.weight`, the in_proj matmuls, quantised to 2^12 by IntHead. + +## Acceptance threshold +PASS if both hold: (1) 0.9 <= built / 85,861.33 <= 1.1; (2) every limb of every value in A, B and C is in its class, every remainder in its exact class, and every recomposition equals the harness value (and S', o, y equal run_int's outputs). Each is reported PASS / FAIL separately. + +## Kill criterion +Ratio outside [0.9, 1.1], or any limb out of class on these real inputs: report FAIL (the issue's negative result) and stop; nothing is changed to make it pass. Could not be built (for example a value the design lays out has no harness counterpart and cannot be formed): report exactly where it stopped. Lane hard stop 2026-11-29 04:50 UTC. + +## Runs +The computation is deterministic integer arithmetic, so there is no variance to measure. Registered run: one run on the registered input (runs/real-head0-T4.json), then the same command 4 more times into separate files to show byte-identical counts and maxima (n = 5, all must agree). Debug only, before the registered run: synthetic Gaussian in_proj outputs (numpy seed 240, T = 4) with the same real head weights, into runs/debug-synthetic.json; the registered input is not run before the registered run. Checker controls (also registered, run once): a 2-limb value 32,640 and -32,897 and a 3-limb value 8,355,712 must be reported out of class; a remainder equal to its divisor must be reported out of class; a recomposition with one limb changed must be reported unequal. + +## Prior art +DESIGN 7.3 and count_m3.py give the packed count by arithmetic only; no code has laid the arrays out. The upstream GPU prover writes committed cells as signed bytes, three to a packed entry (docs/format/11-1-machinery.md, `LANES`, and "In the programs a cell is a signed byte"). zkLLM, EZKL, Jolt and Expander use their own field encodings and have no Gated DeltaNet trace; nothing comparable exists for this recurrence. PR #68 measured layer-0 maxima (13-token prompts, F = 12) that bound what this run can see. + +## What is NOT in this step +No proof, no relation, no CUDA, no sumcheck or lookup arrays: the factor 1.27 and the dense parts of the full-model figure are taken from the design unchanged, not built. Not the low-rank form, not the chunk-boundary handoff, not other heads or layers, not accuracy. Four tokens from sequence start on one head is not a worst case for any range; a PASS says the layout's limb widths hold on these inputs, not on all inputs. The M3 changes other than the gated norm (the 362-scaled q, the cA decay path, function tables keyed on cells) are not applied: the arrays are filled from the M2 harness values, which the design's per-array widths are meant to hold. + +## Amendments From 3b3a2e34a786de7b874696315a3deb68e3bd76d4 Mon Sep 17 00:00:00 2001 From: wakesync <60821182+wakesync@users.noreply.github.com> Date: Sun, 29 Nov 2026 02:56:48 +0000 Subject: [PATCH 2/6] research: #240 PREREG amendment A1 (debug finding on s, before the registered run) --- experiments/20261129-240-qwen-packed-trace-ref/PREREG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md b/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md index 92ab4c4c..89feb359 100644 --- a/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md +++ b/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md @@ -45,3 +45,5 @@ DESIGN 7.3 and count_m3.py give the packed count by arithmetic only; no code has No proof, no relation, no CUDA, no sumcheck or lookup arrays: the factor 1.27 and the dense parts of the full-model figure are taken from the design unchanged, not built. Not the low-rank form, not the chunk-boundary handoff, not other heads or layers, not accuracy. Four tokens from sequence start on one head is not a worst case for any range; a PASS says the layout's limb widths hold on these inputs, not on all inputs. The M3 changes other than the gated norm (the 362-scaled q, the cA decay path, function tables keyed on cells) are not applied: the arrays are filled from the M2 harness values, which the design's per-array widths are meant to hold. ## Amendments + +A1 (2026-11-29 02:57 UTC, after the debug run on synthetic inputs, before the registered run; nothing registered is changed). The debug run (runs/debug-synthetic.json, synthetic Gaussian in_proj outputs at scale 4, seed 240) put 16 of 512 values of s = SiLU(z) outside the design's 2-limb class (max 48,986 against 32,639). This is recorded now so it is not read as found after the registered run. Note also, from DESIGN 5.4 itself: the pinned SiLU table's largest output is 32,741, which is above the 2-limb class's top 32,639, so even a table-bounded s does not fit 2 signed-byte limbs. The registered widths and the threshold stay as registered: an out-of-class s on the registered input is a FAIL of criterion 2, reported as such. The checker controls ran before the registered run (runs/controls.json, all ok). From 1501cc4a46e587a14aa99abb8d97a361b487331c Mon Sep 17 00:00:00 2001 From: wakesync <60821182+wakesync@users.noreply.github.com> Date: Sun, 29 Nov 2026 02:56:48 +0000 Subject: [PATCH 3/6] research: #240 packed trace reference code, input hashes, checker controls, synthetic debug run --- .../runs/controls.json | 57 + .../runs/debug-synthetic.json | 994 ++++++++++++++++++ .../runs/inputs.json | 110 ++ .../operators/qwen_packed_ref/packed_ref.py | 306 ++++++ research/operators/qwen_packed_ref/prepare.py | 102 ++ 5 files changed, 1569 insertions(+) create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/controls.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/debug-synthetic.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/inputs.json create mode 100644 research/operators/qwen_packed_ref/packed_ref.py create mode 100644 research/operators/qwen_packed_ref/prepare.py diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/controls.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/controls.json new file mode 100644 index 00000000..de739ec9 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/controls.json @@ -0,0 +1,57 @@ +{ + "utc_start": "2026-11-29T02:55:17Z", + "controls": { + "32639@2": { + "in_class": true, + "expected": true, + "ok": true + }, + "-32896@2": { + "in_class": true, + "expected": true, + "ok": true + }, + "32640@2": { + "in_class": false, + "expected": false, + "ok": true + }, + "-32897@2": { + "in_class": false, + "expected": false, + "ok": true + }, + "8355711@3": { + "in_class": true, + "expected": true, + "ok": true + }, + "8355712@3": { + "in_class": false, + "expected": false, + "ok": true + }, + "-8421504@3": { + "in_class": true, + "expected": true, + "ok": true + }, + "-8421505@3": { + "in_class": false, + "expected": false, + "ok": true + }, + "remainder_eq_divisor": { + "out_of_exact_class": true, + "ok": true + }, + "changed_limb": { + "recomposes_equal": false, + "ok": true + }, + "unchanged_limb": { + "ok": true + }, + "all_ok": true + } +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/debug-synthetic.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/debug-synthetic.json new file mode 100644 index 00000000..e3f92b39 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/debug-synthetic.json @@ -0,0 +1,994 @@ +{ + "utc_start": "2026-11-29T02:56:33Z", + "input": "synthetic in_proj outputs, numpy seed 240, real head-0 weights (debug only)", + "summary": { + "mode": "debug", + "T": 4, + "design_limbs_per_v_head_per_token": 85861.33333333333, + "design_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333334, + "scalars": 16 + }, + "built_limbs_per_v_head_per_token": 88703.33333333333, + "built_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333333, + "scalars": 42, + "remainders_not_in_design": 2816.0 + }, + "built_A_only": 85845.33333333333, + "ratio_built_over_design": 1.0330998819802473, + "ratio_A_only_over_design": 0.9998136530219268, + "design_entries_per_token": 95057841.1641135, + "entries_per_token_with_built_head_COUNTED": 97828891.86345139, + "entries_ratio": 1.029151205891093, + "overhead_factor_from_design": 1.2695773861469135, + "out_of_class_arrays": [ + "s_gate" + ], + "criterion1_count_within_10pct": true, + "criterion2_limbs_in_class": false, + "detail": { + "all_limbs_in_class": false, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "harness_equal": true + } + }, + "arrays": [ + { + "array": "S", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 49152, + "design_limbs_per_v_head_per_token": 49152, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 1641, + "min_value": -493, + "max_value": 1641, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rS", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 32768, + "design_limbs_per_v_head_per_token": 32768, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "conv_v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 5094, + "min_value": -1802, + "max_value": 5094, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3954, + "min_value": -706, + "max_value": 3954, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "M", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 1142, + "min_value": -287, + "max_value": 1142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 118, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "delta", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2302, + "min_value": -348, + "max_value": 2302, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "o", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 43, + "min_value": -14, + "max_value": 43, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 43, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "w", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2668, + "min_value": -1125, + "max_value": 2668, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "s_gate", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 48986, + "min_value": -1141, + "max_value": 48986, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 16, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "t", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 5358, + "min_value": -2455, + "max_value": 5358, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "y", + "group": "A", + "limbs_per_value": 4, + "design_limbs_per_value": 4, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": 512, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 54228, + "min_value": -25279, + "max_value": 54228, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_q", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 10314, + "min_value": -10314, + "max_value": 7370, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_k", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 9220, + "min_value": -8278, + "max_value": 9220, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_q", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 6324, + "min_value": -1139, + "max_value": 6324, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_k", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 8342, + "min_value": -1138, + "max_value": 8342, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "q_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 262, + "min_value": -78, + "max_value": 262, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "k_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2490, + "min_value": -633, + "max_value": 2490, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "a", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 4096, + "min_value": 0, + "max_value": 4096, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 19, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "beta", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 3213, + "min_value": 0, + "max_value": 3213, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 115, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 66, + "min_value": 0, + "max_value": 66, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 66, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_Rc", + "group": "B", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 5, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 1462116526, + "min_value": 0, + "max_value": 1462116526, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 124, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 126, + "min_value": 0, + "max_value": 126, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 41, + "min_value": 0, + "max_value": 41, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 41, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_rr", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 64, + "min_value": 0, + "max_value": 64, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 64, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_gap", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 34, + "min_value": 0, + "max_value": 34, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 34, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 8751, + "min_value": 0, + "max_value": 8751, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 98, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 10529, + "min_value": 0, + "max_value": 10529, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 62, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 11440, + "min_value": 0, + "max_value": 11440, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 17328, + "min_value": 0, + "max_value": 17328, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 102, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 30625, + "min_value": 0, + "max_value": 30625, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 120, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 12777, + "min_value": 0, + "max_value": 12777, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 84, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rM", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16756791, + "min_value": 0, + "max_value": 16756791, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rdelta", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4082, + "min_value": 0, + "max_value": 4082, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ro", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_v", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4090, + "min_value": 0, + "max_value": 4090, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rw", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 15760416, + "min_value": 0, + "max_value": 15760416, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rt", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4080, + "min_value": 0, + "max_value": 4080, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ry", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 252, + "min_value": 0, + "max_value": 252, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_q", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4091, + "min_value": 0, + "max_value": 4091, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_k", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4090, + "min_value": 0, + "max_value": 4090, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_qhat", + "group": "C", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 213.33333333333331, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 811031733, + "min_value": 0, + "max_value": 811031733, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_khat", + "group": "C", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 34224, + "min_value": 0, + "max_value": 34224, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + } + ], + "harness_checks": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + } + ], + "source_sha256": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d" +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/inputs.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/inputs.json new file mode 100644 index 00000000..487c1684 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/inputs.json @@ -0,0 +1,110 @@ +{ + "repo": "Qwen/Qwen3.8-27B", + "rev": "37561816e66b5b9153b1b64c10968c18c1e6f4a0", + "tensors": { + "model.language_model.layers.0.linear_attn.A_log": { + "shape": [ + 48 + ], + "sha256": "429d53cd15ec0ea1a2d638100c3bbdf8d53505e69110fb17ee09d055c1fdbd34", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.conv1d.weight": { + "shape": [ + 10240, + 1, + 4 + ], + "sha256": "803a2591c4f5e7b1c2a7bdbbad78bbd0b68acdd0deab9552933ee7c337489dad", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.dt_bias": { + "shape": [ + 48 + ], + "sha256": "969ce6b2149d20f0c365373fd89613167e373905c15f0e1cf5af62adf52228de", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.in_proj_a.weight": { + "shape": [ + 48, + 5120 + ], + "sha256": "ff9e6d0a05fc85c2a61e5f73200d6778c84d76df3df2ce6c80e1e9a4c99c0ce1", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.in_proj_b.weight": { + "shape": [ + 48, + 5120 + ], + "sha256": "9694f11c0393c563dcbc8c1ba120c2eaebc36b200d6d19bf8761034acde4ac33", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.in_proj_qkv.weight": { + "shape": [ + 10240, + 5120 + ], + "sha256": "2417986b44e8f6cd23a1ae5230515a9d5d1ed074aaf573f2ee308c1d9d41c9e2", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.in_proj_z.weight": { + "shape": [ + 6144, + 5120 + ], + "sha256": "2b98edf85caa94f5bf81b46865b24202d4fc80117c406a3a814f83adbda56b53", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.linear_attn.norm.weight": { + "shape": [ + 128 + ], + "sha256": "70d11f294923a94aac97bedd27e596dbf496746c6b9e3b2b7c38798a0d2522cc", + "source": "PR #231 data, read only", + "match": "stream-stock.json" + }, + "model.language_model.layers.0.input_layernorm.weight": { + "shape": [ + 5120 + ], + "sha256": "853b5989bfb677b1761540ee97c09bbf8d90fd825c9ae6ca74ef5853cba3c075", + "source": "fetched", + "match": "stream-stock.json" + } + }, + "embedding_rows": { + "760": { + "range": "bytes=7782552-7792791", + "sha256": "69f7c987fa3baa37a4e7586b5be51aa1e6b028d58e1c3a20a685da82364b716a", + "match": "experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json" + }, + "6511": { + "range": "bytes=66672792-66683031", + "sha256": "a0c791763798ec8b916f0a216e7961ffb251578188520bf6860d92335b004229", + "match": "experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json" + }, + "314": { + "range": "bytes=3215512-3225751", + "sha256": "78b25fa83df9bc46f3c34b4a636d075f89144e0705336fa204c508072ff2cd18", + "match": "experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json" + }, + "14898": { + "range": "bytes=152555672-152565911", + "sha256": "93c568d0a4882fb159024909cc1fd15ccc37e428b27b8d011cea25dd9084e161", + "match": "experiments/20261114-204-int-attn-heldout/runs/debug-fixture/manifest-stock.json" + } + }, + "M_i32": { + "sha256": "ac11d7b74075bcd804bdacd8f5a6d871ac86a4f21d798483f755b3661d7c050d", + "match": "weights-head0.json" + } +} diff --git a/research/operators/qwen_packed_ref/packed_ref.py b/research/operators/qwen_packed_ref/packed_ref.py new file mode 100644 index 00000000..55f4028c --- /dev/null +++ b/research/operators/qwen_packed_ref/packed_ref.py @@ -0,0 +1,306 @@ +#!/usr/bin/env python3 +"""CPU reference of the packed DeltaNet trace of ONE V head (issue #240). Research only: no proof, no relation. + +What it does, per token: takes the harness head's integer values (PR #68 `real_head.py` IntHead, the M2 contract, +F = 12, imported unchanged), lays out every array that DESIGN 7.3 / `research/operators/qwen_m3/count_m3.py` +`deltanet_limbs('per_token')` counts, as balanced signed-byte limbs, recomposes each value from its limbs and compares +it with the harness value exactly, checks every limb's class, and counts limbs per V head per token. It also lays +out the scalars and the floor remainders that the head's relations need and the design does not list (PREREG B, C). + +Layout of one value with n limbs: l = ((x + 128) mod 256) - 128, x <- (x - l) / 256, n times. The value is in its +class iff nothing is left after n limbs (2 limbs: -32,896 .. 32,639; 3 limbs: -8,421,504 .. 8,355,711). + +Usage: + packed_ref.py controls + packed_ref.py debug synthetic in_proj outputs, seed 240 (debug only) + packed_ref.py real registered input (refuses to overwrite) +""" +import datetime, hashlib, importlib.util, json, math, os, sys +from pathlib import Path +import numpy as np + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[2] +sys.path.insert(0, str(ROOT / "experiments" / "20261109-8-qwen-real-weights")) +import real_head as RH # noqa: E402 (PR #68, unchanged) + +_spec = importlib.util.spec_from_file_location("count_m3", str(ROOT / "research/operators/qwen_m3/count_m3.py")) +CM = importlib.util.module_from_spec(_spec); _spec.loader.exec_module(CM) + +D, F, T = 128, 12, 4 +ONE = 1 << F +TOKENS = [760, 6511, 314, 14898] # first 4 of q1_forward.py FIXTURE +P = "model.language_model." +GAIN_EXP = 8 # PR #231 summary: gain_sqrt128 exponent 8 +DESIGN_TOTAL = None # filled from count_m3 at run time + + +# ---------------------------------------------------------------- limbs +def limbs(x, n): + """x: int64 array. Returns (digits (n, ...), residue). Exact integer arithmetic.""" + x = np.asarray(x, dtype=np.int64).copy() + ds = [] + for _ in range(n): + l = np.mod(x + 128, 256) - 128 + ds.append(l) + x = (x - l) // 256 + return np.stack(ds), x + + +def recompose(ds): + acc = np.zeros(ds.shape[1:], dtype=np.int64) + for i in range(ds.shape[0] - 1, -1, -1): + acc = acc * 256 + ds[i] + return acc + + +def class_bounds(n): + hi = sum(127 * 256 ** i for i in range(n)); lo = -sum(128 * 256 ** i for i in range(n)) + return lo, hi + + +def min_limbs(m_lo, m_hi): + n = 1 + while True: + lo, hi = class_bounds(n) + if lo <= m_lo and m_hi <= hi: return n + n += 1 + + +# ---------------------------------------------------------------- the arrays +# (name, group, limbs per value, multiplier per V head per token (values), design limbs per value or None, divisor or None) +# group A: arrays the design lists; B: scalars (design: flat 16); C: remainders the design does not list. +LAYOUT = [ + ("S", "A", 3, D * D, 3, None), + ("rS", "A", 2, D * D, 2, ONE), + ("conv_v", "A", 3, D, 3, None), + ("v", "A", 3, D, 3, None), + ("M", "A", 3, D, 3, None), + ("delta", "A", 3, D, 3, None), + ("o", "A", 3, D, 3, None), + ("w", "A", 2, D, 2, None), + ("s_gate", "A", 2, D, 2, None), + ("t", "A", 3, D, 3, None), + ("y", "A", 4, D, 4, None), + ("conv_q", "A", 3, D / 3, 3, None), + ("conv_k", "A", 3, D / 3, 3, None), + ("silu_q", "A", 2, D / 3, 2, None), + ("silu_k", "A", 2, D / 3, 2, None), + ("q_hat", "A", 2, D / 3, 2, None), + ("k_hat", "A", 2, D / 3, 2, None), + ("a", "B", 2, 1, None, None), ("beta", "B", 2, 1, None, None), + ("on_sigma", "B", 3, 1, None, None), ("on_Rc", "B", 5, 1, None, None), ("on_e1", "B", 3, 1, None, None), + ("on_e2", "B", 3, 1, None, None), ("on_rr", "B", 3, 1, None, None), ("on_gap", "B", 3, 1, None, None), + ("qn_sigma", "B", 3, 1, None, None), ("qn_e1", "B", 3, 1, None, None), ("qn_e2", "B", 3, 1, None, None), + ("kn_sigma", "B", 3, 1, None, None), ("kn_e1", "B", 3, 1, None, None), ("kn_e2", "B", 3, 1, None, None), + ("rM", "C", 4, D, None, 1 << 24), ("rdelta", "C", 2, D, None, ONE), ("ro", "C", 2, D, None, ONE), + ("rconv_v", "C", 2, D, None, ONE), ("rw", "C", 4, D, None, 1 << 24), ("rt", "C", 2, D, None, ONE), + ("ry", "C", 2, D, None, 1 << GAIN_EXP), + ("rconv_q", "C", 2, D / 3, None, ONE), ("rconv_k", "C", 2, D / 3, None, ONE), + ("rem_qhat", "C", 5, D / 3, None, "2s"), ("rem_khat", "C", 3, D / 3, None, "2s"), +] +DESIGN_SCALARS = 16 + + +def design_limbs(): + d = CM.deltanet_limbs("per_token") + return d + + +# ---------------------------------------------------------------- inputs +def load_inputs(src, own, synthetic=False): + def bf(path, shape): return RH.load_bf16(path, shape) + stream = json.load(open(ROOT / "experiments/20261109-8-qwen-real-weights/runs/stream-stock.json")) + shapes = {} + for v in stream["shards"].values(): + for k, t in v["tensors"].items(): shapes[k] = t["shape"] + L = {} + for n in ("A_log", "conv1d.weight", "dt_bias", "in_proj_a.weight", "in_proj_b.weight", "in_proj_qkv.weight", + "in_proj_z.weight", "norm.weight"): + name = P + "layers.0.linear_attn." + n + L["linear_attn." + n] = bf(Path(src) / (name + ".bin"), shapes[name]) + name = P + "layers.0.input_layernorm.weight" + L["input_layernorm.weight"] = bf(Path(own) / (name + ".bin"), shapes[name]) + Mt = np.frombuffer((Path(src) / "M.i32").read_bytes(), dtype="hj", kh, S) + M, delta, Sn, o = ih.step(S, a, beta, kh, v, qh) + rM = a[:, None] * Pm - (M << 24) + rd = (v - M) * beta[:, None] - delta * ONE + rS = a[:, None, None] * S + kh[:, :, None] * delta[:, None, :] - Sn * ONE + ro = np.einsum("hi,hij->hj", qh, Sn) - o * ONE + S = Sn + zi = ih.q(inp["z"][t]) + y_h, w, ex = ih.gated_norm(o, zi, inp["gain"]) + sg = ih.silu(zi) # s = SiLU(z) at 2^F, derived here + tt = (sg * w) // ONE; rt = sg * w - tt * ONE + y = (gi[None, :] * tt) >> GAIN_EXP; ry = gi[None, :] * tt - (y << GAIN_EXP) + Sr, orr, yr = ref[t] + checks.append(dict(token=t, S_equal_run_int=bool(np.array_equal(Sn, Sr)), o_equal_run_int=bool(np.array_equal(o, orr)), + y_harness_equal_run_int=bool(np.array_equal(y_h, yr)))) + sc = lambda v_: np.array([int(v_)], dtype=np.int64) + vals = dict(S=Sn[0], rS=rS[0], conv_v=cv[2][0], v=v[0], M=M[0], delta=delta[0], o=o[0], w=w[0], s_gate=sg[0], t=tt[0], + y=y[0], conv_q=cv[0][0], conv_k=cv[1][0], silu_q=sl[0][0], silu_k=sl[1][0], q_hat=qh[0], k_hat=kh[0], + a=sc(a[0]), beta=sc(beta[0]), on_sigma=sc(ex["sigma"][0]), on_Rc=sc(ex["Rc"][0]), on_e1=sc(ex["e1"][0]), + on_e2=sc(ex["e2"][0]), on_rr=sc(ex["rr"][0]), on_gap=sc(ex["gap"][0]), + qn_sigma=sc(qs), qn_e1=sc(qe1), qn_e2=sc(qe2), kn_sigma=sc(ks), kn_e1=sc(ke1), kn_e2=sc(ke2), + rM=rM[0], rdelta=rd[0], ro=ro[0], rconv_v=rc[2][0], rw=ex["rw"][0], rt=rt[0], ry=ry[0], + rconv_q=rc[0][0], rconv_k=rc[1][0], rem_qhat=rq[0], rem_khat=rk[0]) + divs = {"rem_qhat": 2 * qsd, "rem_khat": 2 * ksd} + toks.append((vals, divs)) + return toks, checks + + +# ---------------------------------------------------------------- layout and count +def layout(toks): + rows = [] + for name, grp, n, mult, dl, div in LAYOUT: + mx_v, lo_v, hi_v, mx_l, out_cls, out_rem, rec_bad, nvals = 0, 0, 0, 0, 0, 0, 0, 0 + for vals, divs in toks: + x = np.asarray(vals[name], dtype=np.int64).reshape(-1) + ds, res = limbs(x, n) + nvals += x.size + rec_bad += int(((res == 0) & (recompose(ds) != x)).sum()) # an in-class value must recompose exactly + out_cls += int((res != 0).sum()) + mx_l = max(mx_l, int(np.abs(ds).max())); mx_v = max(mx_v, int(np.abs(x).max())) + lo_v = min(lo_v, int(x.min())); hi_v = max(hi_v, int(x.max())) + if div is not None: + dv = divs[name] if isinstance(div, str) else div + out_rem += int(((x < 0) | (x >= dv)).sum()) + exp_vals = int(round(mult * 3)) if mult != int(mult) else int(mult) + exp_vals = exp_vals * T + lo, hi = class_bounds(n) + rows.append(dict(array=name, group=grp, limbs_per_value=n, design_limbs_per_value=dl, + built_limbs_per_v_head_per_token=n * mult, + design_limbs_per_v_head_per_token=(dl * mult if dl is not None else None), + values_laid=nvals, values_expected=exp_vals, max_abs_value=mx_v, min_value=lo_v, max_value=hi_v, + class_range=[lo, hi], min_limbs_needed=min_limbs(lo_v, hi_v), max_abs_limb=mx_l, + values_out_of_class=out_cls, remainders_out_of_exact_class=out_rem if div is not None else None, + recomposition_mismatches=rec_bad)) + return rows + + +def summarise(rows, checks, mode): + dlim = design_limbs() + A = sum(r["built_limbs_per_v_head_per_token"] for r in rows if r["group"] == "A") + B = sum(r["built_limbs_per_v_head_per_token"] for r in rows if r["group"] == "B") + C = sum(r["built_limbs_per_v_head_per_token"] for r in rows if r["group"] == "C") + built = A + B + C + design = dlim["total"] + pl = json.load(open(ROOT / "experiments/20261109-32-qwen-m3-design/runs/planner-proxy.json")) + pk = CM.packed(pl, T=1024, strategy="per_token", segments="block") + ov = pk["overhead_factor"] + design_entries = pk["entries_per_token"]["all_layers"] + subst = design_entries + CM.Q["deltanet_layers"] * CM.Q["v_heads"] * (built - design) / CM.LANES * ov + groups_design = dict(state=dlim["state"], vectors=dlim["vectors"], qk_path=dlim["qk_path"], scalars=dlim["scalars"]) + groups_built = dict(state=sum(r["built_limbs_per_v_head_per_token"] for r in rows if r["array"] in ("S", "rS")), + vectors=sum(r["built_limbs_per_v_head_per_token"] for r in rows if r["group"] == "A" and r["array"] in + ("conv_v", "v", "M", "delta", "o", "w", "s_gate", "t", "y")), + qk_path=sum(r["built_limbs_per_v_head_per_token"] for r in rows if r["group"] == "A" and r["array"] in + ("conv_q", "conv_k", "silu_q", "silu_k", "q_hat", "k_hat")), + scalars=B, remainders_not_in_design=C) + all_in_class = all(r["values_out_of_class"] == 0 for r in rows) + rem_ok = all((r["remainders_out_of_exact_class"] or 0) == 0 for r in rows) + rec_ok = all(r["recomposition_mismatches"] == 0 for r in rows) and all(r["values_laid"] == r["values_expected"] for r in rows) + harness_ok = all(c["S_equal_run_int"] and c["o_equal_run_int"] and c["y_harness_equal_run_int"] for c in checks) + ratio = built / design + return dict(mode=mode, T=T, design_limbs_per_v_head_per_token=design, design_groups=groups_design, + built_limbs_per_v_head_per_token=built, built_groups=groups_built, built_A_only=A, + ratio_built_over_design=ratio, ratio_A_only_over_design=A / design, + design_entries_per_token=design_entries, + entries_per_token_with_built_head_COUNTED=subst, entries_ratio=subst / design_entries, + overhead_factor_from_design=ov, + out_of_class_arrays=[r["array"] for r in rows if r["values_out_of_class"]], + criterion1_count_within_10pct=0.9 <= ratio <= 1.1, + criterion2_limbs_in_class=all_in_class and rem_ok and rec_ok and harness_ok, + detail=dict(all_limbs_in_class=all_in_class, remainders_in_exact_class=rem_ok, recomposition_exact=rec_ok, + harness_equal=harness_ok)) + + +def controls(): + out = {} + for x, n, want in ((32639, 2, True), (-32896, 2, True), (32640, 2, False), (-32897, 2, False), + (8355711, 3, True), (8355712, 3, False), (-8421504, 3, True), (-8421505, 3, False)): + _, res = limbs(np.array([x]), n); out[f"{x}@{n}"] = dict(in_class=bool(res[0] == 0), expected=want, ok=bool((res[0] == 0) == want)) + rem = np.array([4096]); oc = bool(((rem < 0) | (rem >= 4096)).any()) + out["remainder_eq_divisor"] = dict(out_of_exact_class=oc, ok=oc) + ds, _ = limbs(np.array([123456]), 3); ds2 = ds.copy(); ds2[1, 0] += 1 + out["changed_limb"] = dict(recomposes_equal=bool(recompose(ds2)[0] == 123456), ok=bool(recompose(ds2)[0] != 123456)) + out["unchanged_limb"] = dict(ok=bool(recompose(ds)[0] == 123456)) + out["all_ok"] = all(v["ok"] for v in out.values() if isinstance(v, dict)) + return out + + +def main(): + mode = sys.argv[1] + start = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") + out = Path(sys.argv[-1]) + if out.exists(): raise SystemExit("refusing to overwrite " + str(out)) + if mode == "controls": + res = dict(utc_start=start, controls=controls()) + else: + inp = load_inputs(sys.argv[2], sys.argv[3], synthetic=(mode == "debug")) + toks, checks = trace(inp) + rows = layout(toks) + res = dict(utc_start=start, input=("synthetic in_proj outputs, numpy seed 240, real head-0 weights (debug only)" + if mode == "debug" else "stock layer 0, V head 0, tokens " + str(TOKENS)), + summary=summarise(rows, checks, mode), arrays=rows, harness_checks=checks, + source_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest()) + out.write_text(json.dumps(res, indent=1) + "\n") + print(json.dumps(res.get("summary", res.get("controls")), indent=1)) + + +if __name__ == "__main__": + main() diff --git a/research/operators/qwen_packed_ref/prepare.py b/research/operators/qwen_packed_ref/prepare.py new file mode 100644 index 00000000..c305e636 --- /dev/null +++ b/research/operators/qwen_packed_ref/prepare.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +"""Inputs of the packed-trace reference (issue #240): fetch the 4 embedding rows and layer 0's input norm, and check +every tensor the reference reads against merged hashes. Research only, nothing here is committed but hashes and shapes. + +Reads PR #231's head-0 data directory READ ONLY (layer-0 linear_attn tensors and M.i32) and checks: + - each linear_attn tensor's SHA-256 against the merged experiments/20261109-8-qwen-real-weights/runs/stream-stock.json; + - M.i32's SHA-256 against the merged experiments/20261121-229-qwen-m3a1-weight-side/runs/weights-head0.json. +Fetches into (outside the repository), with the merged fetch.py get() and the pinned stock revision: + - model.language_model.layers.0.input_layernorm.weight (whole tensor, 10,240 bytes), checked against stream-stock.json; + - embedding rows 760, 6511, 314, 14898 (the first 4 tokens of q1_forward.py FIXTURE), each row checked against the + merged per-row hashes: 760, 6511, 314 in experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json, + 14898 in experiments/20261114-204-int-attn-heldout/runs/debug-fixture/manifest-stock.json. +Any mismatch stops with a nonzero exit. + +Usage: prepare.py +""" +import hashlib, json, sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(ROOT / "experiments" / "20261109-8-qwen-real-weights")) +import fetch as rw_fetch # noqa: E402 (merged get(), REPOS) + +REPO, REV = rw_fetch.REPOS["stock"] +P = "model.language_model." +LIN = ["A_log", "conv1d.weight", "dt_bias", "in_proj_a.weight", "in_proj_b.weight", "in_proj_qkv.weight", + "in_proj_z.weight", "norm.weight"] +TOKENS = [760, 6511, 314, 14898] +ROW_MANIFESTS = {760: "experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json", + 6511: "experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json", + 314: "experiments/20261111-8-qwen-e2e-agreement/runs/manifest-stock.json", + 14898: "experiments/20261114-204-int-attn-heldout/runs/debug-fixture/manifest-stock.json"} +STREAM = ROOT / "experiments/20261109-8-qwen-real-weights/runs/stream-stock.json" +W231 = ROOT / "experiments/20261121-229-qwen-m3a1-weight-side/runs/weights-head0.json" + + +def stream_entry(name): + s = json.load(open(STREAM)) + for shard, v in s["shards"].items(): + if name in v["tensors"]: + return shard, v["header_len"], v["tensors"][name] + raise KeyError(name) + + +def sha(b): + return hashlib.sha256(b).hexdigest() + + +def stop(msg): + raise SystemExit("STOP: " + msg) + + +def main(): + src, own, out = Path(sys.argv[1]), Path(sys.argv[2]), Path(sys.argv[3]) + own.mkdir(parents=True, exist_ok=True) + summ = dict(repo=REPO, rev=REV, tensors={}, embedding_rows={}) + for n in LIN: + name = P + "layers.0.linear_attn." + n + _, _, t = stream_entry(name) + b = (src / (name + ".bin")).read_bytes() + h = sha(b) + if h != t["sha256"] or len(b) != t["nbytes"]: + stop(f"{name} sha256 {h} differs from the merged stream hash") + summ["tensors"][name] = dict(shape=t["shape"], sha256=h, source="PR #231 data, read only", match="stream-stock.json") + m = (src / "M.i32").read_bytes(); want = json.load(open(W231))["M_i32_sha256"] + if sha(m) != want: + stop("M.i32 sha256 differs from weights-head0.json") + summ["M_i32"] = dict(sha256=sha(m), match="weights-head0.json") + name = P + "layers.0.input_layernorm.weight" + shard, hl, t = stream_entry(name) + path = own / (name + ".bin") + if not path.exists(): + lo, hi = 8 + hl + t["begin"], 8 + hl + t["end"] - 1 + path.write_bytes(rw_fetch.get(f"https://huggingface.co/{REPO}/resolve/{REV}/{shard}", f"bytes={lo}-{hi}")) + b = path.read_bytes() + if sha(b) != t["sha256"] or len(b) != t["nbytes"]: + stop(f"{name} sha256 differs from the merged stream hash") + summ["tensors"][name] = dict(shape=t["shape"], sha256=sha(b), source="fetched", match="stream-stock.json") + ename = P + "embed_tokens.weight" + shard, hl, t = stream_entry(ename) + V, d = t["shape"]; row = t["nbytes"] // V + for tok in TOKENS: + man = json.load(open(ROOT / ROW_MANIFESTS[tok])) + assert man["repo"] == REPO and man["rev"] == REV + ent = man["embedding_rows"][str(tok)] + lo = 8 + hl + t["begin"] + tok * row + rng = f"bytes={lo}-{lo + row - 1}" + if rng != ent["range"]: + stop(f"row {tok}: range {rng} differs from the manifest's {ent['range']}") + path = own / f"embed_row_{tok}.bin" + if not path.exists(): + path.write_bytes(rw_fetch.get(f"https://huggingface.co/{REPO}/resolve/{REV}/{shard}", rng)) + b = path.read_bytes() + if len(b) != row or sha(b) != ent["sha256"]: + stop(f"row {tok} sha256 differs from {ROW_MANIFESTS[tok]}") + summ["embedding_rows"][str(tok)] = dict(range=rng, sha256=sha(b), match=ROW_MANIFESTS[tok]) + out.write_text(json.dumps(summ, indent=1) + "\n") + print(json.dumps(dict(ok=True, tensors=len(summ["tensors"]), rows=len(summ["embedding_rows"])))) + + +if __name__ == "__main__": + main() From df33b0601215c05eb4ccef108e1773edbcb44fa3 Mon Sep 17 00:00:00 2001 From: wakesync <60821182+wakesync@users.noreply.github.com> Date: Sun, 29 Nov 2026 02:58:05 +0000 Subject: [PATCH 4/6] research: #240 registered run and 4 repeats (stock layer 0, V head 0, 4 tokens) --- .../runs/real-head0-T4-rep2.json | 992 ++++++++++++++++++ .../runs/real-head0-T4-rep3.json | 992 ++++++++++++++++++ .../runs/real-head0-T4-rep4.json | 992 ++++++++++++++++++ .../runs/real-head0-T4-rep5.json | 992 ++++++++++++++++++ .../runs/real-head0-T4.json | 992 ++++++++++++++++++ .../runs/repeats.json | 26 + .../operators/qwen_packed_ref/compare_runs.py | 19 + 7 files changed, 5005 insertions(+) create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep2.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep3.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep4.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep5.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json create mode 100644 research/operators/qwen_packed_ref/compare_runs.py diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep2.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep2.json new file mode 100644 index 00000000..bc65adfd --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep2.json @@ -0,0 +1,992 @@ +{ + "utc_start": "2026-11-29T02:57:23Z", + "input": "stock layer 0, V head 0, tokens [760, 6511, 314, 14898]", + "summary": { + "mode": "real", + "T": 4, + "design_limbs_per_v_head_per_token": 85861.33333333333, + "design_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333334, + "scalars": 16 + }, + "built_limbs_per_v_head_per_token": 88703.33333333333, + "built_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333333, + "scalars": 42, + "remainders_not_in_design": 2816.0 + }, + "built_A_only": 85845.33333333333, + "ratio_built_over_design": 1.0330998819802473, + "ratio_A_only_over_design": 0.9998136530219268, + "design_entries_per_token": 95057841.1641135, + "entries_per_token_with_built_head_COUNTED": 97828891.86345139, + "entries_ratio": 1.029151205891093, + "overhead_factor_from_design": 1.2695773861469135, + "out_of_class_arrays": [], + "criterion1_count_within_10pct": true, + "criterion2_limbs_in_class": true, + "detail": { + "all_limbs_in_class": true, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "harness_equal": true + } + }, + "arrays": [ + { + "array": "S", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 49152, + "design_limbs_per_v_head_per_token": 49152, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 17375, + "min_value": -6482, + "max_value": 17375, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rS", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 32768, + "design_limbs_per_v_head_per_token": 32768, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "conv_v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -697, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -319, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "M", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3007, + "min_value": -3007, + "max_value": 1707, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 85, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "delta", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 29057, + "min_value": -66, + "max_value": 29057, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "o", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 93, + "min_value": -1, + "max_value": 93, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 93, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "w", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3662, + "min_value": -68, + "max_value": 3662, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "s_gate", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 20264, + "min_value": -1141, + "max_value": 20264, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "t", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 258, + "min_value": -258, + "max_value": 14, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "y", + "group": "A", + "limbs_per_value": 4, + "design_limbs_per_value": 4, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": 512, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2384, + "min_value": -2384, + "max_value": 147, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_q", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 23973, + "min_value": -23973, + "max_value": 8287, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_k", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16889, + "min_value": -16889, + "max_value": 11311, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_q", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 7319, + "min_value": -1141, + "max_value": 7319, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_k", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 10639, + "min_value": -1141, + "max_value": 10639, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "q_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 306, + "min_value": -86, + "max_value": 306, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 124, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "k_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2585, + "min_value": -627, + "max_value": 2585, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "a", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 4092, + "min_value": 0, + "max_value": 4092, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 116, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "beta", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 967, + "min_value": 0, + "max_value": 967, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 69, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 104, + "min_value": 0, + "max_value": 104, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 104, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_Rc", + "group": "B", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 5, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 1126548798, + "min_value": 0, + "max_value": 1126548798, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 118, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 153, + "min_value": 0, + "max_value": 153, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 103, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 204, + "min_value": 0, + "max_value": 204, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_rr", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 75, + "min_value": 0, + "max_value": 75, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 75, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_gap", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 68, + "min_value": 0, + "max_value": 68, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 68, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 10075, + "min_value": 0, + "max_value": 10075, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 91, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16080, + "min_value": 0, + "max_value": 16080, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 92, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16355, + "min_value": 0, + "max_value": 16355, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 88, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 19768, + "min_value": 0, + "max_value": 19768, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 77, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 36794, + "min_value": 0, + "max_value": 36794, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 112, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 11440, + "min_value": 0, + "max_value": 11440, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 80, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rM", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16744576, + "min_value": 0, + "max_value": 16744576, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rdelta", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4050, + "min_value": 0, + "max_value": 4050, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ro", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_v", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rw", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 15126960, + "min_value": 0, + "max_value": 15126960, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rt", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4008, + "min_value": 0, + "max_value": 4008, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ry", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 252, + "min_value": 0, + "max_value": 252, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_q", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_k", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4089, + "min_value": 0, + "max_value": 4089, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_qhat", + "group": "C", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 213.33333333333331, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 930894677, + "min_value": 0, + "max_value": 930894677, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_khat", + "group": "C", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 39288, + "min_value": 0, + "max_value": 39288, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + } + ], + "harness_checks": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + } + ], + "source_sha256": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d" +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep3.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep3.json new file mode 100644 index 00000000..bc65adfd --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep3.json @@ -0,0 +1,992 @@ +{ + "utc_start": "2026-11-29T02:57:23Z", + "input": "stock layer 0, V head 0, tokens [760, 6511, 314, 14898]", + "summary": { + "mode": "real", + "T": 4, + "design_limbs_per_v_head_per_token": 85861.33333333333, + "design_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333334, + "scalars": 16 + }, + "built_limbs_per_v_head_per_token": 88703.33333333333, + "built_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333333, + "scalars": 42, + "remainders_not_in_design": 2816.0 + }, + "built_A_only": 85845.33333333333, + "ratio_built_over_design": 1.0330998819802473, + "ratio_A_only_over_design": 0.9998136530219268, + "design_entries_per_token": 95057841.1641135, + "entries_per_token_with_built_head_COUNTED": 97828891.86345139, + "entries_ratio": 1.029151205891093, + "overhead_factor_from_design": 1.2695773861469135, + "out_of_class_arrays": [], + "criterion1_count_within_10pct": true, + "criterion2_limbs_in_class": true, + "detail": { + "all_limbs_in_class": true, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "harness_equal": true + } + }, + "arrays": [ + { + "array": "S", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 49152, + "design_limbs_per_v_head_per_token": 49152, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 17375, + "min_value": -6482, + "max_value": 17375, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rS", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 32768, + "design_limbs_per_v_head_per_token": 32768, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "conv_v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -697, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -319, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "M", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3007, + "min_value": -3007, + "max_value": 1707, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 85, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "delta", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 29057, + "min_value": -66, + "max_value": 29057, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "o", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 93, + "min_value": -1, + "max_value": 93, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 93, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "w", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3662, + "min_value": -68, + "max_value": 3662, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "s_gate", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 20264, + "min_value": -1141, + "max_value": 20264, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "t", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 258, + "min_value": -258, + "max_value": 14, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "y", + "group": "A", + "limbs_per_value": 4, + "design_limbs_per_value": 4, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": 512, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2384, + "min_value": -2384, + "max_value": 147, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_q", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 23973, + "min_value": -23973, + "max_value": 8287, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_k", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16889, + "min_value": -16889, + "max_value": 11311, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_q", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 7319, + "min_value": -1141, + "max_value": 7319, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_k", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 10639, + "min_value": -1141, + "max_value": 10639, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "q_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 306, + "min_value": -86, + "max_value": 306, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 124, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "k_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2585, + "min_value": -627, + "max_value": 2585, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "a", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 4092, + "min_value": 0, + "max_value": 4092, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 116, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "beta", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 967, + "min_value": 0, + "max_value": 967, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 69, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 104, + "min_value": 0, + "max_value": 104, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 104, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_Rc", + "group": "B", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 5, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 1126548798, + "min_value": 0, + "max_value": 1126548798, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 118, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 153, + "min_value": 0, + "max_value": 153, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 103, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 204, + "min_value": 0, + "max_value": 204, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_rr", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 75, + "min_value": 0, + "max_value": 75, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 75, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_gap", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 68, + "min_value": 0, + "max_value": 68, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 68, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 10075, + "min_value": 0, + "max_value": 10075, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 91, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16080, + "min_value": 0, + "max_value": 16080, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 92, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16355, + "min_value": 0, + "max_value": 16355, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 88, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 19768, + "min_value": 0, + "max_value": 19768, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 77, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 36794, + "min_value": 0, + "max_value": 36794, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 112, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 11440, + "min_value": 0, + "max_value": 11440, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 80, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rM", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16744576, + "min_value": 0, + "max_value": 16744576, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rdelta", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4050, + "min_value": 0, + "max_value": 4050, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ro", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_v", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rw", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 15126960, + "min_value": 0, + "max_value": 15126960, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rt", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4008, + "min_value": 0, + "max_value": 4008, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ry", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 252, + "min_value": 0, + "max_value": 252, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_q", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_k", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4089, + "min_value": 0, + "max_value": 4089, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_qhat", + "group": "C", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 213.33333333333331, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 930894677, + "min_value": 0, + "max_value": 930894677, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_khat", + "group": "C", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 39288, + "min_value": 0, + "max_value": 39288, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + } + ], + "harness_checks": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + } + ], + "source_sha256": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d" +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep4.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep4.json new file mode 100644 index 00000000..bc65adfd --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep4.json @@ -0,0 +1,992 @@ +{ + "utc_start": "2026-11-29T02:57:23Z", + "input": "stock layer 0, V head 0, tokens [760, 6511, 314, 14898]", + "summary": { + "mode": "real", + "T": 4, + "design_limbs_per_v_head_per_token": 85861.33333333333, + "design_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333334, + "scalars": 16 + }, + "built_limbs_per_v_head_per_token": 88703.33333333333, + "built_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333333, + "scalars": 42, + "remainders_not_in_design": 2816.0 + }, + "built_A_only": 85845.33333333333, + "ratio_built_over_design": 1.0330998819802473, + "ratio_A_only_over_design": 0.9998136530219268, + "design_entries_per_token": 95057841.1641135, + "entries_per_token_with_built_head_COUNTED": 97828891.86345139, + "entries_ratio": 1.029151205891093, + "overhead_factor_from_design": 1.2695773861469135, + "out_of_class_arrays": [], + "criterion1_count_within_10pct": true, + "criterion2_limbs_in_class": true, + "detail": { + "all_limbs_in_class": true, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "harness_equal": true + } + }, + "arrays": [ + { + "array": "S", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 49152, + "design_limbs_per_v_head_per_token": 49152, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 17375, + "min_value": -6482, + "max_value": 17375, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rS", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 32768, + "design_limbs_per_v_head_per_token": 32768, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "conv_v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -697, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -319, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "M", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3007, + "min_value": -3007, + "max_value": 1707, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 85, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "delta", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 29057, + "min_value": -66, + "max_value": 29057, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "o", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 93, + "min_value": -1, + "max_value": 93, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 93, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "w", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3662, + "min_value": -68, + "max_value": 3662, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "s_gate", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 20264, + "min_value": -1141, + "max_value": 20264, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "t", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 258, + "min_value": -258, + "max_value": 14, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "y", + "group": "A", + "limbs_per_value": 4, + "design_limbs_per_value": 4, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": 512, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2384, + "min_value": -2384, + "max_value": 147, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_q", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 23973, + "min_value": -23973, + "max_value": 8287, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_k", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16889, + "min_value": -16889, + "max_value": 11311, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_q", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 7319, + "min_value": -1141, + "max_value": 7319, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_k", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 10639, + "min_value": -1141, + "max_value": 10639, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "q_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 306, + "min_value": -86, + "max_value": 306, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 124, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "k_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2585, + "min_value": -627, + "max_value": 2585, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "a", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 4092, + "min_value": 0, + "max_value": 4092, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 116, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "beta", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 967, + "min_value": 0, + "max_value": 967, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 69, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 104, + "min_value": 0, + "max_value": 104, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 104, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_Rc", + "group": "B", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 5, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 1126548798, + "min_value": 0, + "max_value": 1126548798, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 118, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 153, + "min_value": 0, + "max_value": 153, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 103, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 204, + "min_value": 0, + "max_value": 204, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_rr", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 75, + "min_value": 0, + "max_value": 75, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 75, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_gap", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 68, + "min_value": 0, + "max_value": 68, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 68, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 10075, + "min_value": 0, + "max_value": 10075, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 91, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16080, + "min_value": 0, + "max_value": 16080, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 92, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16355, + "min_value": 0, + "max_value": 16355, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 88, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 19768, + "min_value": 0, + "max_value": 19768, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 77, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 36794, + "min_value": 0, + "max_value": 36794, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 112, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 11440, + "min_value": 0, + "max_value": 11440, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 80, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rM", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16744576, + "min_value": 0, + "max_value": 16744576, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rdelta", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4050, + "min_value": 0, + "max_value": 4050, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ro", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_v", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rw", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 15126960, + "min_value": 0, + "max_value": 15126960, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rt", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4008, + "min_value": 0, + "max_value": 4008, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ry", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 252, + "min_value": 0, + "max_value": 252, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_q", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_k", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4089, + "min_value": 0, + "max_value": 4089, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_qhat", + "group": "C", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 213.33333333333331, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 930894677, + "min_value": 0, + "max_value": 930894677, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_khat", + "group": "C", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 39288, + "min_value": 0, + "max_value": 39288, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + } + ], + "harness_checks": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + } + ], + "source_sha256": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d" +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep5.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep5.json new file mode 100644 index 00000000..dfbb266f --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4-rep5.json @@ -0,0 +1,992 @@ +{ + "utc_start": "2026-11-29T02:57:24Z", + "input": "stock layer 0, V head 0, tokens [760, 6511, 314, 14898]", + "summary": { + "mode": "real", + "T": 4, + "design_limbs_per_v_head_per_token": 85861.33333333333, + "design_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333334, + "scalars": 16 + }, + "built_limbs_per_v_head_per_token": 88703.33333333333, + "built_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333333, + "scalars": 42, + "remainders_not_in_design": 2816.0 + }, + "built_A_only": 85845.33333333333, + "ratio_built_over_design": 1.0330998819802473, + "ratio_A_only_over_design": 0.9998136530219268, + "design_entries_per_token": 95057841.1641135, + "entries_per_token_with_built_head_COUNTED": 97828891.86345139, + "entries_ratio": 1.029151205891093, + "overhead_factor_from_design": 1.2695773861469135, + "out_of_class_arrays": [], + "criterion1_count_within_10pct": true, + "criterion2_limbs_in_class": true, + "detail": { + "all_limbs_in_class": true, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "harness_equal": true + } + }, + "arrays": [ + { + "array": "S", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 49152, + "design_limbs_per_v_head_per_token": 49152, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 17375, + "min_value": -6482, + "max_value": 17375, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rS", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 32768, + "design_limbs_per_v_head_per_token": 32768, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "conv_v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -697, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -319, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "M", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3007, + "min_value": -3007, + "max_value": 1707, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 85, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "delta", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 29057, + "min_value": -66, + "max_value": 29057, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "o", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 93, + "min_value": -1, + "max_value": 93, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 93, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "w", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3662, + "min_value": -68, + "max_value": 3662, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "s_gate", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 20264, + "min_value": -1141, + "max_value": 20264, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "t", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 258, + "min_value": -258, + "max_value": 14, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "y", + "group": "A", + "limbs_per_value": 4, + "design_limbs_per_value": 4, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": 512, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2384, + "min_value": -2384, + "max_value": 147, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_q", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 23973, + "min_value": -23973, + "max_value": 8287, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_k", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16889, + "min_value": -16889, + "max_value": 11311, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_q", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 7319, + "min_value": -1141, + "max_value": 7319, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_k", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 10639, + "min_value": -1141, + "max_value": 10639, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "q_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 306, + "min_value": -86, + "max_value": 306, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 124, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "k_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2585, + "min_value": -627, + "max_value": 2585, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "a", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 4092, + "min_value": 0, + "max_value": 4092, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 116, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "beta", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 967, + "min_value": 0, + "max_value": 967, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 69, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 104, + "min_value": 0, + "max_value": 104, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 104, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_Rc", + "group": "B", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 5, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 1126548798, + "min_value": 0, + "max_value": 1126548798, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 118, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 153, + "min_value": 0, + "max_value": 153, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 103, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 204, + "min_value": 0, + "max_value": 204, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_rr", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 75, + "min_value": 0, + "max_value": 75, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 75, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_gap", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 68, + "min_value": 0, + "max_value": 68, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 68, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 10075, + "min_value": 0, + "max_value": 10075, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 91, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16080, + "min_value": 0, + "max_value": 16080, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 92, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16355, + "min_value": 0, + "max_value": 16355, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 88, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 19768, + "min_value": 0, + "max_value": 19768, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 77, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 36794, + "min_value": 0, + "max_value": 36794, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 112, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 11440, + "min_value": 0, + "max_value": 11440, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 80, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rM", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16744576, + "min_value": 0, + "max_value": 16744576, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rdelta", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4050, + "min_value": 0, + "max_value": 4050, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ro", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_v", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rw", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 15126960, + "min_value": 0, + "max_value": 15126960, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rt", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4008, + "min_value": 0, + "max_value": 4008, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ry", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 252, + "min_value": 0, + "max_value": 252, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_q", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_k", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4089, + "min_value": 0, + "max_value": 4089, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_qhat", + "group": "C", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 213.33333333333331, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 930894677, + "min_value": 0, + "max_value": 930894677, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_khat", + "group": "C", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 39288, + "min_value": 0, + "max_value": 39288, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + } + ], + "harness_checks": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + } + ], + "source_sha256": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d" +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json new file mode 100644 index 00000000..ba348fce --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json @@ -0,0 +1,992 @@ +{ + "utc_start": "2026-11-29T02:57:01Z", + "input": "stock layer 0, V head 0, tokens [760, 6511, 314, 14898]", + "summary": { + "mode": "real", + "T": 4, + "design_limbs_per_v_head_per_token": 85861.33333333333, + "design_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333334, + "scalars": 16 + }, + "built_limbs_per_v_head_per_token": 88703.33333333333, + "built_groups": { + "state": 81920, + "vectors": 3328, + "qk_path": 597.3333333333333, + "scalars": 42, + "remainders_not_in_design": 2816.0 + }, + "built_A_only": 85845.33333333333, + "ratio_built_over_design": 1.0330998819802473, + "ratio_A_only_over_design": 0.9998136530219268, + "design_entries_per_token": 95057841.1641135, + "entries_per_token_with_built_head_COUNTED": 97828891.86345139, + "entries_ratio": 1.029151205891093, + "overhead_factor_from_design": 1.2695773861469135, + "out_of_class_arrays": [], + "criterion1_count_within_10pct": true, + "criterion2_limbs_in_class": true, + "detail": { + "all_limbs_in_class": true, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "harness_equal": true + } + }, + "arrays": [ + { + "array": "S", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 49152, + "design_limbs_per_v_head_per_token": 49152, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 17375, + "min_value": -6482, + "max_value": 17375, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rS", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 32768, + "design_limbs_per_v_head_per_token": 32768, + "values_laid": 65536, + "values_expected": 65536, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "conv_v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -697, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "v", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 122142, + "min_value": -319, + "max_value": 122142, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "M", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3007, + "min_value": -3007, + "max_value": 1707, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 85, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "delta", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 29057, + "min_value": -66, + "max_value": 29057, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "o", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 93, + "min_value": -1, + "max_value": 93, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 93, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "w", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 3662, + "min_value": -68, + "max_value": 3662, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "s_gate", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": 256, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 20264, + "min_value": -1141, + "max_value": 20264, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "t", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 384, + "design_limbs_per_v_head_per_token": 384, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 258, + "min_value": -258, + "max_value": 14, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "y", + "group": "A", + "limbs_per_value": 4, + "design_limbs_per_value": 4, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": 512, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2384, + "min_value": -2384, + "max_value": 147, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 2, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_q", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 23973, + "min_value": -23973, + "max_value": 8287, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "conv_k", + "group": "A", + "limbs_per_value": 3, + "design_limbs_per_value": 3, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": 128.0, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16889, + "min_value": -16889, + "max_value": 11311, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_q", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 7319, + "min_value": -1141, + "max_value": 7319, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "silu_k", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 10639, + "min_value": -1141, + "max_value": 10639, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "q_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 306, + "min_value": -86, + "max_value": 306, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 124, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "k_hat", + "group": "A", + "limbs_per_value": 2, + "design_limbs_per_value": 2, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": 85.33333333333333, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 2585, + "min_value": -627, + "max_value": 2585, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "a", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 4092, + "min_value": 0, + "max_value": 4092, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 116, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "beta", + "group": "B", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 2, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 967, + "min_value": 0, + "max_value": 967, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 69, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 104, + "min_value": 0, + "max_value": 104, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 104, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_Rc", + "group": "B", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 5, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 1126548798, + "min_value": 0, + "max_value": 1126548798, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 118, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 153, + "min_value": 0, + "max_value": 153, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 103, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 204, + "min_value": 0, + "max_value": 204, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 125, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_rr", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 75, + "min_value": 0, + "max_value": 75, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 75, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "on_gap", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 68, + "min_value": 0, + "max_value": 68, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 1, + "max_abs_limb": 68, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 10075, + "min_value": 0, + "max_value": 10075, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 91, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16080, + "min_value": 0, + "max_value": 16080, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 92, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "qn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 16355, + "min_value": 0, + "max_value": 16355, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 88, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_sigma", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 19768, + "min_value": 0, + "max_value": 19768, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 77, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e1", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 36794, + "min_value": 0, + "max_value": 36794, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 112, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "kn_e2", + "group": "B", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 3, + "design_limbs_per_v_head_per_token": null, + "values_laid": 4, + "values_expected": 4, + "max_abs_value": 11440, + "min_value": 0, + "max_value": 11440, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 2, + "max_abs_limb": 80, + "values_out_of_class": 0, + "remainders_out_of_exact_class": null, + "recomposition_mismatches": 0 + }, + { + "array": "rM", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 16744576, + "min_value": 0, + "max_value": 16744576, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rdelta", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4050, + "min_value": 0, + "max_value": 4050, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ro", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_v", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4095, + "min_value": 0, + "max_value": 4095, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rw", + "group": "C", + "limbs_per_value": 4, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 512, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 15126960, + "min_value": 0, + "max_value": 15126960, + "class_range": [ + -2155905152, + 2139062143 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rt", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4008, + "min_value": 0, + "max_value": 4008, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "ry", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 256, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 252, + "min_value": 0, + "max_value": 252, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 126, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_q", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4094, + "min_value": 0, + "max_value": 4094, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rconv_k", + "group": "C", + "limbs_per_value": 2, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 85.33333333333333, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 4089, + "min_value": 0, + "max_value": 4089, + "class_range": [ + -32896, + 32639 + ], + "min_limbs_needed": 2, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_qhat", + "group": "C", + "limbs_per_value": 5, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 213.33333333333331, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 930894677, + "min_value": 0, + "max_value": 930894677, + "class_range": [ + -551911719040, + 547599908735 + ], + "min_limbs_needed": 4, + "max_abs_limb": 128, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + }, + { + "array": "rem_khat", + "group": "C", + "limbs_per_value": 3, + "design_limbs_per_value": null, + "built_limbs_per_v_head_per_token": 128.0, + "design_limbs_per_v_head_per_token": null, + "values_laid": 512, + "values_expected": 512, + "max_abs_value": 39288, + "min_value": 0, + "max_value": 39288, + "class_range": [ + -8421504, + 8355711 + ], + "min_limbs_needed": 3, + "max_abs_limb": 127, + "values_out_of_class": 0, + "remainders_out_of_exact_class": 0, + "recomposition_mismatches": 0 + } + ], + "harness_checks": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "y_harness_equal_run_int": true + } + ], + "source_sha256": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d" +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json new file mode 100644 index 00000000..d82bcfb0 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json @@ -0,0 +1,26 @@ +{ + "utc_start": "2026-11-29T02:57:49Z", + "files": [ + "real-head0-T4.json", + "real-head0-T4-rep2.json", + "real-head0-T4-rep3.json", + "real-head0-T4-rep4.json", + "real-head0-T4-rep5.json" + ], + "n": 5, + "identical_to_first": [ + true, + true, + true, + true, + true + ], + "all_identical": true, + "starts": [ + "2026-11-29T02:57:01Z", + "2026-11-29T02:57:23Z", + "2026-11-29T02:57:23Z", + "2026-11-29T02:57:23Z", + "2026-11-29T02:57:24Z" + ] +} diff --git a/research/operators/qwen_packed_ref/compare_runs.py b/research/operators/qwen_packed_ref/compare_runs.py new file mode 100644 index 00000000..1536666a --- /dev/null +++ b/research/operators/qwen_packed_ref/compare_runs.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +"""Check that the registered run and its repeats agree on every count and maximum (all fields but the start time). + +Usage: compare_runs.py ... (refuses to overwrite out.json) +""" +import datetime, json, sys +from pathlib import Path + +out = Path(sys.argv[1]) +if out.exists(): raise SystemExit("refusing to overwrite " + str(out)) +runs = [json.load(open(p)) for p in sys.argv[2:]] +strip = lambda d: {k: v for k, v in d.items() if k != "utc_start"} +base = strip(runs[0]) +same = [strip(r) == base for r in runs] +res = dict(utc_start=datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), + files=[Path(p).name for p in sys.argv[2:]], n=len(runs), identical_to_first=same, all_identical=all(same), + starts=[r["utc_start"] for r in runs]) +out.write_text(json.dumps(res, indent=1) + "\n") +print(json.dumps(res)) From 2341b411e8c98bf953f55e4791d22b3f669aab6d Mon Sep 17 00:00:00 2001 From: wakesync <60821182+wakesync@users.noreply.github.com> Date: Sun, 29 Nov 2026 03:02:17 +0000 Subject: [PATCH 5/6] research: #240 RESULTS (PASS, ratio 1.0331), ENV, README, inventory exclusion, results.yaml row --- CLAIMS.md | 1 + README.md | 3 +- .../ENV.json | 24 +++++++ .../RESULTS.md | 70 +++++++++++++++++++ research/coverage/inventory.yaml | 2 + research/operators/qwen_packed_ref/README.md | 38 ++++++++++ research/results.yaml | 14 ++++ 7 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/ENV.json create mode 100644 experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md create mode 100644 research/operators/qwen_packed_ref/README.md diff --git a/CLAIMS.md b/CLAIMS.md index 7a67b020..b67267ee 100644 --- a/CLAIMS.md +++ b/CLAIMS.md @@ -86,3 +86,4 @@ tracked file, which both scripts resolve (they check that it exists, not what it | `qwen-m3a1-weight-side` | Qwen M3a-1 weight side: one DeltaNet head's real weights in a committed table, the trace's 1,666 weight cells in class and tied to it (issue #229): Measured, unreplicated, CPU research harness, research setting (no security level). The 3,288,706 integer weights of V head 0, layer 0 of the pinned stock Qwen3.8-27B (each fetched tensor SHA-256 equal to the merged stream hash) are a committed table; the 1,666 weights the head trace reads (conv taps, gains, cA, dt_bias) are product-oracle cells in their design classes by exact bits and are tied to the table by one point drawn after both commitments and one LIN claim on the table (one-time test). 5 of 5 honest proofs verified; all 8 registered hostile proofs rejected (other root twice, a tap changed two ways, gain 2^50, gain in class but not the table one, dt_bias 2^17, table row 0 non-zero past the cells); 3 of 3 completeness cases accepted (dt_int 78,848, -23,424, 2^17 - 1). NOT established: any bound on the 3,287,040 matrix weights (no Qwen layout of the WF range proof); any head computation (in_proj as a claim, sub-step c, not started); any soundness level (LIN runs on a hand-made test plan, rounds unpriced); hiding; that the table is the advertised checkpoint; accuracy | measured, unreplicated | unreplicated | [experiments/20261121-229-qwen-m3a1-weight-side/RESULTS.md](experiments/20261121-229-qwen-m3a1-weight-side/RESULTS.md), [experiments/20261121-229-qwen-m3a1-weight-side/PREREG.md](experiments/20261121-229-qwen-m3a1-weight-side/PREREG.md), [experiments/20261121-229-qwen-m3a1-weight-side/ENV.json](experiments/20261121-229-qwen-m3a1-weight-side/ENV.json), [experiments/20261121-229-qwen-m3a1-weight-side/runs/summary.json](experiments/20261121-229-qwen-m3a1-weight-side/runs/summary.json), [experiments/20261121-229-qwen-m3a1-weight-side/runs/weights-head0.json](experiments/20261121-229-qwen-m3a1-weight-side/runs/weights-head0.json), [research/operators/qwen_m3a1/README.md](research/operators/qwen_m3a1/README.md) | #231 | | `inkling-layer0-mlp-fidelity-228` | Inkling 2 Mini layer-0 routed MLP under main's integer rules, real NVFP4 weights, open loop vs float64: FAIL vs prereg on both bars. Layer 0's top-8 sigmoid-routed MoE block of thinkingmachines/Inkling-2-Mini (ed40e7da) computed with main's integer rules (12-bit cells, 13-bit per-tensor weights, docs/model.md router and sigmoid table, two new 2^-8-step tables for the soft-capped SwiGLU, a rounded-division routing weight at 2^13) against our own numpy float64 version of the same block, on the 10 frozen prompt texts of 20261109-8 (2,426 tokens), exact float64 input, open loop. B1 (Qwen A2 shape, per prompt): rel_y median 0.0218, max 0.0304 vs median <= 0.01, max <= 0.05: FAIL. B2: the top-8 expert set differs on 91 of 2,426 tokens (3.75%) vs <= 1%: FAIL; each flip changes exactly one expert. B3 range: IN-BOUND, 0 events at every site. With the float set and float weights the integer expert arithmetic alone gives pooled rel_y 0.0079 (descriptive). Deterministic, two processes bit-identical. Measured, unreplicated. Float reference is our reading of open transformers PR 51050 (6173a2f6), not checked against the publisher's runtime. One block, no logits, no proof | negative, unreplicated | unreplicated | [experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md](experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md) | #230 | | `qwen-silu-step-vs-clip-221` | Qwen3.8-27B abliterated layers 31 to 63: SiLU table step vs domain clip, one change at a time (M31-C clip removed, M31-T step removed), issue #221: Registered diagnostic, valid (G1 REF top-1 = PR 173: True; G2 M31-C#2 bit-equal: True; G3 no guard error: True). From PR 167's layer-30 REF residual, abliterated layers 31 to 63, 1461 positions of 10 frozen prompts, float64 heads/attention/norms/lm_head; one change at a time to PR 138's SiLU lookup. M31-C: top-1 1459 of 1461 (99.86%), KL median 2.06e-06, max 0.00215 nats; M31-T: top-1 1424 of 1461 (97.47%), KL median 0.00146, max 1.93 nats. H-C (removing only the clip halves PR 202's M31 KL median 1.466e-3): ratio 0.001408, HOLDS. H-T (removing only the step halves it): ratio 0.9948, DOES NOT HOLD. Registered outcome: H-C only: the clip carries the token error; the step alone does not halve it. Diagnostic arms, not operators; chooses no repair. No proof | measured, unreplicated | unreplicated | [experiments/20261118-221-silu-step-clip/RESULTS.md](experiments/20261118-221-silu-step-clip/RESULTS.md), [experiments/20261118-221-silu-step-clip/runs/summary.json](experiments/20261118-221-silu-step-clip/runs/summary.json), [experiments/20261118-221-silu-step-clip/runs/e2e-abl.json](experiments/20261118-221-silu-step-clip/runs/e2e-abl.json), [experiments/20261118-221-silu-step-clip/ENV.json](experiments/20261118-221-silu-step-clip/ENV.json), [experiments/20261118-221-silu-step-clip/PREREG.md](experiments/20261118-221-silu-step-clip/PREREG.md) | #224 | +| `qwen-packed-trace-ref-240` | Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240): PASS on both registered criteria. Measured, unreplicated, one head, one layer, 4 tokens, no proof. A CPU layout of V head 0, layer 0 of the pinned stock Qwen3.8-27B (4 tokens of the fixture prompt from sequence start, PR #68 integer head, F = 12) as signed-byte limbs, array by array as DESIGN 7.3 and count_m3.py count them, plus the scalars and the floor remainders the head's relations need, takes 88,703.33 limbs per V head per token against the design's 85,861.33: ratio 1.0331 (bar 0.9 to 1.1). The design's own arrays alone are 85,845.33 (by construction equal widths); the excess is 2,816 limbs of floor remainders other than S's and 26 more scalar limbs. Every limb in class, every remainder in its exact class, every value recomposed exactly, S', o, y equal the harness at all tokens; 5 runs identical. With the built head in count_m3's formula (overhead 1.27 and dense parts unchanged) the per-token full-model figure is 97.8M entries, COUNTED not built (design 95.1M). Finding: the design's 2 limbs for s = SiLU(z) do not hold the pinned table's image (32,741 > 32,639); in class on this input (max 20,264), out of class on a synthetic debug input. NOT established: any proof, CUDA, relation or the 1.27 factor; other inputs, heads, layers or windows; the M3 arithmetic (arrays hold M2 harness values); low-rank form; chunk handoff; accuracy | measured, unreplicated | unreplicated | [experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md](experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md), [experiments/20261129-240-qwen-packed-trace-ref/PREREG.md](experiments/20261129-240-qwen-packed-trace-ref/PREREG.md), [experiments/20261129-240-qwen-packed-trace-ref/ENV.json](experiments/20261129-240-qwen-packed-trace-ref/ENV.json), [experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json](experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json), [experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json](experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json), [research/operators/qwen_packed_ref/README.md](research/operators/qwen_packed_ref/README.md) | #247 | diff --git a/README.md b/README.md index 7903f313..5af501e9 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,9 @@ Every number below comes from a file on `main` (the one exception, a reviewer fi | Qwen M3a-1 weight side: one DeltaNet head's real weights in a committed table, the trace's 1,666 weight cells in class and tied to it (issue #229) | measured, unreplicated | Measured, unreplicated, CPU research harness, research setting (no security level). The 3,288,706 integer weights of V head 0, layer 0 of the pinned stock Qwen3.8-27B (each fetched tensor SHA-256 equal to the merged stream hash) are a committed table; the 1,666 weights the head trace reads (conv taps, gains, cA, dt_bias) are product-oracle cells in their design classes by exact bits and are tied to the table by one point drawn after both commitments and one LIN claim on the table (one-time test). 5 of 5 honest proofs verified; all 8 registered hostile proofs rejected (other root twice, a tap changed two ways, gain 2^50, gain in class but not the table one, dt_bias 2^17, table row 0 non-zero past the cells); 3 of 3 completeness cases accepted (dt_int 78,848, -23,424, 2^17 - 1). NOT established: any bound on the 3,287,040 matrix weights (no Qwen layout of the WF range proof); any head computation (in_proj as a claim, sub-step c, not started); any soundness level (LIN runs on a hand-made test plan, rounds unpriced); hiding; that the table is the advertised checkpoint; accuracy | CPU only, cores 2-7 of a shared loaded host, single-threaded runs through the heavy-job gate, g++ 13.3.0 -O2; PREREG first and alone, one amendment (implementation choices) committed before the runs; debug only on a synthetic fixture (numpy seed 9101, head 1); research setting target 10 bits, query work 6; LIN plan hand-made (lin_world.h) | [experiments/20261121-229-qwen-m3a1-weight-side/RESULTS.md](experiments/20261121-229-qwen-m3a1-weight-side/RESULTS.md) | | Inkling 2 Mini layer-0 routed MLP under main's integer rules, real NVFP4 weights, open loop vs float64 | negative, unreplicated | FAIL vs prereg on both bars. Layer 0's top-8 sigmoid-routed MoE block of thinkingmachines/Inkling-2-Mini (ed40e7da) computed with main's integer rules (12-bit cells, 13-bit per-tensor weights, docs/model.md router and sigmoid table, two new 2^-8-step tables for the soft-capped SwiGLU, a rounded-division routing weight at 2^13) against our own numpy float64 version of the same block, on the 10 frozen prompt texts of 20261109-8 (2,426 tokens), exact float64 input, open loop. B1 (Qwen A2 shape, per prompt): rel_y median 0.0218, max 0.0304 vs median <= 0.01, max <= 0.05: FAIL. B2: the top-8 expert set differs on 91 of 2,426 tokens (3.75%) vs <= 1%: FAIL; each flip changes exactly one expert. B3 range: IN-BOUND, 0 events at every site. With the float set and float weights the integer expert arithmetic alone gives pooled rel_y 0.0079 (descriptive). Deterministic, two processes bit-identical. Measured, unreplicated. Float reference is our reading of open transformers PR 51050 (6173a2f6), not checked against the publisher's runtime. One block, no logits, no proof | CPU only, numpy and tokenizers only (no torch, no transformers); weights by HTTP range reads of layer 0 and 317 embedding rows (630 MB of 19.5 GB); NVFP4 decode per the PR's dequantise op, checked D1-D4 (max \|w\| / amax = 1.000 every expert); gate/up order from the PR's Interleave + chunk; input exponent fitted in-sample (Em = 6); attention sub-block float64 only; one layer, open loop; shared loaded host | [experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md](experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md) | | Qwen3.8-27B abliterated layers 31 to 63: SiLU table step vs domain clip, one change at a time (M31-C clip removed, M31-T step removed), issue #221 | measured, unreplicated | Registered diagnostic, valid (G1 REF top-1 = PR 173: True; G2 M31-C#2 bit-equal: True; G3 no guard error: True). From PR 167's layer-30 REF residual, abliterated layers 31 to 63, 1461 positions of 10 frozen prompts, float64 heads/attention/norms/lm_head; one change at a time to PR 138's SiLU lookup. M31-C: top-1 1459 of 1461 (99.86%), KL median 2.06e-06, max 0.00215 nats; M31-T: top-1 1424 of 1461 (97.47%), KL median 0.00146, max 1.93 nats. H-C (removing only the clip halves PR 202's M31 KL median 1.466e-3): ratio 0.001408, HOLDS. H-T (removing only the step halves it): ratio 0.9948, DOES NOT HOLD. Registered outcome: H-C only: the clip carries the token error; the step alone does not halve it. Diagnostic arms, not operators; chooses no repair. No proof | Preregistered (experiments/20261118-221-silu-step-clip/PREREG.md); start state PR 167's ckpt.npz sha256 22dff8b92107511838e50e4b26d6e91a2b55d09064711c638042c4c18fb80009, next_layer 31, checked before registration and re-hashed in the job, REF entries only, layers 0 to 30 not regenerated; abliterated layers 31 to 63, final norm, lm_head; PR 124's frozen prompts teacher-forced; PR 202 harness, PR 138 mlp_int stages, PR 124 logits_metrics, PR 88 forward reused; M31 and M31-S not rerun (PR 202 values cited); CPU, taskset 8 to 13, one deterministic run with an in-run duplicate path; shared loaded host; no GPU, no serving route, no proof | [experiments/20261118-221-silu-step-clip/RESULTS.md](experiments/20261118-221-silu-step-clip/RESULTS.md) | +| Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240) | measured, unreplicated | PASS on both registered criteria. Measured, unreplicated, one head, one layer, 4 tokens, no proof. A CPU layout of V head 0, layer 0 of the pinned stock Qwen3.8-27B (4 tokens of the fixture prompt from sequence start, PR #68 integer head, F = 12) as signed-byte limbs, array by array as DESIGN 7.3 and count_m3.py count them, plus the scalars and the floor remainders the head's relations need, takes 88,703.33 limbs per V head per token against the design's 85,861.33: ratio 1.0331 (bar 0.9 to 1.1). The design's own arrays alone are 85,845.33 (by construction equal widths); the excess is 2,816 limbs of floor remainders other than S's and 26 more scalar limbs. Every limb in class, every remainder in its exact class, every value recomposed exactly, S', o, y equal the harness at all tokens; 5 runs identical. With the built head in count_m3's formula (overhead 1.27 and dense parts unchanged) the per-token full-model figure is 97.8M entries, COUNTED not built (design 95.1M). Finding: the design's 2 limbs for s = SiLU(z) do not hold the pinned table's image (32,741 > 32,639); in class on this input (max 20,264), out of class on a synthetic debug input. NOT established: any proof, CUDA, relation or the 1.27 factor; other inputs, heads, layers or windows; the M3 arithmetic (arrays hold M2 harness values); low-rank form; chunk handoff; accuracy | CPU only, cores 6-7 of a shared loaded host, Python 3.12.3, NumPy 2.4.3; deterministic integer arithmetic; PREREG first and alone, amendment A1 (debug finding) committed before the registered run; debug only on synthetic in_proj outputs (numpy seed 240); PR #231 head-0 weights read only and 51,200 bytes fetched (4 embedding rows, layer-0 input norm), all SHA-256 checked against merged manifests | [experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md](experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md) | -_Last regenerated from `research/results.yaml` on 2026-11-21 (UTC), against main `0ffc7985`._ +_Last regenerated from `research/results.yaml` on 2026-11-29 (UTC), against main `02d62eb6`._ What this table does not show: no full-size run on real (Maverick) weights, no real model weights on GPU, no serving, no TEE, no production use, and no comparison with other verifiable-inference systems. The GPU rows are upstream's small example on made-up weights, plus one incomplete, unreplicated full-size study on made-up (synthetic) weights (PR #44: one session per arm, below its registered n). diff --git a/experiments/20261129-240-qwen-packed-trace-ref/ENV.json b/experiments/20261129-240-qwen-packed-trace-ref/ENV.json new file mode 100644 index 00000000..848d640d --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/ENV.json @@ -0,0 +1,24 @@ +{ + "experiment": "20261129-240-qwen-packed-trace-ref", + "commits": { + "base_main": "02d62eb63760fcaf68f47099c70f42aba04a7707", + "prereg": "838c388", + "amendment_A1": "3b3a2e3", + "code_and_debug": "1501cc4", + "registered_runs": "df33b06", + "imported_unchanged": { + "real_head.py": "experiments/20261109-8-qwen-real-weights/real_head.py (PR #68)", + "count_m3.py": "research/operators/qwen_m3/count_m3.py", + "fetch.py": "experiments/20261109-8-qwen-real-weights/fetch.py get()" + } + }, + "toolchain": {"python": "3.12.3", "numpy": "2.4.3"}, + "hardware": {"cpu": "AMD EPYC-Rome, 16 vCPU, KVM", "cores_used": "6-7 (taskset)", "shared_host": true, + "note": "host shared and loaded with other lanes; nothing here is timed"}, + "seeds": [240], + "seeds_note": "240 = numpy seed of the synthetic debug input only; the registered run has no randomness", + "model": {"repo": "Qwen/Qwen3.8-27B", "revision": "37561816e66b5b9153b1b64c10968c18c1e6f4a0", "layer": 0, "v_head": 0, "qk_head": 0}, + "input_tokens": [760, 6511, 314, 14898], + "weights": "PR #231 head-0 data read only, SHA-256 checked (runs/inputs.json); input_layernorm.weight and 4 embedding rows fetched (51,200 bytes), SHA-256 checked against merged manifests", + "F": 12 +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md b/experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md new file mode 100644 index 00000000..64fc88ab --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md @@ -0,0 +1,70 @@ +# RESULTS: 20261129-240-qwen-packed-trace-ref + +Issue #240. PREREG: `PREREG.md` (first commit 838c388, alone; amendment A1 in 3b3a2e3, before the registered run). Base main 02d62eb6. + +**Verdict: PASS on both registered criteria.** Measured, unreplicated. One head, one layer, 4 tokens. + +| item | registered bar | result | file | +|---|---|---|---| +| 1. count | 0.9 <= built / 85,861.33 <= 1.1 | 88,703.33 limbs per V head per token, ratio **1.0331**: PASS | `runs/real-head0-T4.json` `summary` | +| 2. classes | every limb in class, every remainder in its exact class, every value recomposes exactly, S', o, y equal run_int | 0 values out of class, 0 remainders out of class, 0 recomposition mismatches, harness equal at all 4 tokens: PASS | `runs/real-head0-T4.json` `arrays`, `harness_checks` | +| repeats | n = 5 identical | 5 of 5 identical in every field but the start time | `runs/repeats.json` | +| checker controls | all must behave | all ok (32,640 and -32,897 out of the 2-limb class, 8,355,712 and -8,421,505 out of the 3-limb class, remainder = divisor refused, a changed limb recomposes unequal) | `runs/controls.json` | + +## The count, array group by group (limbs per V head per token) + +| group | design (count_m3) | built | note | +|---|---|---|---| +| state S' (16,384 x 3) | 49,152 | 49,152 | same widths | +| floor remainder of S' (16,384 x 2) | 32,768 | 32,768 | same widths | +| per-channel vectors (conv out, v, M, delta, o, w, s, t, y) | 3,328 | 3,328 | same widths | +| q/k path / 3 (conv out q, k; SiLU q, k; q^, k^) | 597.33 | 597.33 | same widths | +| scalars | 16 (flat, unlisted) | 42 | the registered list: a, beta, the output norm's sigma, Rc, e1, e2, rr, gap, the q and k norms' sigma, e1, e2 | +| floor remainders the design does not list | 0 | 2,816 | per channel M (4), delta, o, conv v, t, y (2 each), w (4) = 2,304; q/k path / 3: conv q, k (2 each), L2-norm remainder q (5), k (3) = 512 | +| **total** | **85,861.33** | **88,703.33** | ratio 1.0331; the design's own arrays alone 85,845.33 (0.9998, the difference is its flat 16 scalars) | + +Every array the design lists was produced, value for value, from the harness head, at exactly the design's limb count (so the agreement of that part, 0.9998, is by construction: what the run tests there is that the values fit). The 3.3% excess is the remainders the head's relations need (DESIGN 5.0 to 5.4 give each floor an exact remainder class) that 7.3's packed count omits, plus 26 more scalar limbs. + +**Full model, COUNTED, not built:** with the built per-head figure in count_m3's formula (48 V heads x 48 DeltaNet layers / 3 limbs per entry x the planner overhead 1.2696, the dense parts unchanged) the per-token figure is **97,828,892** entries instead of 95,057,841 (ratio 1.0292). The overhead factor and the dense parts are the design's, not built (`runs/real-head0-T4.json` `summary.entries_per_token_with_built_head_COUNTED`). + +## Ranges on the registered input (max over 4 tokens; balanced signed-byte digits are in [-128, 127] by construction, so max |limb| is 128 or less for every array and says nothing by itself) + +| array | limbs | min .. max value | limbs needed | headroom note | +|---|---|---|---|---| +| S' | 3 | -6,482 .. 17,375 | 2 | | +| conv out v, v | 3 | -697 .. 122,142 | 3 | the only design vectors that need their third limb here | +| M | 3 | -3,007 .. 1,707 | 2 | | +| delta | 3 | -66 .. 29,057 | 2 | | +| o | 3 | -1 .. 93 | 1 | | +| w | 2 | -68 .. 3,662 | 2 | | +| s = SiLU(z) | 2 | -1,141 .. 20,264 | 2 | 62% of 32,639; see below | +| t | 3 | -258 .. 14 | 2 | | +| y | 4 | -2,384 .. 147 | 2 | | +| conv out q, k | 3 | -23,973 .. 11,311 | 2 | | +| SiLU q, k | 2 | -1,141 .. 10,639 | 2 | | +| q^, k^ | 2 | -627 .. 2,585 | 2 | | +| k-norm e1 (scalar) | 3 | 0 .. 36,794 | 3 | | +| Rc of the output norm | 5 | 0 .. 1,126,548,798 | 4 | | +| L2 remainder of q | 5 | 0 .. 930,894,677 | 4 | | + +All rows: `runs/real-head0-T4.json` `arrays` (fields `min_value`, `max_value`, `min_limbs_needed`, `max_abs_limb`). + +## Findings to carry + +1. **The design's 2 limbs for s = SiLU(z) do not hold the pinned SiLU table's image.** DESIGN 5.4 says |s| <= 32,741 by the table; two signed-byte limbs end at 32,639 (`docs/model.md`). On the registered input the maximum was 20,264 (in class). On the synthetic debug input (Gaussian in_proj outputs at scale 4) 16 of 512 values were out of class, max 48,986 (`runs/debug-synthetic.json`; recorded in amendment A1 before the registered run). With a SiLU computed as IntHead does (no table clamp) s is unbounded above; with the table it is at most 32,741. Either way s needs 3 limbs, or a table whose top row is <= 32,639: about +128 limbs per V head per token if widened (+0.15%). +2. **The packed count omits the floor remainders other than S's.** 2,816 limbs per V head per token (3.3%). Whether the GPU prover would commit them or use them as lookup keys is a design choice (count_m3 counts S's remainder both ways); as committed cells they are part of the count. +3. **Issue #240 text vs what main holds** (checked, PREREG "Input"): the fixture prompt `FIXTURE` is defined in `experiments/20261110-8-qwen-q1-deep-fidelity/q1_forward.py` (PR #88) and used by PR #124's `e2e.py fixture`; "the M2 reference" `research/operators/qwen_deltanet_m2_build/reference_m2.py` runs on synthetic inputs only, so the real-weight integer head is PR #68's `real_head.py` IntHead (same M2 contract, checked bit for bit by its own selfcheck); PR #231's data has no embedding rows and no input norm, so "no other fetch" could not hold: 40,960 + 10,240 bytes (4 rows, one norm vector) were fetched and hash-checked (`runs/inputs.json`). The issue's figures (95,057,841, 88%) are what main's count_m3 produces (checked). + +## Deviations + +- The fetch above (51,200 bytes) beyond "reuse PR #231's data, no other fetch". Every byte is SHA-256 checked against merged manifests. +- None in the registered runs, widths or threshold. + +## NOT established + +- Any proof, CUDA kernel, relation, sumcheck or lookup array, or the factor 1.27 from cells to committed entries: the full-model 97.8M is a count with that factor taken unchanged. +- That the design's widths hold on other inputs, other heads, deeper layers or longer windows: 4 tokens from sequence start on one head bound nothing (PR #68 saw larger M and S on longer prompts). +- The M3 arithmetic (362-scaled q, cA decay, table lookups keyed on cells): the arrays hold M2 harness values. s, t, y are formed here, not harness values. +- The low-rank form and the chunk-boundary handoff. +- Accuracy (F = 12 misses the fidelity bar on layer 0, PR #68). +- Replication by another lane. diff --git a/research/coverage/inventory.yaml b/research/coverage/inventory.yaml index a82546ef..62f5b576 100644 --- a/research/coverage/inventory.yaml +++ b/research/coverage/inventory.yaml @@ -1011,6 +1011,8 @@ excluded: reason: "Qwen DeltaNet M1, superseded by the M1b lookup prototype (OP-R4); its M1 verdict is FAIL as registered; not inventoried" - path: research/operators/qwen_m3 reason: "counting and cost model, no proof and no relation that enforces anything" + - path: research/operators/qwen_packed_ref + reason: "CPU layout and limb count of one DeltaNet head's packed trace (issue #240); no proof, no relation, no verifier: it constrains no prover and enforces nothing" - path: research/operators/qwen_deltanet_m2_build reason: "reached main after this inventory's base (PR #73, main 0bdf8326); its two-lookup relations are not inventoried here (follow-up)" - path: research/operators/qwen_handoff diff --git a/research/operators/qwen_packed_ref/README.md b/research/operators/qwen_packed_ref/README.md new file mode 100644 index 00000000..a96bd04d --- /dev/null +++ b/research/operators/qwen_packed_ref/README.md @@ -0,0 +1,38 @@ +# Qwen packed DeltaNet trace: CPU reference for one head (issue #240, research only) + +Registration and results: [`experiments/20261129-240-qwen-packed-trace-ref`](../../../experiments/20261129-240-qwen-packed-trace-ref/). No existing file is changed: the code imports `experiments/20261109-8-qwen-real-weights/real_head.py` (PR #68) and `research/operators/qwen_m3/count_m3.py` as they are on main. + +## What it is + +A **count and a layout**, not a proof. For V head 0 of layer 0 of the pinned stock Qwen3.8-27B, 4 tokens from sequence start, it takes the harness head's integer values (PR #68 `IntHead`, the M2 contract, F = 12), writes every array that DESIGN 7.3 of `experiments/20261109-32-qwen-m3-design` and `count_m3.deltanet_limbs('per_token')` count as balanced signed-byte limbs (the upstream provers' cell, `docs/glossary.md` "Cell, limb"), recomposes every value from its limbs and compares it with the harness value exactly, checks every limb against its class, and counts limbs per V head per token. It also lays out the scalars and the floor remainders that the head's relations need and the design does not list. + +## What it enforces + +Nothing. No relation, no commitment, no verifier. It does not constrain a prover; it says how many byte limbs an honest packed trace of this head takes and whether the honest values fit the widths the design gives them on these inputs. + +## What is not covered + +- Any proof, CUDA kernel, relation, sumcheck or lookup array. The factor 1.27 that turns cells into committed entries in count_m3, and the dense parts of a layer, are taken from the design, not built. +- The low-rank form, the chunk-boundary handoff, other heads or layers, accuracy. +- The M3 arithmetic changes other than the gated norm (the 362-scaled q, the cA decay path, function tables keyed on cells): arrays are filled from the M2 harness values. s, t and y of the M3 gated norm (DESIGN 5.4) have no harness counterpart and are formed here (s = SiLU(z) by `IntHead.silu`, t = floor(s w / 2^12), y = floor(gain_int t / 2^8), gain_int from PR #231's table). +- Worst cases: 4 tokens on one head bound nothing. + +## Files + +- `prepare.py`: checks PR #231's head-0 tensors and `M.i32` against the merged hashes; fetches layer 0's `input_layernorm.weight` and the 4 embedding rows by HTTP range with the merged `fetch.py` `get()` into a directory outside the repository and checks each against merged hashes. Writes `runs/inputs.json` (hashes and shapes only). +- `packed_ref.py`: the layout, the class checks and the count. `controls` runs the checker controls; `debug` uses synthetic in_proj outputs (numpy seed 240); `real` is the registered input. +- `compare_runs.py`: checks that the registered run and its repeats agree field for field. + +## Reproduce + +From the repository root (Python 3 with NumPy; pin cores on a shared host): + +```sh +python3 research/operators/qwen_packed_ref/prepare.py /inputs.json +python3 research/operators/qwen_packed_ref/packed_ref.py controls /controls.json +python3 research/operators/qwen_packed_ref/packed_ref.py debug /debug-synthetic.json +python3 research/operators/qwen_packed_ref/packed_ref.py real /real-head0-T4.json +python3 research/operators/qwen_packed_ref/compare_runs.py /repeats.json /real-head0-T4.json /real-head0-T4-rep2.json ... +``` + +`` is what `research/operators/qwen_m3a1/prepare.py real` writes (about 232 MB). Each run takes a few seconds and well under 1 GB. diff --git a/research/results.yaml b/research/results.yaml index 23fee63c..30f19d0c 100644 --- a/research/results.yaml +++ b/research/results.yaml @@ -2074,3 +2074,17 @@ results: - {"name": "m31t_l31_63_h_ge_2e18", "stat": "count", "value": 635, "unit": "count", "n": 1, "spread": null, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-18", "commit": "864939887782e1428d9e30947a45946c4b0fb06f", "source": "experiments/20261118-221-silu-step-clip/runs/summary.json", "note": "Measured, unreplicated; M31-T entries with |h| >= 2^18 (honest contract), layers 31 to 63; spread null: exact count"} - {"name": "layer_seconds_median_silu221", "stat": "median", "value": 135.9, "unit": "s", "n": 33, "spread": {"sd": null, "min": 116.6, "max": 183.1}, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-18", "commit": "864939887782e1428d9e30947a45946c4b0fb06f", "source": "experiments/20261118-221-silu-step-clip/run-record.json", "note": "Measured, unreplicated, descriptive; wall clock per layer, REF + M31-C + M31-T on all prompts + M31-C#2 on 2 prompts, 6 cores on a shared loaded host; spread over layers of one run, SD not computed"} - {"name": "peak_rss_silu221", "stat": "max", "value": 8424324, "unit": "KiB", "n": 1, "spread": null, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-18", "commit": "864939887782e1428d9e30947a45946c4b0fb06f", "source": "experiments/20261118-221-silu-step-clip/run.time", "note": "Measured, unreplicated; time -v Maximum resident set size (largest single process); one run"} + + - id: qwen-packed-trace-ref-240 + title: "Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240)" + status: "measured" + replication: "unreplicated" + pr: 247 + summary: "PASS on both registered criteria. Measured, unreplicated, one head, one layer, 4 tokens, no proof. A CPU layout of V head 0, layer 0 of the pinned stock Qwen3.8-27B (4 tokens of the fixture prompt from sequence start, PR #68 integer head, F = 12) as signed-byte limbs, array by array as DESIGN 7.3 and count_m3.py count them, plus the scalars and the floor remainders the head's relations need, takes 88,703.33 limbs per V head per token against the design's 85,861.33: ratio 1.0331 (bar 0.9 to 1.1). The design's own arrays alone are 85,845.33 (by construction equal widths); the excess is 2,816 limbs of floor remainders other than S's and 26 more scalar limbs. Every limb in class, every remainder in its exact class, every value recomposed exactly, S', o, y equal the harness at all tokens; 5 runs identical. With the built head in count_m3's formula (overhead 1.27 and dense parts unchanged) the per-token full-model figure is 97.8M entries, COUNTED not built (design 95.1M). Finding: the design's 2 limbs for s = SiLU(z) do not hold the pinned table's image (32,741 > 32,639); in class on this input (max 20,264), out of class on a synthetic debug input. NOT established: any proof, CUDA, relation or the 1.27 factor; other inputs, heads, layers or windows; the M3 arithmetic (arrays hold M2 harness values); low-rank form; chunk handoff; accuracy" + conditions: "CPU only, cores 6-7 of a shared loaded host, Python 3.12.3, NumPy 2.4.3; deterministic integer arithmetic; PREREG first and alone, amendment A1 (debug finding) committed before the registered run; debug only on synthetic in_proj outputs (numpy seed 240); PR #231 head-0 weights read only and 51,200 bytes fetched (4 embedding rows, layer-0 input norm), all SHA-256 checked against merged manifests" + evidence: ["experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md", "experiments/20261129-240-qwen-packed-trace-ref/PREREG.md", "experiments/20261129-240-qwen-packed-trace-ref/ENV.json", "experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json", "experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json", "research/operators/qwen_packed_ref/README.md"] + metrics: + - {"name": "packedref_limbs_per_v_head_per_token", "stat": "single", "value": 88703.33, "unit": "count", "n": 5, "spread": null, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "df33b0601215c05eb4ccef108e1773edbcb44fa3", "source": "experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json", "note": "Measured (a layout count), unreplicated; built limbs per V head per token incl. scalars and the floor remainders the design omits; q/k path divided by 3; 5 runs identical (runs/repeats.json)"} + - {"name": "packedref_ratio_to_design", "stat": "single", "value": 1.0331, "unit": "ratio", "n": 5, "spread": null, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "df33b0601215c05eb4ccef108e1773edbcb44fa3", "source": "experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json", "note": "Measured, unreplicated; built / 85,861.33 (count_m3 deltanet_limbs per_token); registered bar 0.9 to 1.1: PASS"} + - {"name": "packedref_values_out_of_class", "stat": "count", "value": 0, "unit": "count", "n": 1, "spread": null, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "df33b0601215c05eb4ccef108e1773edbcb44fa3", "source": "experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json", "note": "Measured, unreplicated; values whose limbs leave their class, over all arrays and 4 tokens of the registered input; registered bar 0: PASS"} + - {"name": "packedref_full_model_entries_per_token_counted", "stat": "single", "value": 97828892, "unit": "count", "n": 1, "spread": null, "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "df33b0601215c05eb4ccef108e1773edbcb44fa3", "source": "experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json", "note": "COUNTED, not built: count_m3 packed per-token formula with the built per-head limbs in place of the design's; overhead 1.2696 and dense parts are the design's (design 95,057,841)"} From 72992e8b84940082461d8868b31c4f204b0f5c65 Mon Sep 17 00:00:00 2001 From: wakesync <60821182+wakesync@users.noreply.github.com> Date: Sun, 29 Nov 2026 04:09:52 +0000 Subject: [PATCH 6/6] results: regenerate README block and CLAIMS.md after merging main fef9d2b8 scripts/update-results.py after the merge commit (77 results); stamp line kept as main's verbatim. Adds this PR's row for qwen-packed-trace-ref-240 to the README block and CLAIMS.md on top of main's; no other change. --- CLAIMS.md | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CLAIMS.md b/CLAIMS.md index 16f5d945..f30d1943 100644 --- a/CLAIMS.md +++ b/CLAIMS.md @@ -87,3 +87,4 @@ tracked file, which both scripts resolve (they check that it exists, not what it | `inkling-layer0-mlp-fidelity-228` | Inkling 2 Mini layer-0 routed MLP under main's integer rules, real NVFP4 weights, open loop vs float64: FAIL vs prereg on both bars. Layer 0's top-8 sigmoid-routed MoE block of thinkingmachines/Inkling-2-Mini (ed40e7da) computed with main's integer rules (12-bit cells, 13-bit per-tensor weights, docs/model.md router and sigmoid table, two new 2^-8-step tables for the soft-capped SwiGLU, a rounded-division routing weight at 2^13) against our own numpy float64 version of the same block, on the 10 frozen prompt texts of 20261109-8 (2,426 tokens), exact float64 input, open loop. B1 (Qwen A2 shape, per prompt): rel_y median 0.0218, max 0.0304 vs median <= 0.01, max <= 0.05: FAIL. B2: the top-8 expert set differs on 91 of 2,426 tokens (3.75%) vs <= 1%: FAIL; each flip changes exactly one expert. B3 range: IN-BOUND, 0 events at every site. With the float set and float weights the integer expert arithmetic alone gives pooled rel_y 0.0079 (descriptive). Deterministic, two processes bit-identical. Measured, unreplicated. Float reference is our reading of open transformers PR 51050 (6173a2f6), not checked against the publisher's runtime. One block, no logits, no proof | negative, unreplicated | unreplicated | [experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md](experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md) | #230 | | `qwen-silu-step-vs-clip-221` | Qwen3.8-27B abliterated layers 31 to 63: SiLU table step vs domain clip, one change at a time (M31-C clip removed, M31-T step removed), issue #221: Registered diagnostic, valid (G1 REF top-1 = PR 173: True; G2 M31-C#2 bit-equal: True; G3 no guard error: True). From PR 167's layer-30 REF residual, abliterated layers 31 to 63, 1461 positions of 10 frozen prompts, float64 heads/attention/norms/lm_head; one change at a time to PR 138's SiLU lookup. M31-C: top-1 1459 of 1461 (99.86%), KL median 2.06e-06, max 0.00215 nats; M31-T: top-1 1424 of 1461 (97.47%), KL median 0.00146, max 1.93 nats. H-C (removing only the clip halves PR 202's M31 KL median 1.466e-3): ratio 0.001408, HOLDS. H-T (removing only the step halves it): ratio 0.9948, DOES NOT HOLD. Registered outcome: H-C only: the clip carries the token error; the step alone does not halve it. Diagnostic arms, not operators; chooses no repair. No proof | measured, unreplicated | unreplicated | [experiments/20261118-221-silu-step-clip/RESULTS.md](experiments/20261118-221-silu-step-clip/RESULTS.md), [experiments/20261118-221-silu-step-clip/runs/summary.json](experiments/20261118-221-silu-step-clip/runs/summary.json), [experiments/20261118-221-silu-step-clip/runs/e2e-abl.json](experiments/20261118-221-silu-step-clip/runs/e2e-abl.json), [experiments/20261118-221-silu-step-clip/ENV.json](experiments/20261118-221-silu-step-clip/ENV.json), [experiments/20261118-221-silu-step-clip/PREREG.md](experiments/20261118-221-silu-step-clip/PREREG.md) | #224 | | `qwen-weight-cell-classes-239` | Qwen3.8-27B weight-cell classes (DESIGN 6.2) on all 48 DeltaNet layers: conv taps, gains, cA, dt_bias, honest conversion, both checkpoints (issue #239): PASS vs prereg. Every honestly converted conv tap, gain x sqrt(128), cA and dt_bias integer (DESIGN 5.0, merged exponent_of, one exponent per tensor per layer) on all 48 DeltaNet layers lies in its DESIGN 6.2 class: 0 out of class of 1,976,832 integers per checkpoint; every exponent in 1..24 (e_conv 12-13, e_gain 7-8, e_A 4-13). For taps, gains and cA (1,974,528 of the 1,976,832 integers per checkpoint) being in class follows from the exponent rule, so an honest conversion cannot fail there; what could have failed is the exponent admission (144 exponents per checkpoint, 288 over both, each in 1..24) and the dt_bias class (2,304 values per checkpoint). The four tensors have equal SHA-256 per tensor in the stock and abliterated checkpoints (192 of 192, byte-identical), so one answer covers both. Descriptive: dt_bias alone puts the softplus input outside v1's [-8, 8) on 17 of 2,304 heads (16 at or above 8: 15 on layer 0, 1 on layer 58; 1 below -8 on layer 1); offset range -8.94 to 19.25. cA keeps as few as 2 significant bits (357 of 2,304 heads at 5 bits or fewer; the smallest head of a layer keeps fewer than 5 bits on 18 of 48 layers, 2 bits on layers 12, 28 and 44). Integer counts only, no proof, no matrix weights, no activations | measured, unreplicated | unreplicated | [experiments/20261129-239-qwen-weight-cell-classes/RESULTS.md](experiments/20261129-239-qwen-weight-cell-classes/RESULTS.md), [experiments/20261129-239-qwen-weight-cell-classes/PREREG.md](experiments/20261129-239-qwen-weight-cell-classes/PREREG.md), [experiments/20261129-239-qwen-weight-cell-classes/ENV.json](experiments/20261129-239-qwen-weight-cell-classes/ENV.json), [experiments/20261129-239-qwen-weight-cell-classes/runs/summary.json](experiments/20261129-239-qwen-weight-cell-classes/runs/summary.json), [experiments/20261129-239-qwen-weight-cell-classes/runs/ckpt-compare.json](experiments/20261129-239-qwen-weight-cell-classes/runs/ckpt-compare.json) | #243 | +| `qwen-packed-trace-ref-240` | Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240): PASS on both registered criteria. Measured, unreplicated, one head, one layer, 4 tokens, no proof. A CPU layout of V head 0, layer 0 of the pinned stock Qwen3.8-27B (4 tokens of the fixture prompt from sequence start, PR #68 integer head, F = 12) as signed-byte limbs, array by array as DESIGN 7.3 and count_m3.py count them, plus the scalars and the floor remainders the head's relations need, takes 88,703.33 limbs per V head per token against the design's 85,861.33: ratio 1.0331 (bar 0.9 to 1.1). The design's own arrays alone are 85,845.33 (by construction equal widths); the excess is 2,816 limbs of floor remainders other than S's and 26 more scalar limbs. Every limb in class, every remainder in its exact class, every value recomposed exactly, S', o, y equal the harness at all tokens; 5 runs identical. With the built head in count_m3's formula (overhead 1.27 and dense parts unchanged) the per-token full-model figure is 97.8M entries, COUNTED not built (design 95.1M). Finding: the design's 2 limbs for s = SiLU(z) do not hold the pinned table's image (32,741 > 32,639); in class on this input (max 20,264), out of class on a synthetic debug input. NOT established: any proof, CUDA, relation or the 1.27 factor; other inputs, heads, layers or windows; the M3 arithmetic (arrays hold M2 harness values); low-rank form; chunk handoff; accuracy | measured, unreplicated | unreplicated | [experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md](experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md), [experiments/20261129-240-qwen-packed-trace-ref/PREREG.md](experiments/20261129-240-qwen-packed-trace-ref/PREREG.md), [experiments/20261129-240-qwen-packed-trace-ref/ENV.json](experiments/20261129-240-qwen-packed-trace-ref/ENV.json), [experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json](experiments/20261129-240-qwen-packed-trace-ref/runs/real-head0-T4.json), [experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json](experiments/20261129-240-qwen-packed-trace-ref/runs/repeats.json), [research/operators/qwen_packed_ref/README.md](research/operators/qwen_packed_ref/README.md) | #247 | diff --git a/README.md b/README.md index 1d7affcc..b5d5af43 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ Every number below comes from a file on `main` (the one exception, a reviewer fi | Inkling 2 Mini layer-0 routed MLP under main's integer rules, real NVFP4 weights, open loop vs float64 | negative, unreplicated | FAIL vs prereg on both bars. Layer 0's top-8 sigmoid-routed MoE block of thinkingmachines/Inkling-2-Mini (ed40e7da) computed with main's integer rules (12-bit cells, 13-bit per-tensor weights, docs/model.md router and sigmoid table, two new 2^-8-step tables for the soft-capped SwiGLU, a rounded-division routing weight at 2^13) against our own numpy float64 version of the same block, on the 10 frozen prompt texts of 20261109-8 (2,426 tokens), exact float64 input, open loop. B1 (Qwen A2 shape, per prompt): rel_y median 0.0218, max 0.0304 vs median <= 0.01, max <= 0.05: FAIL. B2: the top-8 expert set differs on 91 of 2,426 tokens (3.75%) vs <= 1%: FAIL; each flip changes exactly one expert. B3 range: IN-BOUND, 0 events at every site. With the float set and float weights the integer expert arithmetic alone gives pooled rel_y 0.0079 (descriptive). Deterministic, two processes bit-identical. Measured, unreplicated. Float reference is our reading of open transformers PR 51050 (6173a2f6), not checked against the publisher's runtime. One block, no logits, no proof | CPU only, numpy and tokenizers only (no torch, no transformers); weights by HTTP range reads of layer 0 and 317 embedding rows (630 MB of 19.5 GB); NVFP4 decode per the PR's dequantise op, checked D1-D4 (max \|w\| / amax = 1.000 every expert); gate/up order from the PR's Interleave + chunk; input exponent fitted in-sample (Em = 6); attention sub-block float64 only; one layer, open loop; shared loaded host | [experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md](experiments/20261121-228-inkling-layer0-fidelity/RESULTS.md) | | Qwen3.8-27B abliterated layers 31 to 63: SiLU table step vs domain clip, one change at a time (M31-C clip removed, M31-T step removed), issue #221 | measured, unreplicated | Registered diagnostic, valid (G1 REF top-1 = PR 173: True; G2 M31-C#2 bit-equal: True; G3 no guard error: True). From PR 167's layer-30 REF residual, abliterated layers 31 to 63, 1461 positions of 10 frozen prompts, float64 heads/attention/norms/lm_head; one change at a time to PR 138's SiLU lookup. M31-C: top-1 1459 of 1461 (99.86%), KL median 2.06e-06, max 0.00215 nats; M31-T: top-1 1424 of 1461 (97.47%), KL median 0.00146, max 1.93 nats. H-C (removing only the clip halves PR 202's M31 KL median 1.466e-3): ratio 0.001408, HOLDS. H-T (removing only the step halves it): ratio 0.9948, DOES NOT HOLD. Registered outcome: H-C only: the clip carries the token error; the step alone does not halve it. Diagnostic arms, not operators; chooses no repair. No proof | Preregistered (experiments/20261118-221-silu-step-clip/PREREG.md); start state PR 167's ckpt.npz sha256 22dff8b92107511838e50e4b26d6e91a2b55d09064711c638042c4c18fb80009, next_layer 31, checked before registration and re-hashed in the job, REF entries only, layers 0 to 30 not regenerated; abliterated layers 31 to 63, final norm, lm_head; PR 124's frozen prompts teacher-forced; PR 202 harness, PR 138 mlp_int stages, PR 124 logits_metrics, PR 88 forward reused; M31 and M31-S not rerun (PR 202 values cited); CPU, taskset 8 to 13, one deterministic run with an in-run duplicate path; shared loaded host; no GPU, no serving route, no proof | [experiments/20261118-221-silu-step-clip/RESULTS.md](experiments/20261118-221-silu-step-clip/RESULTS.md) | | Qwen3.8-27B weight-cell classes (DESIGN 6.2) on all 48 DeltaNet layers: conv taps, gains, cA, dt_bias, honest conversion, both checkpoints (issue #239) | measured, unreplicated | PASS vs prereg. Every honestly converted conv tap, gain x sqrt(128), cA and dt_bias integer (DESIGN 5.0, merged exponent_of, one exponent per tensor per layer) on all 48 DeltaNet layers lies in its DESIGN 6.2 class: 0 out of class of 1,976,832 integers per checkpoint; every exponent in 1..24 (e_conv 12-13, e_gain 7-8, e_A 4-13). For taps, gains and cA (1,974,528 of the 1,976,832 integers per checkpoint) being in class follows from the exponent rule, so an honest conversion cannot fail there; what could have failed is the exponent admission (144 exponents per checkpoint, 288 over both, each in 1..24) and the dt_bias class (2,304 values per checkpoint). The four tensors have equal SHA-256 per tensor in the stock and abliterated checkpoints (192 of 192, byte-identical), so one answer covers both. Descriptive: dt_bias alone puts the softplus input outside v1's [-8, 8) on 17 of 2,304 heads (16 at or above 8: 15 on layer 0, 1 on layer 58; 1 below -8 on layer 1); offset range -8.94 to 19.25. cA keeps as few as 2 significant bits (357 of 2,304 heads at 5 bits or fewer; the smallest head of a layer keeps fewer than 5 bits on 18 of 48 layers, 2 bits on layers 12, 28 and 44). Integer counts only, no proof, no matrix weights, no activations | Preregistered (experiments/20261129-239-qwen-weight-cell-classes/PREREG.md, amendments A1, A2 before the runs they cover by commit order; A3 corrects the times typed into them); 192 tensors per checkpoint by HTTP range with the merged fetch code, each SHA-256 equal to the merged stream manifest; unit test of every class edge (31 cases, synthetic); five identical analysis runs (deterministic); CPU, cores 0-1 of a shared loaded host | [experiments/20261129-239-qwen-weight-cell-classes/RESULTS.md](experiments/20261129-239-qwen-weight-cell-classes/RESULTS.md) | +| Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240) | measured, unreplicated | PASS on both registered criteria. Measured, unreplicated, one head, one layer, 4 tokens, no proof. A CPU layout of V head 0, layer 0 of the pinned stock Qwen3.8-27B (4 tokens of the fixture prompt from sequence start, PR #68 integer head, F = 12) as signed-byte limbs, array by array as DESIGN 7.3 and count_m3.py count them, plus the scalars and the floor remainders the head's relations need, takes 88,703.33 limbs per V head per token against the design's 85,861.33: ratio 1.0331 (bar 0.9 to 1.1). The design's own arrays alone are 85,845.33 (by construction equal widths); the excess is 2,816 limbs of floor remainders other than S's and 26 more scalar limbs. Every limb in class, every remainder in its exact class, every value recomposed exactly, S', o, y equal the harness at all tokens; 5 runs identical. With the built head in count_m3's formula (overhead 1.27 and dense parts unchanged) the per-token full-model figure is 97.8M entries, COUNTED not built (design 95.1M). Finding: the design's 2 limbs for s = SiLU(z) do not hold the pinned table's image (32,741 > 32,639); in class on this input (max 20,264), out of class on a synthetic debug input. NOT established: any proof, CUDA, relation or the 1.27 factor; other inputs, heads, layers or windows; the M3 arithmetic (arrays hold M2 harness values); low-rank form; chunk handoff; accuracy | CPU only, cores 6-7 of a shared loaded host, Python 3.12.3, NumPy 2.4.3; deterministic integer arithmetic; PREREG first and alone, amendment A1 (debug finding) committed before the registered run; debug only on synthetic in_proj outputs (numpy seed 240); PR #231 head-0 weights read only and 51,200 bytes fetched (4 embedding rows, layer-0 input norm), all SHA-256 checked against merged manifests | [experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md](experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md) | _Last regenerated from `research/results.yaml` on 2026-11-29 (UTC), against main `57460851`._