Skip to content

research: SiLU-stage repairs for Qwen M3, exact worst-case error and ledger rows (desk note) - #235

Draft
wakesync wants to merge 9 commits into
mainfrom
research/1129-silu-repairs-222
Draft

wakesync wants to merge 9 commits into
mainfrom
research/1129-silu-repairs-222

Conversation

@wakesync

@wakesync wakesync commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Part of #222

Draft. A desk note with exact integer and rational arithmetic on repairs of the SiLU stage of the Qwen M3 integer MLP. Computed, unreplicated. No model was run, no weights were read, no proof was built, no token was measured.

Read first: experiments/20261129-222-silu-repairs/RESULTS.md. Registered plan: PREREG.md in the same directory (first commit, alone; three dated amendments, each committed before the computation it covers; one appended time-correction note).

What is established (arithmetic only)

Against T = RNE(2^12 silu(gw / 2^12)) over every integer |gw| < 2^23 (enumeration to 2^20 with verified enclosures, 0 undecided; a checked tail lemma beyond), for 22 registered candidate operators:

  • Registered threshold, MLP use: holds. 9 of 22 candidates meet all three items: every range-proved branch (d0, d1, e1 to e4) and every excess form (e5 to e7). Worst error on [2^15, 2^23): 3 to 26 units of 2^-12 (bar 32). Every recomputed MLP ledger row and every new row is below 2^63 (worst 2^55.024, the down projection; the s u row moves from 2^38.2 to 2^47.0). The selector or excess witnesses are bound by two relations: a hand argument, an exhaustive check on a toy format (3,918,186 assignments), and 21 listed cell assignments each for d0 and e5 at the real format.
  • Negative for a shared operator. 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 bound for all 9, above 2^63. It is the only shared row that fails. So with sharing, every candidate that removes the high-side clip error breaks a ledger row, which is the issue's negative result.
  • No clip candidate removes the high-side error. All 13 (midpoint index, finer step, wider table) fail the error item: 8,126,479 to 8,355,866 units at the class edge. The widest table registered (32,768 rows) covers the largest recorded |gw| (236,631) and leaves the shared q row at 2^62.622.
  • v1 inside its domain: worst 17 units, mean -3.7439; midpoint index: worst 9 on its own table range, mean 0.2541. The 4,096 pinned rows equal the exact target at their grid points.
  • floor(s u / 2^12) needs 36 bits for a branch or excess candidate; 36 is also the largest exact h class that keeps the down projection below 2^63 (2^62.098).

What is NOT established

  • No token measurement; no claim that any candidate passes the token bar or beats v1 on tokens; the ranked table is not an order by tokens.
  • No proof built; no prover, verifier or bounds.py change. The statement cost is counted from a lowering that is written down, not implemented.
  • The selector binding at the real format is a hand argument plus checks, not reviewed, not a soundness proof of a built statement.
  • Whether the q path can keep its own bounded operator while the MLP uses a repaired one (not counted).
  • How often honest |h| reaches 2^23 under any candidate. Nothing about the m class.
  • Not replicated: one lane, one calculation, run twice (byte-identical).

Deviations (the first five are detailed in RESULTS.md; the last is a process step of this branch)

  • Unit tests passed on the third run; the two failed outputs are committed unchanged. Both failures were in the lane's own test code, not in a registered comparison.
  • The headers of Amendments 2 and 3 carry times written ahead of the clock. Amendment 3's header says 03:00Z; its commit is 9322248 at 02:55:58Z, pushed 02:56:19Z, and the registered run started at about 02:56:34Z (commit 6e25a70 at 02:58:47Z). The committed header is not edited; a dated note is appended to the PREREG.
  • The lane was interrupted after the registered runs were pushed; RESULTS, ENV, README and the results row were written by a continuation from the committed run files. Nothing was rerun.
  • Two runs, not five (registered exception: deterministic arithmetic).
  • One registered hostile case (selector lie at the first key inside the range, low side) is not in the real-format list; it is covered by the argument and the toy-format search only.
  • The generated README stamp line was set to the line of the branch's own base of main, without fetching main, so the branch carries no change to that line. The usual helper fetches main first; it was not run.

Proposed claim

One research/results.yaml row, qwen-silu-stage-repairs-222, status measured (computed), unreplicated.

Open risks

  • A reader may take "hypothesis holds" as "a repair exists". It holds for the MLP use only, and no token effect is known.
  • The branch is based on main cdf78449; main has moved and was not brought in here.

Notes for merge

Adds one research/results.yaml row: merge with a merge commit, not a squash.

… repair desk note (issue #222)

Written from the committed run files; nothing was rerun.

- RESULTS.md: by the registered threshold the hypothesis holds for the MLP use (9 of 22
  candidates meet items 1 to 3); for a shared operator the q row is above 2^63 for all 9
  (negative); no clip candidate removes the high-side error. Deviations listed.
- PREREG.md: one appended dated note (time correction for the header of Amendment 3). No
  committed line is changed.
- ENV.json, README.md (files, reproduce commands).
- research/results.yaml: one row (pr 235), README block and CLAIMS.md regenerated.
Conflicts: research/results.yaml, README.md, CLAIMS.md. results.yaml is main's file plus this PR's own entry (qwen-silu-stage-repairs-222), unchanged and appended at the end. README/CLAIMS take main's side here and are regenerated in the following commit after the merge makes the metric commits available in branch history; README stamp is main's verbatim.
…9d2b

scripts/update-results.py after the merge commit (77 results); stamp line kept as main's verbatim. Adds this PR's row for qwen-silu-stage-repairs-222 to the README block and CLAIMS.md on top of main's; no other change.
@wakesync

Copy link
Copy Markdown
Owner Author

Main sync: merged main fef9d2b800b49a2d3eefb45dda82c58474cc25d4 (adds #224, #243 and their results-sync stamps #236, #248) into this branch with a merge commit. Old head 94452bf53aad284a429e89cb5fde9c3d41adecd8, new head 6ce6cf2ec5b6c695b8309a403a804f974930c66a (fast-forward, merge commit 6896253e plus a separate README/CLAIMS regeneration commit 6ce6cf2e).

Conflicted files: research/results.yaml, README.md, CLAIMS.md, nothing else. research/results.yaml is main's file byte for byte plus this PR's own entry qwen-silu-stage-repairs-222, appended unchanged: removing that entry gives main's file (sha256 05338b46...af1fa0 both), the entry is byte-identical to the old head, and the 77 ids are unique. README and CLAIMS are regenerated; each differs from main only by this PR's one row. The README stamp line was "on 2026-11-21 (UTC), against main 0ffc7985" at the old head (written from a stale main ref) and is now main's line verbatim, "on 2026-11-29 (UTC), against main 57460851".

All 18 files under experiments/20261129-222-silu-repairs/ are byte-identical to the old head, and the other 3824 experiments/ paths are byte-identical to main; the PR changes no other path. update-results.py --check, check-claims.py, check_inventory.py and the host-path guard all pass on the merged tree. The PR is still a draft.

@wakesync

Copy link
Copy Markdown
Owner Author

REQUEST CHANGES at 6ce6cf2

class B, one reviewer, full review

Reviewer: review235-opus (claude-opus-5-5). Two text-level must-fix items about the h class. The registered verdicts (MLP use holds, shared use fails, no clip candidate removes the high-side error) are what the code gives, and they match my own recomputation. Nothing needs to be rerun.

What I checked myself

  • History (check 1). The first commit 174863c holds PREREG.md and nothing else. The push record shows only fast-forward pushes and no force-push. The 20 original candidates, the bar of 32 and the verdict rule are in the first commit. Amendment 1 (0d06257, 02:22:07Z) adds e6 and e7 before any code (code first committed in e47c6d0 at 02:43:57Z). Amendment 2 (7b7b7d9, 02:40:39Z) is committed before unit-test run 2. Amendment 3 (9322248, committed 02:55:58Z, pushed 02:56:18Z per the activity API) comes before the run commit 6e25a70 (02:58:47Z). The run is 12.88 s per run-1.time, and the lane's STATE has run 1 done at 02:56:53Z, so it started between about 02:56:34Z and 02:56:40Z, after the push either way. Since 6e25a70 no commit touches runs/, the unit-test outputs or any script.
  • Worry a. Run 1 failed only on a U5 text-search condition that was not registered (it matched the softplus row). Run 2 failed only on an unregistered row-count guess (11 instead of 10). Diffs of the three JSON outputs: run 1 and run 3 differ only inside U5 and in wall time; run 2 and run 3 differ only in U5's pass flag and wall time. U1 to U4 and U6 give the same output in all three runs, which fits with the code under test not changing. Only the test changed. No candidate, bar or ledger rule changed after a result was seen.
  • Worry b. The report is accurate and is enough. The header says 03:00Z, but the commit and push both came before the run. The appended note gives the real order and does not edit the header. One limit: the run start time is not in a committed file. RESULTS says this.
  • Worry c. The list of 22 is the registered list: 20 at registration plus 2 added in Amendment 1, before any code or number existed. The 9 passing candidates are exactly the non-clip candidates (every branch and every excess form, as issue items d and e describe). Nothing was searched until it passed. Pass or fail follows from the outside mode, so "9 of 22" is a count of registered designs, not a rate.
  • Reproduce (check 2). In a private copy, compute.py gives sha256 bdafccf5...b4e6, the same as run-1.json and run-2.json, and table.md is identical. unit_tests.py passes U1 to U6 (12.1 s). RESULTS calls the two runs a determinism check and not a replication, which is correct.
  • Independent recomputation (check 3, worry d). My own script imports none of silu_core, relation or ledger. It takes T at 80-digit decimal precision at 25 points: the class edges, the table edges, gw 7,023, 5,288, 5,294, 32,760, ±46,894, ±46,895, ±236,631 and ±2^20. For the window maxima it uses float64 with a guard band and falls back to decimal near a half; this part is not fully exact. Results:
    • T(46,894) = 46,893 and T(46,895) = 46,895. The gap g/(e^(g/4096)+1) is 0.500026 at 46,894 and 0.499914 at 46,895, so the identity starts at 46,895. T(-46,894) = -1 and T(-46,895) = 0.
    • Tail lemma: G0 exp(-G0/4096) at G0 = 2^20 is about 6.9e-105, far below 1/2.
    • 0 of 4,096 pinned rows differ from T. T_min is -1,141 at -5,295.
    • v1: 17 at gw 7,023 (error -17), and 8,355,866 at 2^23 - 1.
    • d0: high side 11 at 32,768. e5: 26 at 46,895. e1: 11 at 32,760. e7: 9 at 5,288. All agree with RESULTS.
  • Ledger by hand (worry e), from the constants of bounds.py on main:
    • d0, S_edge 16,809,994: s u row 2^47.0032, down projection 2^55.0238, q row 2^68.5046 (fails).
    • e5, S_edge 16,809,956: the same to four places.
    • q row at the exact image 8,388,607: 2^67.5038 (fails).
    • Largest B with the down projection below 2^63: 36, giving 2^62.098.
      All of these agree with the PR. The two must-fix items below are about what the 36 means.
  • Power (check 4), in the private copy.
    • A table shifted by one row raises the in-domain maximum from 17 to 18: caught.
    • A selector lie above the range (bh = 0, excess value) is refused by R2 in the full relation and accepted with the bit terms removed: the "unbound" statement holds.
    • With check() weakened to drop R2, 7 of d0's and 3 of e5's committed hostile cases fail. The case list has power.
  • Worry h. The missing case is the selector lie at the first key inside the low edge (gw = -2^15, the prover claims below). RESULTS deviation 5 and the PR body say so. I built that case for d0 and e5 at the real format. R2 refuses it in both.
  • Wording (check 5, worries f and g). In RESULTS, the PR body, the results row and the generated rows, HOLDS is scoped to MLP use. The shared-use failure has its own bullet and the word NEGATIVE. "Whether the q path can keep its own operator" is listed as not established. Nothing claims a token effect, a built proof or soundness. The T values 15 / 11 / 9 and the per-unit cells are labelled in RESULTS as counted through count_m3.py, nothing built. They do not appear in results.yaml.
  • Scrub (check 6). total_matches=0 for each of the 21 files at the head, for the first-parent commit messages and for the PR body. check-no-host-paths.sh (working tree) says ok. All 9 commits have author and committer wakesync noreply and no trailer.
  • Ledger files (check 7). update-results.py --check ok (77 results, 1225 metrics). check-claims.py ok. check_inventory.py ok. results.yaml differs from main only by this PR's row, with pr: 235. The metrics 9/22, 0/9, 17, 8,355,866, 11, 26 and 36 equal run-1.json at 6e25a70. README and CLAIMS differ from main by one row each, and the stamp line is unchanged.
  • Sync (check 8). The experiment directory at the head is identical to 94452bf. The only paths that differ from main fef9d2b are the PR's 21.
  • Process (check 9). See nonblocking item 4.
  • Main (check 10). origin/main is still fef9d2b, the commit merged in.

Must-fix

  1. The 36-bit h class as lowered is not an exact class.
    • Where: RESULTS.md line 142 ("h in [-2^36, 2^36) (four 12-bit keys)") and lines 33 to 36. ledger.py h_rows, lines 96 to 97 (nl = ceil(37/12) = 4 free 12-bit limbs).
    • Problem: h + 2^36 written as four free 12-bit keys ranges over [0, 2^48), not [0, 2^37). At that limb edge the down projection is 2^74.09 and wraps. The row of 2^62.098 holds only if the class really is [-2^36, 2^36).
    • What settles it: state the lowering as three 12-bit keys plus one bit with its complement key, as bounds.py does for the weight-cell hi limb, so that h + 2^36 is in [0, 2^37). List the class rows for that form. The 2^62.098 then stands and the verdict does not change.
    • Also: the cost of the 36-bit h class is not counted (deviation 6). Say that the corrected form needs five keys per unit (three 12-bit limbs, plus a bit and its complement key), against two for the 23-bit form, not the "four 12-bit keys" the text gives now.
  2. "36 bits needed, 36 allowed, no slack" is the class-edge figure, not what honest h needs.
    • Where: RESULTS.md lines 33 to 36. The PR body bullet "floor(s u / 2^12) needs 36 bits". research/results.yaml line 2100 (the summary) and line 2110 (the note of metric silu222_h_bits_needed_branch_or_excess).
    • The 36 uses S_edge, about 2^24.003. But R1, R2 and R5 force s to its registered value, so |s| <= 8,388,607 (the exact image that RESULTS already uses for its descriptive rows). With |u| < 2^23, every honest |h| is below 2^34. So 34 bits is enough for completeness, and the down projection has 2 bits of slack. The s u row is sound either way, since it is summed at S_edge and the h edge.
    • What settles it: report both numbers, 36 at the class-edge bound and 34 at the exact image, with the 34 computed in a committed file (the evidence rule). Then drop "0 bits to spare" or qualify it. This is the sentence the next build would size h from.

Nonblocking

  1. results.yaml uses status "measured" with status_note "computed". That is acceptable, but "computed" would be clearer in the title or summary.
  2. The window maxima of my recomputation used float64 with a decimal fallback near a half. Only the point checks were fully exact. That is enough for a review, but it does not replicate the exact enumeration.
  3. Make the "9 of 22" reading explicit: every clip candidate fails item 1 by design. It is not a pass rate over a searched family.
  4. Process items outside the briefs. None of them touches the evidence:
    • The build lane used a local stamp helper (superseded by the sync lane's fp_stamp_from_main).
    • The PR body was set by REST PATCH after a GraphQL error.
    • One call went to a helper that does not exist (recorded in Amendment 2).
    • An uncommitted edit to the Amendment 3 header was discarded.
  5. I did not read ENV.json field by field.

Main sync needed: no (main fef9d2b, same as the merged base).

CI at 6ce6cf2 (check-runs API): claims completed success, guard completed success.

Skipped checks: none skipped. Check 3 is partial in the way nonblocking item 2 describes. ENV.json fields were not read one by one.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant