Repository navigation
Conversation
…ght_sums.cpp, tests, independent values
…ms comparison) and ENV.json
…EADME block and CLAIMS.md
Conflicts: research/results.yaml, README.md, CLAIMS.md. results.yaml is main's file plus this PR's own entry (fold-constants-214), 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.
…9e1b scripts/update-results.py after the merge commit (76 results); stamp line kept as main's verbatim. Adds this PR's row for fold-constants-214 to the README block and CLAIMS.md on top of main's; no other change.
|
Main sync: merged main Conflicted files: All 9 files under |
|
REQUEST CHANGES at 111b104 class A, Opus review, same model family as the author, second family not available. The build lane and the sync lane both ran on claude-opus-5-5, the same model as this review. This verdict does not allow a merge by itself. Summary: the code is correct and inert. At (5,120, 128) nothing the prover consumes changes: the What I checked myself (fresh clone, base = merge base cdf7844, head = 111b104, CPU only)
Must-fix
Nonblocking
Main sync needed: no (main is 1599e1b, already merged). Skipped checks
Second reviewer, look first at: whether c = sqrt(d)/2^t, rather than the documented sqrt(d)/64, is the right conversion constant for widths outside 4,096 to 16,383 (must-fix 1). Everything else at the existing shape is byte-identical. |
…ys more than the cited documents; text-only step) A review found that the fold_constants docstring and related text present the general rule c = sqrt(d) / 2^t as stated by scales/README.md and docs/model.md section 11.3. Those documents state sqrt(d) / 64, right for d = 5,120 and dh = 128 only. The amendment records that, and that the step that follows corrects comments and text only: no code line, test, run file, threshold, count or verdict changes. Appended under "Amendments"; no earlier PREREG text is edited.
…ule as this PR's (review must-fix 1, text only) docs/model.md section 11.3 states the two constants as RN32(sqrt(d)/64) and RN32(sqrt(d)/64/sqrt(dh)), right for d = 5,120 and dh = 128 only, and scales/README.md states the conversion's constant as sqrt(d) / 64. The fold_constants docstring (weight_sums.py), the matching comment (weight_sums.cpp), one passage of weight_sums/README.md and two passages of RESULTS.md said that those documents state c = sqrt(d) / 2^t. They now say: sqrt(d) / 64 is what the documents state; it equals c where t = 6 (widths 4,096 to 16,383, 5,120 included); for other widths c is a choice made in this PR that no document on main states and that is not tested against the scales of scales/; the tests check the arithmetic of the formula only. weight_sums.py: only lines inside the fold_constants docstring change. weight_sums.cpp: only whole-line // comments change. No code line, test or run file changes. Nothing was built for this commit.
…ine 29, not 28 (review, nonblocking) Checked against prover/weights_blocks/gguf_source.cuh at this head: the test of embedding_length and key_length is on line 29. One number changes.
…ts-214 summary change Output of scripts/update-results.py, with the README stamp line set to main's. One row changes in each file, and the stamp line in README.md.
Conflicts: research/results.yaml, README.md, CLAIMS.md. results.yaml is main's file plus this PR's own entry (fold-constants-214), byte-identical to the entry at the branch head before the merge 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; the README stamp line is main's, verbatim.
…9d2b Output of scripts/update-results.py on the merged tree, with the README stamp line set to main's. Each file differs from main by this PR's own row only.
|
Fix for the round-1 review (comment 7249850873, REQUEST CHANGES at New head: Review itemsMust-fix 1 (the citation). Reworded; whether it is settled is the reviewer's call.
Each place now says: sqrt(d)/64 is what the documents state; it equals c where t = 6, widths 4,096 to 16,383, 5,120 included; for other widths c = sqrt(d)/2^t is a choice made in this PR that no document on main states and that is not tested against the scales of No code line changed. NOT done: no build and no run. I did not rebuild Must-fix 2 (PR body). Done. The stale "currently CONFLICTS with main" bullet is replaced by a line naming both syncs: main Nonblocking, RESULTS open item 3 line reference. Done in Left open (not done here, by the lane's scope)
Found while doing this, not changed
One thing done wrong
Main sync
|
|
REQUEST CHANGES at 419b12c class A, Opus review, round 2, delta review, same vendor family as the authors; this verdict does not by itself allow a merge Summary: the delta is text only, and I measured that. What I checked myself (the fix lane's clone, read only; exports by
|
Part of #214
The CUDA side is NOT changed by this PR:
prover/weights_commitment/fold_weights.cuh(reads()) andprover/weights_commitment/fold_source.cuh(the shape gate) keep their literals and their (5,120, 128) gate. This host has no GPU and could not compile them. The change they need is written inexperiments/20261129-214-fold-constants/RESULTS.md, "Open item: the CUDA side", as NOT made and NOT compiled.What changed
weight_sums/weight_sums.py:fold_constants(width, head)andrn32_sqrt_word()compute the two constants (t the largest integer with 4^t <= d, c = sqrt(d) / 2^t, c_0 = RN32(c), c_q = RN32(c / sqrt(dh)), each one rounding of the exact real, integer arithmetic only).NORM_CONSTANTandQUERY_CONSTANTnow come fromfold_constants(5120, 128).weight_sums/weight_sums.cpp: the C++ twin asconstexpr(unsigned __int128), with astatic_assertthat it gives 0x3F8F1BBD and 0x3DCA62C2 at (5,120, 128).weight_sums/tests/fold_constants_test.py(new stepfold-constants.pyinrun_tests.sh) checks the literals, the (5,120, 256) words and 23 shapes against an independent exact bisection.unit_test.cppaddstest_fold_constants.What the documents state, and what this PR chose
docs/model.md, section 11.3, states the two constants as RN32(sqrt(d)/64) and, for the query matrix, RN32(sqrt(d)/64/sqrt(dh)), and says they are right for d = 5,120 and dh = 128 only.scales/README.mdstates the conversion's constant as sqrt(d) / 64 too. Neither states sqrt(d) / 2^t as the conversion's constant.fold_constantsreturns what the documents state.scales/. Example: at d = 2,048 and dh = 64 the function gives 0x3FB504F3 for the norm constant, while sqrt(d) / 64 rounds to 0x3F3504F3. Which is right for such a width is open. No gate admits such a width.Verdicts (PREREG thresholds), all measured, unreplicated
values.json) agree. At (5,120, 256): c_0 0x3F8F1BBD, c_q 0x3D8F1BBD.runs/compare.json).run_tests.sh: base 26/26, head 27/27, 0 skipped.fold_constants_test.py0 failed checks;unit_test0 of 20,066,032 failed.The runs are those of commit
b1939005. Nothing was run again or built after the review; see the next section.Changed after the round-1 review (text only)
The review (PR comment 7249850873, REQUEST CHANGES at
111b104d) found that the code comments and the write-up presented c = sqrt(d) / 2^t as a rule stated byscales/README.mdanddocs/model.mdsection 11.3. Commits on top of111b104d, no rebase and no force-push:b831cfac: PREREG amendment A2, alone, before any other change.774225a1: thefold_constantsdocstring inweight_sums.py, the matching comment inweight_sums.cpp, one passage ofweight_sums/README.md, and two passages of RESULTS.md plus a new RESULTS section "Changed after review". Inweight_sums.pyonly lines inside that docstring change; inweight_sums.cpponly whole-line//comments change.cd2e361c: RESULTS open item 3, thegguf_source.cuhgate is at line 29, not 28.64a0b87f: the summary of thefold-constants-214row inresearch/results.yaml, with the regenerated README block and CLAIMS.md. This commit holds the hand-edited row and the regenerated files together, and its message names only the regeneration; they were meant to be two commits. The tree is as intended.No code line, test, run file, verdict, count or threshold changed.
bin/weight_sumswas NOT rebuilt after the comment change inweight_sums.cpp: a comment is replaced by a space before compilation and the file uses no__LINE__,assert()or#line, so the program should not change, but that is an argument and not a measurement. A reviewer who wants it measured can rebuild at111b104dand at this head and compare the two programs.NOT established
No Qwen commit and no weights. No admission gate opened. No GPU build or CUDA change. Partial rotary and the dh = 256 no-wrap barrier untouched. Whether c = sqrt(d) / 2^t or the documented sqrt(d) / 64 is the right conversion constant for widths outside 4,096 to 16,383. Values at shapes other than the two registered ones are checked only between computations written in this PR. The public fork the issue mentions was not read.
Proposed claim
fold-constants-214(the results.yaml row): the words above and the 19/19 byte identity. Not a headline.Merge notes
research/results.yamlrow: must merge with a merge commit (metric commitb1939005).1599e1b9in merge commit28308f55with regeneration commit111b104d, and mainfef9d2b8in merge commitff08ab3cwith regeneration commit419b12c3. Head419b12c3contains mainfef9d2b8. If main moves again, the three generated files will conflict again in the same way.Draft, not for merging by the lane.