diff --git a/CLAIMS.md b/CLAIMS.md index 7cf9a35e..7f47f7e4 100644 --- a/CLAIMS.md +++ b/CLAIMS.md @@ -90,3 +90,4 @@ tracked file, which both scripts resolve (they check that it exists, not what it | `qwen-silu-stage-repairs-222` | Qwen M3 SiLU stage repairs: exact worst-case error of 22 candidate operators over the whole range-checked class, and the ledger rows each moves (desk note, issue #222): Computed with exact integer and rational arithmetic, unreplicated; no model, no weights, no proof, no token measurement. Against T = RNE(2^12 silu(gw / 2^12)) over every integer \|gw\| < 2^23 (enumeration to 2^20, a checked tail lemma beyond; 0 undecided; the 4,096 pinned v1 rows equal T at their grid points). Registered threshold (MLP use): HOLDS, 9 of 22 registered candidates meet all three items (every range-proved branch and every excess form): worst error on [2^15, 2^23) 3 to 26 units of 2^-12 (bar 32), every MLP ledger row below 2^63 (worst 2^55.024, s u row 2^47.0), selector or excess witnesses bound by two relations (hand argument, exhaustive on a toy format, 21 listed assignments each for two candidates at the real format). NEGATIVE for sharing: if the same operator also replaces the SiLU where bounds.py uses its image bound outside the MLP, the row q: 362 Rc x - 2^36 q - r is 2^68.5 at the class-edge bound and 2^67.5 at the exact image for all 9, above 2^63; no other shared row fails. All 13 clip candidates (midpoint index, finer step, wider table) keep every row and fail the error item: 8,126,479 to 8,355,866 units at the class edge. v1 in its domain: worst 17, mean -3.7439; midpoint index: worst 9 on its table range, mean 0.2541. For branch or excess, the class-edge sizing bound for h is B = 36; at the exact image B = 34 suffices for honest h (derivation in RESULTS.md). The down projection allows B up to 36 (2^62.098 with the exact five-key class). NOT established: any token effect or token bar; a built statement or its soundness (the lowering is counted, not implemented, and the binding argument is not reviewed); whether the q path can keep its own bounded operator; how often honest h reaches 2^23 | measured, unreplicated (computed with exact arithmetic; nothing measured on a model, no proof built) | unreplicated | [experiments/20261129-222-silu-repairs/RESULTS.md](experiments/20261129-222-silu-repairs/RESULTS.md), [experiments/20261129-222-silu-repairs/PREREG.md](experiments/20261129-222-silu-repairs/PREREG.md), [experiments/20261129-222-silu-repairs/ENV.json](experiments/20261129-222-silu-repairs/ENV.json), [experiments/20261129-222-silu-repairs/runs/run-1.json](experiments/20261129-222-silu-repairs/runs/run-1.json), [experiments/20261129-222-silu-repairs/runs/table.md](experiments/20261129-222-silu-repairs/runs/table.md), [experiments/20261129-222-silu-repairs/unit_tests.json](experiments/20261129-222-silu-repairs/unit_tests.json), [experiments/20261129-222-silu-repairs/README.md](experiments/20261129-222-silu-repairs/README.md) | #235 | | `qwen-attn-rescue-rule-241` | Qwen integer attention, one rescue scale rule on paper for layers 31, 35, 39 at head size 256: value cell one bit wider, with its exact admission arithmetic (issue #241): Desk result, unreplicated. No model run, no weights, no proof; the rule has no fidelity number. A procedure registered before any number was computed, applied to PR 178's in-sample records only, picks the value side (one value bit fewer goes with a 1.76 to 1.92 times larger per-cell error on the layers where only that exponent differs; a query bit 1.00 to 1.03; a key bit 1.03) and selects rule V13: value clamp 4,095, q and k at the narrow 1,665 clamp with the legacy 32-bit score digit, margins 9/8, 9/8, 5/4. Registered items: A1 PASS (29 of 29 exact-integer tests, constants on main reproduced), A2 partly met: at dh 256 the kFD occupancy and C policy rows were checked at (lt, S) = (10, 12), shifts 4 to 12, not at the other 181 shapes (no-overflow checks passed at all 182; N4 limits q and k to 1,665; the value clamp enters only N6), B PASS as a PREDICTION only (registered heuristic puts all 16 in-sample medians at or under 0.01, largest 0.00939 at layer 43; layers 31, 35, 39 are extrapolated from other layers), C PASS (rule, admission consequences and the future run's registration text are files). Layer 23 is a known miss, as registered in step 5: its held-out value overshoot of 1.3076 exceeds the 1.25 margin but fits the clamp through power-of-two slack. Step 5 requires reporting, not adjustment or rejection. Only the headroom computation for this finding was post hoc: value headroom is below 1.3076 on layers 47 and 51. Post hoc: committed numbers already imply the rule clamps nothing on PR 206's eight prompts, so a run on those prompts cannot test the margin. NOT established: the rule's fidelity in sample or held out; the max half of the bar; range transfer; any admission, table, prover or verifier change or its soundness; other uses of the clamped-cell bound in cp_verify; the alternative (per key-value head value exponent) has no table | measured, unreplicated (desk: exact arithmetic and a prediction from in-sample records; the rule itself is NOT run) | unreplicated | [experiments/20261129-241-qwen-attn-rescue-rule/RESULTS.md](experiments/20261129-241-qwen-attn-rescue-rule/RESULTS.md), [experiments/20261129-241-qwen-attn-rescue-rule/RULE.md](experiments/20261129-241-qwen-attn-rescue-rule/RULE.md), [experiments/20261129-241-qwen-attn-rescue-rule/FUTURE-PREREG.md](experiments/20261129-241-qwen-attn-rescue-rule/FUTURE-PREREG.md), [experiments/20261129-241-qwen-attn-rescue-rule/PREREG.md](experiments/20261129-241-qwen-attn-rescue-rule/PREREG.md), [experiments/20261129-241-qwen-attn-rescue-rule/ENV.json](experiments/20261129-241-qwen-attn-rescue-rule/ENV.json), [experiments/20261129-241-qwen-attn-rescue-rule/runs/describe.json](experiments/20261129-241-qwen-attn-rescue-rule/runs/describe.json), [experiments/20261129-241-qwen-attn-rescue-rule/runs/n4-report.json](experiments/20261129-241-qwen-attn-rescue-rule/runs/n4-report.json), [experiments/20261129-241-qwen-attn-rescue-rule/runs/headroom.json](experiments/20261129-241-qwen-attn-rescue-rule/runs/headroom.json), [experiments/20261129-241-qwen-attn-rescue-rule/runs/implied-clamps.json](experiments/20261129-241-qwen-attn-rescue-rule/runs/implied-clamps.json) | #246 | | `qwen-m3a1-inproj` | Qwen M3a-1 in_proj: one DeltaNet head's 514 in_proj outputs for one token as a linear claim on the committed weight table, public normed input (issue #229 sub-step c): Measured, unreplicated, CPU research harness, research setting (no security level). First proved computation in which committed Qwen matrix weights take part: for V head 0, layer 0 of the pinned stock Qwen3.8-27B and ONE token, with the layer's normed input a public (5,120 integers, \|a\| <= 2,047, a float64 norm of one embedding row rounded at 2^5), 1,028 committed cells x_r, rem_r for all 514 in_proj rows are in exact classes by bits and satisfy sum_j a_j M[r][j] + 2^(s_r - 1) = 2^(s_r) x_r + rem_r IN THE FIELD against the committed table of PR #231. The table commitment fixes all addressed entries; only columns with nonzero input coefficients contribute to this token's products. This does not restrict LIN's table test or evaluations. Coverage: OP-R22. No sumcheck over columns and no change to an existing source file: LIN already sends W = g^T M, and the input is applied by one caller's linear claim on W, with row weights eq(rho, .) drawn after the cells are committed. 5 of 5 honest proofs verified; all 9 registered negative tests rejected (output off by one two ways, a proof for another key and output cells for another table with the keyed table unchanged, the public input changed two ways, x and rem out of class with the linear claim true, the input out of class); 2 of 2 completeness cases accepted (x at both class edges). The honest runs matched the integer reference. These four verdict conditions were met with a deviation from the registered two-entry edge-case construction (see RESULTS and amendment A3). One more negative test added by amendment after these results were known (the prover fits W so the caller's claim is true) was also rejected; it is not part of the registered threshold. NOT established: the matrix weights' range (no Qwen layout of the WF range proof), so integer rounding is not guaranteed without a no-wrap bound; small weights suffice but are not necessary. C1 and C2 passed the full verifier with out-of-class tables; N4a failed at trace BASE before LIN. None exhibited wraparound. Also not established: any soundness level (trace at target 10 bits; LIN on hand-made unpriced plans, one of them written here because the library's priced planner fixes the number of claims in a request's own test); any head computation after in_proj; more than one token, head or layer; accuracy; hiding; that the table is the advertised checkpoint | measured, unreplicated | unreplicated | [experiments/20261129-229-qwen-m3a1-inproj/RESULTS.md](experiments/20261129-229-qwen-m3a1-inproj/RESULTS.md), [experiments/20261129-229-qwen-m3a1-inproj/PREREG.md](experiments/20261129-229-qwen-m3a1-inproj/PREREG.md), [experiments/20261129-229-qwen-m3a1-inproj/ENV.json](experiments/20261129-229-qwen-m3a1-inproj/ENV.json), [experiments/20261129-229-qwen-m3a1-inproj/runs/summary.json](experiments/20261129-229-qwen-m3a1-inproj/runs/summary.json), [experiments/20261129-229-qwen-m3a1-inproj/runs/summary-a2.json](experiments/20261129-229-qwen-m3a1-inproj/runs/summary-a2.json), [experiments/20261129-229-qwen-m3a1-inproj/runs/inputs-head0.json](experiments/20261129-229-qwen-m3a1-inproj/runs/inputs-head0.json), [research/operators/qwen_m3a1c/README.md](research/operators/qwen_m3a1c/README.md) | #242 | +| `qwen-packed-trace-ref-240` | Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240): M2 replay PASS; packed-output equality FAIL (69/512 coordinates differ). On stock layer 0, V head 0, four tokens, all stored values fit and recompose; the registered checker compared the replay and omitted on_rr's bound, valid in the diagnostic. Criterion 1 cannot fail: 88,703 1/3 limbs/V head/token and ratio 1.033099882 are arithmetic on preassigned widths, dimensions and sharing, identical on synthetic input. Includes 42 scalar limbs and a layout choice to store 2,816 remainder limbs. Only criterion 2 measures values. Five executions test determinism on one input, not replication. The 97.8M entries/token substitution uses unverified 1.27 overhead and inherited dense counts; not measured memory, fit or prover size. M3 erratum: s, SiLU q and SiLU k fit this input (maxima 20,264, 7,319, 10,639), not the pinned table (32,741 > 32,639). Widening all three costs +213 1/3 limbs/head/token (+0.25%), about +0.21M modeled entries/token; needs its own issue. No width change, proof, full M3 arithmetic or claim for other inputs. | 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), [experiments/20261129-240-qwen-packed-trace-ref/runs/diag-fixture.json](experiments/20261129-240-qwen-packed-trace-ref/runs/diag-fixture.json), [experiments/20261129-240-qwen-packed-trace-ref/runs/diag-synthetic.json](experiments/20261129-240-qwen-packed-trace-ref/runs/diag-synthetic.json) | #247 | diff --git a/README.md b/README.md index a9b03669..c30bd1e7 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Every number below comes from a file on `main` (the one exception, a reviewer fi | Qwen M3 SiLU stage repairs: exact worst-case error of 22 candidate operators over the whole range-checked class, and the ledger rows each moves (desk note, issue #222) | measured, unreplicated (computed with exact arithmetic; nothing measured on a model, no proof built) | Computed with exact integer and rational arithmetic, unreplicated; no model, no weights, no proof, no token measurement. Against T = RNE(2^12 silu(gw / 2^12)) over every integer \|gw\| < 2^23 (enumeration to 2^20, a checked tail lemma beyond; 0 undecided; the 4,096 pinned v1 rows equal T at their grid points). Registered threshold (MLP use): HOLDS, 9 of 22 registered candidates meet all three items (every range-proved branch and every excess form): worst error on [2^15, 2^23) 3 to 26 units of 2^-12 (bar 32), every MLP ledger row below 2^63 (worst 2^55.024, s u row 2^47.0), selector or excess witnesses bound by two relations (hand argument, exhaustive on a toy format, 21 listed assignments each for two candidates at the real format). NEGATIVE for sharing: if the same operator also replaces the SiLU where bounds.py uses its image bound outside the MLP, the row q: 362 Rc x - 2^36 q - r is 2^68.5 at the class-edge bound and 2^67.5 at the exact image for all 9, above 2^63; no other shared row fails. All 13 clip candidates (midpoint index, finer step, wider table) keep every row and fail the error item: 8,126,479 to 8,355,866 units at the class edge. v1 in its domain: worst 17, mean -3.7439; midpoint index: worst 9 on its table range, mean 0.2541. For branch or excess, the class-edge sizing bound for h is B = 36; at the exact image B = 34 suffices for honest h (derivation in RESULTS.md). The down projection allows B up to 36 (2^62.098 with the exact five-key class). NOT established: any token effect or token bar; a built statement or its soundness (the lowering is counted, not implemented, and the binding argument is not reviewed); whether the q path can keep its own bounded operator; how often honest h reaches 2^23 | Preregistered (experiments/20261129-222-silu-repairs/PREREG.md first and alone; three dated amendments, each committed before the computation it covers, and one appended time-correction note); Python 3.12.3 standard library, integers and fractions only (float64 in one cross-check unit test and in log2 display columns); CPU, cores 2-5 of a shared loaded host, about 13 s and 260 MiB per run; the registered computation run twice, outputs byte-identical (a registered exception to the five-run standard: no run-to-run variance); bounds.py and count_m3.py imported unchanged, ledger rows copied with attribution; unit tests passed on the third run, the two failed outputs are committed; deviations listed in RESULTS.md | [experiments/20261129-222-silu-repairs/RESULTS.md](experiments/20261129-222-silu-repairs/RESULTS.md) | | Qwen integer attention, one rescue scale rule on paper for layers 31, 35, 39 at head size 256: value cell one bit wider, with its exact admission arithmetic (issue #241) | measured, unreplicated (desk: exact arithmetic and a prediction from in-sample records; the rule itself is NOT run) | Desk result, unreplicated. No model run, no weights, no proof; the rule has no fidelity number. A procedure registered before any number was computed, applied to PR 178's in-sample records only, picks the value side (one value bit fewer goes with a 1.76 to 1.92 times larger per-cell error on the layers where only that exponent differs; a query bit 1.00 to 1.03; a key bit 1.03) and selects rule V13: value clamp 4,095, q and k at the narrow 1,665 clamp with the legacy 32-bit score digit, margins 9/8, 9/8, 5/4. Registered items: A1 PASS (29 of 29 exact-integer tests, constants on main reproduced), A2 partly met: at dh 256 the kFD occupancy and C policy rows were checked at (lt, S) = (10, 12), shifts 4 to 12, not at the other 181 shapes (no-overflow checks passed at all 182; N4 limits q and k to 1,665; the value clamp enters only N6), B PASS as a PREDICTION only (registered heuristic puts all 16 in-sample medians at or under 0.01, largest 0.00939 at layer 43; layers 31, 35, 39 are extrapolated from other layers), C PASS (rule, admission consequences and the future run's registration text are files). Layer 23 is a known miss, as registered in step 5: its held-out value overshoot of 1.3076 exceeds the 1.25 margin but fits the clamp through power-of-two slack. Step 5 requires reporting, not adjustment or rejection. Only the headroom computation for this finding was post hoc: value headroom is below 1.3076 on layers 47 and 51. Post hoc: committed numbers already imply the rule clamps nothing on PR 206's eight prompts, so a run on those prompts cannot test the margin. NOT established: the rule's fidelity in sample or held out; the max half of the bar; range transfer; any admission, table, prover or verifier change or its soundness; other uses of the clamped-cell bound in cp_verify; the alternative (per key-value head value exponent) has no table | CPU only, Python 3.12.3 standard library, exact integers and fractions; deterministic scripts on committed files and constants, one run each; PREREG first and alone, amendment A1 before the registered run, amendments A2 and A3 post hoc, each committed with its script before that script's one run; the committed scripts read PR 206 only for its five reported clamp locations (seen before registration, disclosed); other reads of PR 206 files made while writing up are listed in RESULTS.md section 8; the 182 softmax-shape check covers the no-overflow conditions only; shared loaded host; lane finished by a second instance after a run-time cut | [experiments/20261129-241-qwen-attn-rescue-rule/RESULTS.md](experiments/20261129-241-qwen-attn-rescue-rule/RESULTS.md); a rule on paper, predicted not measured | | Qwen M3a-1 in_proj: one DeltaNet head's 514 in_proj outputs for one token as a linear claim on the committed weight table, public normed input (issue #229 sub-step c) | measured, unreplicated | Measured, unreplicated, CPU research harness, research setting (no security level). First proved computation in which committed Qwen matrix weights take part: for V head 0, layer 0 of the pinned stock Qwen3.8-27B and ONE token, with the layer's normed input a public (5,120 integers, \|a\| <= 2,047, a float64 norm of one embedding row rounded at 2^5), 1,028 committed cells x_r, rem_r for all 514 in_proj rows are in exact classes by bits and satisfy sum_j a_j M[r][j] + 2^(s_r - 1) = 2^(s_r) x_r + rem_r IN THE FIELD against the committed table of PR #231. The table commitment fixes all addressed entries; only columns with nonzero input coefficients contribute to this token's products. This does not restrict LIN's table test or evaluations. Coverage: OP-R22. No sumcheck over columns and no change to an existing source file: LIN already sends W = g^T M, and the input is applied by one caller's linear claim on W, with row weights eq(rho, .) drawn after the cells are committed. 5 of 5 honest proofs verified; all 9 registered negative tests rejected (output off by one two ways, a proof for another key and output cells for another table with the keyed table unchanged, the public input changed two ways, x and rem out of class with the linear claim true, the input out of class); 2 of 2 completeness cases accepted (x at both class edges). The honest runs matched the integer reference. These four verdict conditions were met with a deviation from the registered two-entry edge-case construction (see RESULTS and amendment A3). One more negative test added by amendment after these results were known (the prover fits W so the caller's claim is true) was also rejected; it is not part of the registered threshold. NOT established: the matrix weights' range (no Qwen layout of the WF range proof), so integer rounding is not guaranteed without a no-wrap bound; small weights suffice but are not necessary. C1 and C2 passed the full verifier with out-of-class tables; N4a failed at trace BASE before LIN. None exhibited wraparound. Also not established: any soundness level (trace at target 10 bits; LIN on hand-made unpriced plans, one of them written here because the library's priced planner fixes the number of claims in a request's own test); any head computation after in_proj; more than one token, head or layer; accuracy; hiding; that the table is the advertised checkpoint | CPU only, cores 8-13 of a shared loaded host, single-threaded runs, g++ 13.3.0 -O2; PREREG first and alone; amendment A1 (implementation choices) committed before the registered runs; amendment A2 (one added negative test) committed after the registered results and before its own run, with a rebuilt binary; debug only on a synthetic fixture (table numpy seed 9101, input seed 9102, prover seed 9); the table is committed afresh in each run (no stored key); research setting target 10 bits, query work 6; LIN plans hand-made | [experiments/20261129-229-qwen-m3a1-inproj/RESULTS.md](experiments/20261129-229-qwen-m3a1-inproj/RESULTS.md) | +| Qwen packed DeltaNet trace, CPU reference for one head: limb count and classes against DESIGN 7.3 (issue #240) | measured, unreplicated | M2 replay PASS; packed-output equality FAIL (69/512 coordinates differ). On stock layer 0, V head 0, four tokens, all stored values fit and recompose; the registered checker compared the replay and omitted on_rr's bound, valid in the diagnostic. Criterion 1 cannot fail: 88,703 1/3 limbs/V head/token and ratio 1.033099882 are arithmetic on preassigned widths, dimensions and sharing, identical on synthetic input. Includes 42 scalar limbs and a layout choice to store 2,816 remainder limbs. Only criterion 2 measures values. Five executions test determinism on one input, not replication. The 97.8M entries/token substitution uses unverified 1.27 overhead and inherited dense counts; not measured memory, fit or prover size. M3 erratum: s, SiLU q and SiLU k fit this input (maxima 20,264, 7,319, 10,639), not the pinned table (32,741 > 32,639). Widening all three costs +213 1/3 limbs/head/token (+0.25%), about +0.21M modeled entries/token; needs its own issue. No width change, proof, full M3 arithmetic or claim for other inputs. | 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-12-01 (UTC), against main `5f4c5d16`._ 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/PREREG.md b/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md new file mode 100644 index 00000000..332eb960 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/PREREG.md @@ -0,0 +1,53 @@ +# 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 + +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). + +A2 (2026-12-01 10:55 UTC, after review of 72992e8b; corrections, not a new registration). [Opus](https://github.com/wakesync/flashprove/pull/247#issuecomment-7250848757) found that the whole count and ratio are predetermined by widths, including scalar and remainder storage; only criterion 2 measures values. Two limbs are too narrow for the pinned table for all three of s, SiLU q and SiLU k. The [second review](https://github.com/wakesync/flashprove/pull/247#issuecomment-7308687093) found that the registered equality check compared the replay of M2's y to `run_int`, not the locally formed y that was laid out. On the replay reading equality passes; on the packed-output reading the reviewer found 69/512 differences, so equality fails. The original code did not check the reciprocal remainder against `on_sigma`, included an unobserved zero in extrema, and counted recomposition mismatches only for in-width values. + +Correct `packed_ref.py` to compare M2 replay and stored output separately (counts and maximum differences per token), test `0 <= on_rr < on_sigma` in the layout, take extrema from data and compare every recomposition to its original. Distinguish exact floor bounds from square-root/slack checks. Add an adjacent control/diagnostic driver: save before/after controls for the two output comparisons, valid/equal/negative reciprocal remainder, positive/negative extrema and one-over-width recomposition. Separately inspect the same pinned fixture and seed-240 synthetic input with corrected checks. Only new, write-once `runs/diag-*.json` files, labelled diagnostic and source-pinned, outside the registered verdict. Correct results, metric notes and summaries, including the printed minima, table-width cost and earlier synthetic debug attempt. No registered run is repeated, changed or removed; no threshold, class, case, width, output arithmetic or count changes. Five identical runs on one input test determinism, not replication. diff --git a/experiments/20261129-240-qwen-packed-trace-ref/README.md b/experiments/20261129-240-qwen-packed-trace-ref/README.md new file mode 100644 index 00000000..ff5c1228 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/README.md @@ -0,0 +1,7 @@ +# One-head packed DeltaNet reference (#240) + +**M2 replay passes; packed-output equality fails at 69/512 coordinates.** See [RESULTS](RESULTS.md) for the two readings of the [registration](PREREG.md), including the missing original reciprocal bound. `runs/diag-*.json` are post-review diagnostics; the original nine files are unchanged. + +The 88,703 1/3 limbs per V head per token and ratio 1.033099882 are arithmetic on preassigned widths. Criterion 1 cannot fail for this layout and gives the same answer on synthetic input. Only criterion 2 measures values. Five identical executions tested determinism on one input, not replication. The 97.8M entries/token substitution inherits dense counts and an unverified 1.27 overhead; it is not measured memory, fit or prover size. + +The two-limb SiLU widths fit **this** fixture's s, SiLU q and SiLU k, not the pinned table image. Widening all three costs +213 1/3 limbs/head/token (+0.25%, about +0.21M modeled entries/token); this is a merged M3 design erratum needing its own issue, not a change to registered widths. [Operator and reproduction instructions](../../research/operators/qwen_packed_ref/README.md). 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..d0e0bf6f --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md @@ -0,0 +1,90 @@ +# RESULTS: 20261129-240-qwen-packed-trace-ref + +**Registered verdict, one head, four tokens: M2 replay PASS; packed-output equality FAIL (69 of 512 coordinates differ).** Criterion 1 passes by construction. Criterion 2 passes on the reading that compares M2's replayed `y` with `run_int`; the original checker omitted one remainder bound. If the registered `y` is the output actually laid out, criterion 2 fails. Recomposition of a stored value is not equality to the harness. + +Issue #240. [Registration](PREREG.md) first and alone at `838c388`; A1 precedes the registered run. A2 records the post-review corrections. The nine original files in `runs/` are history. The `diag-` files below explain them, not additional registered runs or evidence of replication. + +| Criterion | Observation or calculation | Source | +|---|---|---| +| 1. Count ratio in [0.9, 1.1] | PASS: **88,703 1/3** limbs per V head per token, ratio **1.033099882**, from preassigned widths, dimensions and sharing. Computable before any run and identical on synthetic input; cannot fail for this layout. | `runs/real-head0-T4.json`, `runs/debug-synthetic.json`: `summary` | +| 2. Value fit and equality | All stored fixture values fit and recompose to themselves; S' and o match M2. M2 replay `y`: 0/512 differences. Stored `y`: **24, 2, 25, 18** differences in token order (max absolute differences 10, 3, 10, 9). The old `harness_checks` only compared the replay. | `runs/real-head0-T4.json`; `runs/diag-fixture.json`: `result.comparisons`, `result.summary` | +| Repeats and controls | Five identical executions of **one** fixture test determinism, not five observations of the count or independent replication. Original edge controls passed; they did not test `on_rr` through the layout. | `runs/repeats.json`, `runs/controls.json` | + +Only criterion 2 measures anything: fit, actual ranges and recompositions, and equality of specific arrays on stock layer 0, V head 0, from sequence start. `IntHead.gated_norm` computes M2's `cg` and uses one floor for `cg*w`; the packed path floors `s*w` to `t`, then applies the quantized gain and a second floor to obtain `y`. Neither arithmetic path was changed. + +## Count arithmetic, per V head per token + +| Group | Design | Reference | How counted | +|---|---:|---:|---| +| S' and its floor remainder | 81,920 | 81,920 | 16,384 values each, at 3 and 2 limbs | +| Per-channel vectors | 3,328 | 3,328 | 128 channels, registered widths | +| Shared q/k vectors | 597 1/3 | 597 1/3 | one QK head per three V heads | +| B: scalars | 16 | 42 | explicit widths for gates and norm scalars, charged per V head | +| C: additional floor remainders | not itemized | 2,816 | 2,304 per-channel plus 512 shared; a storage choice | +| **Total from preassigned widths** | **85,861 1/3** | **88,703 1/3** | **ratio 1.033099882**, independent of values | + +A is 85,845 1/3 slots; B replaces a flat 16. C prices explicit remainder storage; the need to bound a floor remainder does not establish that a prover would commit separate limbs rather than use lookup keys. The 2,816 is neither a demonstrated shortfall nor a bound for another implementation. + +**97.8M entries/token** (97,828,892 instead of 95,057,841) is a substitution in `count_m3`: 48 V heads × 48 layers / 3 limbs per entry, **unverified** overhead 1.2696 and inherited dense counts. Not measured memory, fit or prover size. Source: `runs/real-head0-T4.json`, `summary.entries_per_token_with_built_head_COUNTED`. + +## Observed ranges: registered fixture, corrected diagnostic + +Extrema below come from `runs/diag-fixture.json`, `result.arrays`; grouped rows show the union. Balanced digits lie in [-128, 127] by construction; representability requires that the residue after the assigned width be zero. + +| Array | Assigned limbs | Min .. max | Limbs needed | +|---|---:|---|---:| +| S' | 3 | -6,482 .. 17,375 | 2 | +| conv out v, v | 3 | -697 .. 122,142 | 3 | +| 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 | +| t | 3 | -258 .. 14 | 2 | +| packed y | 4 | -2,384 .. 147 | 2 | +| conv out q, k | 3 | -23,973 .. 11,311 | 2 | +| SiLU q; SiLU k | 2 | -1,141 .. 7,319; -1,141 .. 10,639 | 2 | +| q^, k^ | 2 | -627 .. 2,585 | 2 | +| k-norm e1 | 3 | 3,476 .. 36,794 | 3 | +| output norm Rc | 5 | 660,764,199 .. 1,126,548,798 | 4 | +| q L2 remainder | 5 | 179,288 .. 930,894,677 | 4 | + +**Historical field corrections.** In `runs/real-head0-T4.json` and `-rep2` through `-rep5`, `arrays[].min_value` was seeded with zero. These 18 rows should read (source: `diag-fixture.json`, `result.corrected_minima`): + +| Arrays, in order | True minima, in order | +|---|---| +| a, beta | 3,956; 443 | +| on_sigma, on_Rc, on_e1, on_e2, on_rr, on_gap | 61; 660,764,199; 4; 41; 10; 2 | +| qn_sigma, qn_e1, qn_e2 | 4,792; 3,795; 208 | +| kn_sigma, kn_e1, kn_e2 | 7,458; 3,476; 2,742 | +| rconv_v, rconv_k, rem_qhat, rem_khat | 2; 20; 179,288; 26 | + +`runs/debug-synthetic.json` also included zero in its extrema; `diag-synthetic.json:result.corrected_minima` lists each replacement. The debug file's `s_gate.recomposition_mismatches=0` and `summary.detail.recomposition_exact=true` excluded out-of-width values. Comparing **all** stored integers with their recomposed digits gives **16 mismatches, false**. The fixture has zero mismatches; neither correction changes a width or slot count. + +**Remainders and slacks.** The historical real files report `null` for `on_rr.remainders_out_of_exact_class`; `summary.detail.remainders_in_exact_class=true` did not test this reciprocal floor. The diagnostic actually tests `0 <= on_rr < on_sigma`; `(rr, sigma)` = (10,79), (58,61), (40,104), (75,97), all valid. All listed fixed floor divisors and the q/k rounding remainders' token-specific `2s` bounds are checked. The norm square-root witnesses `e1 = N - sigma²` and `e2 = 2*sigma - e1` have mathematical range `[0, 2*sigma]`; `on_gap = sigma - 1 - on_rr` has range `[0, sigma)`. These are constructed quantities checked for limb fit and recomposition, **not** separately constrained to those tighter slack bounds or tested as norm identities by the layout. + +## SiLU width erratum against the merged M3 design + +Two balanced signed bytes top out at 32,639. The pinned F12 table reaches 32,741; the [independent review](https://github.com/wakesync/flashprove/pull/247#issuecomment-7308687093) identifies seven legal rows, 4089 through 4095, above the limit. **All three** two-limb arrays, `s_gate`, `silu_q` and `silu_k`, fit this fixture only (maxima 20,264, 7,319, 10,639); the width does not cover the table image. Seed 240's maximum 48,986 and 16 failures are unclamped M2 SiLU, not table outputs. + +Widening all three by one limb costs `128 + 128/3 + 128/3` = **+213 1/3 limbs per V head per token** (about 0.25% of the design count). At 48 × 48 heads/layers this is +491,520 model limbs or +163,840 entries before overhead, about +208,008 entries/token at the inherited factor. Widening only `s` costs +128, not the all-three correction. Three limbs cover the finite table, not unbounded mathematical SiLU. This design erratum needs its own issue; the registered widths remain unchanged. + +## Provenance and deviations + +Producer SHA-256 for each file under `runs/`. The historical manifest, controls and repeat comparison do not embed a source hash: for these three, the digests identify the corresponding committed scripts, not a contemporaneous source attestation. + +| Files | Producer and digest | +|---|---| +| `inputs.json` | `prepare.py` `d531ddd95a675dd1f7f261600f2c2c1ea5b8353d22386105e71b0b8bd5e54ca5` (manifest, not a timed run) | +| `controls.json`, `debug-synthetic.json`, `real-head0-T4.json`, `real-head0-T4-rep2.json` through `-rep5.json` | original `packed_ref.py` `ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d` | +| `repeats.json` | `compare_runs.py` `62d972a6ead263e0d4bb0f06ef26ab7ec2108c257bb524047e48e3837c88d066` | +| `diag-controls-before.json` | `diagnostics.py` `d85ec8756d76b5433510f7ed88a758c49f2a19d51f9573aafc99b72f1091e174` with the original `packed_ref.py` above | +| `diag-controls-after.json`, `diag-fixture.json`, `diag-synthetic.json` | same diagnostic driver, corrected `packed_ref.py` `1111904c7611f1d56dc390fd4f963624ff7f006d2e07c82f83cd7ebfe1a8904a` | + +The controls use the same test source on both versions: 12 failed before, 12 passed after, including a swapped output target that reverses which comparison passes. Each diagnostic records the digests of the imported M2 and count code, verifies the 14 local inputs against `inputs.json` before use, and is outside the registered verdict. + +The [Opus review](https://github.com/wakesync/flashprove/pull/247#issuecomment-7250848757) records an earlier synthetic-only debug attempt on November 29 at 02:54:28 UTC (source `07bd5059`), before the committed 02:56:33 synthetic debug (`ea4d0b5c`). Apart from clock, source digest and two row names, the results agreed. Neither was a fixture run. The two output readings and original checker omissions above qualify the registration; no registered run, width or bar changed. + +Issue #240's “no other fetch” did not hold: the original lane fetched 51,200 bytes (four embedding rows and one input norm missing from PR #231), SHA-checked against merged manifests. The fixture is defined in PR #88's `q1_forward.py` and used by PR #124. The issue's `reference_m2.py` is synthetic-only; the integer real-weight head is PR #68's `real_head.py`. The issue's 95,057,841 and 88% are outputs of `count_m3`. + +**Not established:** a proof, CUDA kernel, relation, sumcheck, lookup arrays, memory or fit, replication, other inputs/heads/layers/windows, accuracy, the low-rank form or chunk handoff. This lays out M2-based values with locally formed `s,t,y`; it does not implement M3's 362-scaled q, cA decay or table lookups. 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/diag-controls-after.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-controls-after.json new file mode 100644 index 00000000..329ec36a --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-controls-after.json @@ -0,0 +1,168 @@ +{ + "classification": "diagnostic, outside registered verdict", + "mode": "controls", + "utc": "2026-12-01T10:59:53.978724+00:00", + "inputs_verified": 14, + "sha256": { + "diagnostics.py": "d85ec8756d76b5433510f7ed88a758c49f2a19d51f9573aafc99b72f1091e174", + "packed_ref.py": "1111904c7611f1d56dc390fd4f963624ff7f006d2e07c82f83cd7ebfe1a8904a", + "real_head.py": "aa49a5042adb1ac92b5a509f9f138b8e2a135eaf4cc02930367c78c707076b6f", + "count_m3.py": "18ef12850380208013c7d10ca8a7f313429beb6ce00962b172a04e21c04abe7c", + "inputs.json": "594b5e8ef957ed344e30b3f6fbce2e2d23c156bcb11e1732ebd237def692492d" + }, + "result": { + "cases": { + "on_rr_valid": { + "observed": [ + 0, + true + ], + "expected": [ + 0, + true + ], + "passed": true + }, + "on_rr_equal_to_divisor": { + "observed": [ + 1, + false + ], + "expected": [ + 1, + false + ], + "passed": true + }, + "on_rr_negative": { + "observed": [ + 1, + false + ], + "expected": [ + 1, + false + ], + "passed": true + }, + "positive_extrema": { + "observed": [ + 1, + 4 + ], + "expected": [ + 1, + 4 + ], + "passed": true + }, + "negative_extrema": { + "observed": [ + -4, + -1 + ], + "expected": [ + -4, + -1 + ], + "passed": true + }, + "one_over_width": { + "observed": [ + 1, + 1, + false + ], + "expected": [ + 1, + 1, + false + ], + "passed": true + }, + "actual_m2_replay_y": { + "observed": [ + 0, + 0, + 0, + 0 + ], + "expected": [ + 0, + 0, + 0, + 0 + ], + "passed": true + }, + "actual_packed_y": { + "observed": [ + 24, + 2, + 25, + 18 + ], + "expected": [ + 24, + 2, + 25, + 18 + ], + "passed": true + }, + "actual_readings": { + "observed": [ + true, + false + ], + "expected": [ + true, + false + ], + "passed": true + }, + "swapped_m2_replay_y": { + "observed": [ + 24, + 2, + 25, + 18 + ], + "expected": [ + 24, + 2, + 25, + 18 + ], + "passed": true + }, + "swapped_packed_y": { + "observed": [ + 0, + 0, + 0, + 0 + ], + "expected": [ + 0, + 0, + 0, + 0 + ], + "passed": true + }, + "swapped_readings": { + "observed": [ + false, + true + ], + "expected": [ + false, + true + ], + "passed": true + } + }, + "all_passed": true + } +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-controls-before.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-controls-before.json new file mode 100644 index 00000000..669f93e4 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-controls-before.json @@ -0,0 +1,168 @@ +{ + "classification": "diagnostic, outside registered verdict", + "mode": "controls", + "utc": "2026-12-01T10:58:55.410420+00:00", + "inputs_verified": 14, + "sha256": { + "diagnostics.py": "d85ec8756d76b5433510f7ed88a758c49f2a19d51f9573aafc99b72f1091e174", + "packed_ref.py": "ea4d0b5c26889dd94713a8810ddde1620452ff661bbe4dd25bca2ba699e82f6d", + "real_head.py": "aa49a5042adb1ac92b5a509f9f138b8e2a135eaf4cc02930367c78c707076b6f", + "count_m3.py": "18ef12850380208013c7d10ca8a7f313429beb6ce00962b172a04e21c04abe7c", + "inputs.json": "594b5e8ef957ed344e30b3f6fbce2e2d23c156bcb11e1732ebd237def692492d" + }, + "result": { + "cases": { + "on_rr_valid": { + "observed": [ + null, + true + ], + "expected": [ + 0, + true + ], + "passed": false + }, + "on_rr_equal_to_divisor": { + "observed": [ + null, + true + ], + "expected": [ + 1, + false + ], + "passed": false + }, + "on_rr_negative": { + "observed": [ + null, + true + ], + "expected": [ + 1, + false + ], + "passed": false + }, + "positive_extrema": { + "observed": [ + 0, + 4 + ], + "expected": [ + 1, + 4 + ], + "passed": false + }, + "negative_extrema": { + "observed": [ + -4, + 0 + ], + "expected": [ + -4, + -1 + ], + "passed": false + }, + "one_over_width": { + "observed": [ + 1, + 0, + true + ], + "expected": [ + 1, + 1, + false + ], + "passed": false + }, + "actual_m2_replay_y": { + "observed": [ + null, + null, + null, + null + ], + "expected": [ + 0, + 0, + 0, + 0 + ], + "passed": false + }, + "actual_packed_y": { + "observed": [ + null, + null, + null, + null + ], + "expected": [ + 24, + 2, + 25, + 18 + ], + "passed": false + }, + "actual_readings": { + "observed": [ + null, + null + ], + "expected": [ + true, + false + ], + "passed": false + }, + "swapped_m2_replay_y": { + "observed": [ + null, + null, + null, + null + ], + "expected": [ + 24, + 2, + 25, + 18 + ], + "passed": false + }, + "swapped_packed_y": { + "observed": [ + null, + null, + null, + null + ], + "expected": [ + 0, + 0, + 0, + 0 + ], + "passed": false + }, + "swapped_readings": { + "observed": [ + null, + null + ], + "expected": [ + false, + true + ], + "passed": false + } + }, + "all_passed": false + } +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-fixture.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-fixture.json new file mode 100644 index 00000000..750ceacf --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-fixture.json @@ -0,0 +1,1082 @@ +{ + "classification": "diagnostic, outside registered verdict", + "mode": "fixture", + "utc": "2026-12-01T11:00:15.040582+00:00", + "inputs_verified": 14, + "sha256": { + "diagnostics.py": "d85ec8756d76b5433510f7ed88a758c49f2a19d51f9573aafc99b72f1091e174", + "packed_ref.py": "1111904c7611f1d56dc390fd4f963624ff7f006d2e07c82f83cd7ebfe1a8904a", + "real_head.py": "aa49a5042adb1ac92b5a509f9f138b8e2a135eaf4cc02930367c78c707076b6f", + "count_m3.py": "18ef12850380208013c7d10ca8a7f313429beb6ce00962b172a04e21c04abe7c", + "inputs.json": "594b5e8ef957ed344e30b3f6fbce2e2d23c156bcb11e1732ebd237def692492d" + }, + "result": { + "input": "registered fixture", + "comparison_file": "real-head0-T4.json", + "corrected_minima": { + "a": 3956, + "beta": 443, + "on_sigma": 61, + "on_Rc": 660764199, + "on_e1": 4, + "on_e2": 41, + "on_rr": 10, + "on_gap": 2, + "qn_sigma": 4792, + "qn_e1": 3795, + "qn_e2": 208, + "kn_sigma": 7458, + "kn_e1": 3476, + "kn_e2": 2742, + "rconv_v": 2, + "rconv_k": 20, + "rem_qhat": 179288, + "rem_khat": 26 + }, + "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": 3956, + "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": 443, + "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": 61, + "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": 660764199, + "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": 4, + "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": 41, + "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": 10, + "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": 0, + "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": 2, + "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": 4792, + "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": 3795, + "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": 208, + "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": 7458, + "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": 3476, + "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": 2742, + "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": 2, + "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": 20, + "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": 179288, + "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": 26, + "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 + } + ], + "comparisons": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 24, + "max_abs_difference": 10, + "coordinates": 128 + } + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 2, + "max_abs_difference": 3, + "coordinates": 128 + } + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 25, + "max_abs_difference": 10, + "coordinates": 128 + } + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 18, + "max_abs_difference": 9, + "coordinates": 128 + } + } + ], + "reciprocal_bounds": [ + { + "rr": 10, + "sigma": 79 + }, + { + "rr": 58, + "sigma": 61 + }, + { + "rr": 40, + "sigma": 104 + }, + { + "rr": 75, + "sigma": 97 + } + ], + "summary": { + "mode": "diagnostic", + "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_m2_replay_reading": true, + "criterion2_packed_output_reading": false, + "detail": { + "all_limbs_in_class": true, + "remainders_in_exact_class": true, + "recomposition_exact": true, + "shapes_ok": true, + "state_o_equal_run_int": true, + "m2_replay_y_equal_run_int": true, + "packed_y_equal_run_int": false + } + } + } +} diff --git a/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-synthetic.json b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-synthetic.json new file mode 100644 index 00000000..a33d7e87 --- /dev/null +++ b/experiments/20261129-240-qwen-packed-trace-ref/runs/diag-synthetic.json @@ -0,0 +1,1084 @@ +{ + "classification": "diagnostic, outside registered verdict", + "mode": "synthetic", + "utc": "2026-12-01T11:00:15.358879+00:00", + "inputs_verified": 14, + "sha256": { + "diagnostics.py": "d85ec8756d76b5433510f7ed88a758c49f2a19d51f9573aafc99b72f1091e174", + "packed_ref.py": "1111904c7611f1d56dc390fd4f963624ff7f006d2e07c82f83cd7ebfe1a8904a", + "real_head.py": "aa49a5042adb1ac92b5a509f9f138b8e2a135eaf4cc02930367c78c707076b6f", + "count_m3.py": "18ef12850380208013c7d10ca8a7f313429beb6ce00962b172a04e21c04abe7c", + "inputs.json": "594b5e8ef957ed344e30b3f6fbce2e2d23c156bcb11e1732ebd237def692492d" + }, + "result": { + "input": "synthetic seed 240", + "comparison_file": "debug-synthetic.json", + "corrected_minima": { + "a": 4077, + "beta": 1089, + "on_sigma": 47, + "on_Rc": 1041204192, + "on_e1": 53, + "on_e2": 6, + "on_rr": 14, + "on_gap": 1, + "qn_sigma": 4899, + "qn_e1": 1474, + "qn_e2": 4003, + "kn_sigma": 7259, + "kn_e1": 1741, + "kn_e2": 801, + "rconv_v": 2, + "rconv_k": 6, + "rem_qhat": 2476189, + "rem_khat": 5 + }, + "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": 16 + }, + { + "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": 4077, + "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": 1089, + "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": 47, + "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": 1041204192, + "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": 53, + "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": 6, + "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": 14, + "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": 0, + "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": 1, + "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": 4899, + "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": 1474, + "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": 4003, + "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": 7259, + "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": 1741, + "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": 801, + "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": 2, + "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": 6, + "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": 2476189, + "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": 5, + "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 + } + ], + "comparisons": [ + { + "token": 0, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 87, + "max_abs_difference": 10, + "coordinates": 128 + } + }, + { + "token": 1, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 108, + "max_abs_difference": 10, + "coordinates": 128 + } + }, + { + "token": 2, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 94, + "max_abs_difference": 10, + "coordinates": 128 + } + }, + { + "token": 3, + "S_equal_run_int": true, + "o_equal_run_int": true, + "m2_replay_y": { + "mismatches": 0, + "max_abs_difference": 0, + "coordinates": 128 + }, + "packed_y": { + "mismatches": 83, + "max_abs_difference": 10, + "coordinates": 128 + } + } + ], + "reciprocal_bounds": [ + { + "rr": 14, + "sigma": 47 + }, + { + "rr": 14, + "sigma": 47 + }, + { + "rr": 64, + "sigma": 66 + }, + { + "rr": 16, + "sigma": 51 + } + ], + "summary": { + "mode": "diagnostic", + "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_m2_replay_reading": false, + "criterion2_packed_output_reading": false, + "detail": { + "all_limbs_in_class": false, + "remainders_in_exact_class": true, + "recomposition_exact": false, + "shapes_ok": true, + "state_o_equal_run_int": true, + "m2_replay_y_equal_run_int": true, + "packed_y_equal_run_int": false + } + } + } +} 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/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/coverage/inventory.yaml b/research/coverage/inventory.yaml index 57966e1d..71150fb8 100644 --- a/research/coverage/inventory.yaml +++ b/research/coverage/inventory.yaml @@ -1022,6 +1022,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 with preassigned limb counts and fixture checks (issue #240); M2 replay passes, packed y differs at 69/512 coordinates; 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..ded16ba8 --- /dev/null +++ b/research/operators/qwen_packed_ref/README.md @@ -0,0 +1,34 @@ +# Packed DeltaNet trace: CPU reference for one head (issue #240) + +**M2 replay passes; equality of the packed output to M2 fails at 69/512 coordinates.** See the [registration](../../../experiments/20261129-240-qwen-packed-trace-ref/PREREG.md) and [results and corrections](../../../experiments/20261129-240-qwen-packed-trace-ref/RESULTS.md). The reference uses PR #68's integer `IntHead` (F12), stock layer 0, V head 0, four tokens from sequence start. It stores locally formed `s,t,y`; M2 uses its one-floor `cg` path. Reconstructing the stored `y` from its digits is not the M2 comparison. + +## What the count and checks mean + +- **88,703 1/3 limbs per V head per token; ratio 1.033099882.** Both are arithmetic on preassigned widths, dimensions and sharing, including 42 scalar limbs and the choice to store 2,816 extra remainder limbs. Criterion 1 cannot fail for this layout; synthetic input gives the same count. Only criterion 2 measures values. Five identical runs test determinism on one input, not replication. +- The corrected layout checks representability, all recompositions against the integers stored, and floor remainder bounds including `0 <= on_rr < on_sigma`. It separately compares S', o, replayed M2 `y` and stored `y` against `run_int`. Norm slacks are checked for limb fit, not separately constrained by tighter mathematical bounds. +- **97.8M entries/token** substitutes the fixed count into `count_m3` using the unverified 1.27 overhead and inherited dense counts. It is not measured memory, fit or prover size. No relation, verifier, commitment, CUDA, or proof; no result for other inputs, layers, accuracy, low-rank form, or chunk handoff. This is not the full M3 arithmetic. +- M3 design erratum: two limbs do not cover the pinned SiLU table for **s, SiLU q or SiLU k** (32,741 > 32,639). The maxima here were 20,264, 7,319 and 10,639. The synthetic max 48,986 is unclamped, not a table output. Widening all three costs +213 1/3 limbs/head/token (+0.25% of the design count, about +0.21M modeled entries/token); this needs its own issue. No width changed. + +## Reproduction + +`prepare.py` is the historical downloader and manifest builder. With the local data already present, no download is needed. The corrected diagnostics verify all 14 inputs against `runs/inputs.json` before loading. From the repository root, Python 3 + NumPy, use an empty output directory; each diagnostic file is created exclusively: + +```sh +op=research/operators/qwen_packed_ref +python3 "$op/diagnostics.py" controls "$pr231_data" "$fixture_data" "$out/diag-controls-after.json" +python3 "$op/diagnostics.py" fixture "$pr231_data" "$fixture_data" "$out/diag-fixture.json" +python3 "$op/diagnostics.py" synthetic "$pr231_data" "$fixture_data" "$out/diag-synthetic.json" +``` + +To reproduce the **before** controls, use a separate checkout at `72992e8b`, copy only the current `diagnostics.py` alongside that checkout's original `packed_ref.py`, then use `controls` as above with a new `diag-controls-before.json` destination. Exit 1 is expected on that version, 0 on the corrected version. The outputs pin both sources and retain each expected and observed value. + +For **historical** outputs only, use the code at `72992e8b` and new external output paths, never the committed files. `prepare.py "$pr231_data" "$fixture_data" "$out/inputs.json"` is the original preparation step; `packed_ref.py controls` checks the original edges and `compare_runs.py` compares all fields except the clock: + +```sh +python3 "$op/packed_ref.py" controls "$out/controls.json" +python3 "$op/packed_ref.py" debug "$pr231_data" "$fixture_data" "$out/debug-synthetic.json" +for suffix in '' -rep2 -rep3 -rep4 -rep5; do + python3 "$op/packed_ref.py" real "$pr231_data" "$fixture_data" "$out/real-head0-T4$suffix.json" +done +python3 "$op/compare_runs.py" "$out/repeats.json" "$out/real-head0-T4.json" "$out"/real-head0-T4-rep*.json +``` 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)) diff --git a/research/operators/qwen_packed_ref/diagnostics.py b/research/operators/qwen_packed_ref/diagnostics.py new file mode 100644 index 00000000..b8e942d1 --- /dev/null +++ b/research/operators/qwen_packed_ref/diagnostics.py @@ -0,0 +1,125 @@ +"""Post-review diagnostics only. Read local inputs; never download or overwrite a run.""" +import argparse +import hashlib +import json +from datetime import datetime, timezone +from pathlib import Path +from unittest.mock import patch + +import numpy as np +import packed_ref as ref + +RUNS = ref.ROOT / 'experiments/20261129-240-qwen-packed-trace-ref/runs' + + +def digest(path): + with Path(path).open('rb') as f: + return hashlib.file_digest(f, 'sha256').hexdigest() + + +def verify(src, own): + manifest = json.loads((RUNS / 'inputs.json').read_text()) + paths = [(src / 'M.i32', manifest['M_i32'])] + for name, row in manifest['tensors'].items(): + root = own if name.endswith('.input_layernorm.weight') else src + paths.append((root / (name + '.bin'), row)) + for token, row in manifest['embedding_rows'].items(): + paths.append((own / f'embed_row_{token}.bin', row)) + for path, row in paths: + if digest(path) != row['sha256']: + raise ValueError(f'input digest mismatch: {path.name}') + return len(paths) + + +def controls(inp, toks, checks): + tests = {} + + def check(label, observed, expected): + tests[label] = dict(observed=observed, expected=expected, passed=observed == expected) + + def layout_edit(name, mutate): + copies = [(dict(v, **{name: v[name].copy()}), d) for v, d in toks] + mutate(copies) + rows = ref.layout(copies) + return next(r for r in rows if r['array'] == name), ref.summarise(rows, checks, 'diagnostic') + + def outcome(summary): + # Old combined flag was based on M2 replay. Use it when testing the old source. + return summary.get('criterion2_m2_replay_reading', summary.get('criterion2_limbs_in_class')) + + sigma = int(toks[0][0]['on_sigma'][0]) + for label, x, bad in [('valid', sigma-1, 0), ('equal_to_divisor', sigma, 1), ('negative', -1, 1)]: + row, summary = layout_edit('on_rr', lambda copies: copies[0][0]['on_rr'].fill(x)) + check('on_rr_' + label, [row['remainders_out_of_exact_class'], outcome(summary)], [bad, not bad]) + + for label, sign in [('positive', 1), ('negative', -1)]: + def fill(copies): + for i, (v, _) in enumerate(copies): + v['w'].fill(sign * (i+1)) + row, _ = layout_edit('w', fill) + check(label + '_extrema', [row['min_value'], row['max_value']], sorted([sign, sign * len(toks)])) + + def over(copies): + copies[0][0]['s_gate'].flat[0] = 32640 + row, summary = layout_edit('s_gate', over) + check('one_over_width', [row['values_out_of_class'], row['recomposition_mismatches'], + summary['detail']['recomposition_exact']], [1, 1, False]) + + # Swap the comparison target, not the trace arithmetic. The two comparisons + # should reverse their mismatch counts when run_int supplies the packed output. + orig_run_int = ref.RH.run_int + def packed_target(*args): + for (vals, _), (state, o, yr) in zip(toks, orig_run_int(*args), strict=True): + yield state, o, vals['y'].reshape(yr.shape) + with patch.object(ref.RH, 'run_int', packed_target): + _, swapped = ref.trace(inp) + counts = [24, 2, 25, 18] # Regression expectation from PR #247's second review. + for label, ck, replay, packed in [('actual', checks, [0]*4, counts), ('swapped', swapped, counts, [0]*4)]: + for key, expected in [('m2_replay_y', replay), ('packed_y', packed)]: + check(label + '_' + key, [c.get(key, {}).get('mismatches') for c in ck], expected) + summary = ref.summarise(ref.layout(toks), ck, 'diagnostic') + check(label + '_readings', [summary.get('criterion2_m2_replay_reading'), + summary.get('criterion2_packed_output_reading')], [not any(replay), not any(packed)]) + return dict(cases=tests, all_passed=all(t['passed'] for t in tests.values())) + + +def inspect(toks, checks, mode): + rows = ref.layout(toks) + summary = ref.summarise(rows, checks, 'diagnostic') + old = 'real-head0-T4.json' if mode == 'fixture' else 'debug-synthetic.json' + history = json.loads((RUNS / old).read_text()) + oldrows = {r['array']: r for r in history['arrays']} + minima = {r['array']: r['min_value'] for r in rows if r['min_value'] != oldrows[r['array']]['min_value']} + return dict(input=('registered fixture' if mode == 'fixture' else 'synthetic seed 240'), + comparison_file=old, corrected_minima=minima, arrays=rows, comparisons=checks, + reciprocal_bounds=[dict(rr=int(v['on_rr'][0]), sigma=int(v['on_sigma'][0])) for v, _ in toks], + summary=summary) + + +def main(): + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('mode', choices=['controls', 'fixture', 'synthetic']) + for arg in ['src', 'own', 'out']: + p.add_argument(arg, type=Path) + a = p.parse_args() + if not a.out.name.startswith('diag-') or a.out.suffix != '.json' or a.out.exists(): + p.error('supply a new diag-*.json destination') + count = verify(a.src, a.own) + inp = ref.load_inputs(a.src, a.own, synthetic=a.mode == 'synthetic') + toks, ck = ref.trace(inp) + result = controls(inp, toks, ck) if a.mode == 'controls' else inspect(toks, ck, a.mode) + receipt = dict(classification='diagnostic, outside registered verdict', mode=a.mode, + utc=datetime.now(timezone.utc).isoformat(), inputs_verified=count, + sha256={path.name: digest(path) for path in map(Path, [__file__, ref.__file__, ref.RH.__file__, + ref.CM.__file__, RUNS/'inputs.json'])}, result=result) + with a.out.open('x') as out: + json.dump(receipt, out, indent=1) + out.write('\n') + if a.mode == 'controls': + print('failed:', [k for k, v in result['cases'].items() if not v['passed']]) + return int(not result['all_passed']) + return 0 + + +if __name__ == '__main__': + raise SystemExit(main()) 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..c312efdb --- /dev/null +++ b/research/operators/qwen_packed_ref/packed_ref.py @@ -0,0 +1,328 @@ +#!/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 integer laid out (not necessarily an M2 output), checks representability and counts fixed-width slots. 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, "on_sigma"), ("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] + 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]) + 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)), + m2_replay_y=compare_y(y_h, yr), packed_y=compare_y(vals['y'], yr[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 = mx_l = out_cls = out_rem = rec_bad = nvals = 0 + lo_v = hi_v = None + 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(np.count_nonzero(recompose(ds) != x)) + 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())) + low, high = int(x.min()), int(x.max()) + lo_v = low if lo_v is None else min(lo_v, low) + hi_v = high if hi_v is None else max(hi_v, high) + if div is not None: + if div == '2s': + dv = divs[name] + elif isinstance(div, str): + dv = vals[div] # reciprocal remainder: use this token's stored on_sigma + else: + dv = 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) + shapes_ok = all(r["values_laid"] == r["values_expected"] for r in rows) + state_o_ok = all(c['S_equal_run_int'] and c['o_equal_run_int'] for c in checks) + replay_ok = all(c['m2_replay_y']['mismatches'] == 0 for c in checks) + packed_ok = all(c['packed_y']['mismatches'] == 0 for c in checks) + common = all_in_class and rem_ok and rec_ok and shapes_ok and state_o_ok + 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_m2_replay_reading=common and replay_ok, + criterion2_packed_output_reading=common and packed_ok, + detail=dict(all_limbs_in_class=all_in_class, remainders_in_exact_class=rem_ok, recomposition_exact=rec_ok, + shapes_ok=shapes_ok, state_o_equal_run_int=state_o_ok, m2_replay_y_equal_run_int=replay_ok, + packed_y_equal_run_int=packed_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() diff --git a/research/results.yaml b/research/results.yaml index b0bc729b..da25a800 100644 --- a/research/results.yaml +++ b/research/results.yaml @@ -2147,3 +2147,17 @@ results: - {"name": "qm3a1c_verify_s_median", "stat": "median", "value": 0.104, "unit": "s", "n": 5, "spread": {"sd": 0.0028, "min": 0.103, "max": 0.11}, "source": "experiments/20261129-229-qwen-m3a1-inproj/runs/summary.json", "note": "Measured, unreplicated; admission + trace + LIN verify wall time", "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "be7f1ff7dd029db3686a0172ac1ac0b7d9b1e58d"} - {"name": "qm3a1c_peak_rss_kib_median", "stat": "median", "value": 488424, "unit": "KiB", "n": 5, "spread": {"sd": 1271.2, "min": 485648, "max": 488552}, "source": "experiments/20261129-229-qwen-m3a1-inproj/runs/summary.json", "note": "Measured, unreplicated; getrusage max RSS of the whole process (commit, prove, verify), ru_maxrss in KiB", "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "be7f1ff7dd029db3686a0172ac1ac0b7d9b1e58d"} - {"name": "qm3a1c_product_columns", "stat": "single", "value": 20178, "unit": "count", "n": 5, "spread": null, "source": "experiments/20261129-229-qwen-m3a1-inproj/runs/summary.json", "note": "Measured; product-oracle columns used for the 1,028 output cells and their class bits; log length 15; 39,328 relations; 514 table rows covered; deterministic", "hardware": "cpu-epyc-rome-kvm-16", "date": "2026-11-29", "commit": "be7f1ff7dd029db3686a0172ac1ac0b7d9b1e58d"} + + - 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: "M2 replay PASS; packed-output equality FAIL (69/512 coordinates differ). On stock layer 0, V head 0, four tokens, all stored values fit and recompose; the registered checker compared the replay and omitted on_rr's bound, valid in the diagnostic. Criterion 1 cannot fail: 88,703 1/3 limbs/V head/token and ratio 1.033099882 are arithmetic on preassigned widths, dimensions and sharing, identical on synthetic input. Includes 42 scalar limbs and a layout choice to store 2,816 remainder limbs. Only criterion 2 measures values. Five executions test determinism on one input, not replication. The 97.8M entries/token substitution uses unverified 1.27 overhead and inherited dense counts; not measured memory, fit or prover size. M3 erratum: s, SiLU q and SiLU k fit this input (maxima 20,264, 7,319, 10,639), not the pinned table (32,741 > 32,639). Widening all three costs +213 1/3 limbs/head/token (+0.25%), about +0.21M modeled entries/token; needs its own issue. No width change, proof, full M3 arithmetic or claim for other inputs." + 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", "experiments/20261129-240-qwen-packed-trace-ref/runs/diag-fixture.json", "experiments/20261129-240-qwen-packed-trace-ref/runs/diag-synthetic.json"] + metrics: + - {"name": "packedref_limbs_per_v_head_per_token", "stat": "single", "value": 88703.33, "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 from preassigned widths, dimensions and sharing, including 42 scalar limbs and the choice to store 2,816 remainder limbs. Same on synthetic input. n=1 layout; five identical fixture executions test determinism, not replication."} + - {"name": "packedref_ratio_to_design", "stat": "single", "value": 1.0331, "unit": "ratio", "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": "Arithmetic on the two preassigned layout counts; computed before any input, identical on synthetic. Criterion 1 cannot fail for this layout. n=1 layout; five executions test determinism, not replication."} + - {"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 on one four-token fixture: zero stored values outside signed-digit widths. This is not a PASS for packed-output equality (69/512 differ), and the original remainder check omitted on_rr."} + - {"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": "Count substitution using unverified overhead 1.2696 and inherited dense counts, not measured memory, fit or prover size (design 95,057,841)."}