Repository navigation
Paper §1-2 prose: targeted fixes by unit, Sam's title, error-model qualifiers, terminology unified - #183
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69c42e8d4a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| \paragraph{The stock kernel's error} Theorem~\ref{thm:stock} needs a bound $G_i$ on how far the stock kernel's FP32 accumulator can lie from the real logit; for a closed-source kernel it can only be assumed. We write it as $G_i=\gamma_{\rm stock}\sum_j|w_{ij}h_j|+\eta$, where the floor $\eta=2^{-113}$ covers underflow in products and partial sums. For an entry that is never recomputed, Cauchy--Schwarz bounds $\sum_j|w_{ij}h_j|$ by $\norm{w_i}_2\norm h_2$, from row norms stored offline. | ||
|
|
||
| \paragraph{A screen needs a margin} A screen knows only intervals $lo_i\le z_i\le hi_i$, and it must not drop any entry that could still be the stock token, including entries it never recomputes. An entry that loses in real arithmetic can still tie or win once the stock kernel's error and rounding are applied, so losing to the leader's lower end is not enough. With $\bar z$ the largest endpoint magnitude over all entries' intervals and $G_{\max}$ the largest $G_i$, $\delta_{\max}=2G_{\max}+\ulpb(\bar z+G_{\max})$ is at least $\delta_{ab}$ of Theorem~\ref{thm:stock} for every pair. Given valid intervals, an entry with $hi_j<\max_ilo_i-\delta_{\max}$ can therefore be dropped for good (Figure~\ref{fig:mechanism}a). | ||
| The constant $\gamma_{\rm stock}$ comes from one of two named \emph{error models}. The \emph{\modelcons} charges $2D$ roundings of relative size $2^{-23}$ in any order, $\gamma_{\rm stock}=\gcons$. It covers any summation order, split-$K$ (a sum divided among thread blocks) with FP32 partial sums, and truncating adders that keep at least 23 fractional bits per block of addends (the published Hopper model keeps 25). The \emph{\modelhopper}, $\gamma_{\rm stock}=\ghop$, starts from Khattak and Mikaitis's measurement-based model of BF16 tensor-core arithmetic on Hopper, the GH200's GPU architecture~\cite{khattak2026}, and adds an allowance for FP32 split-$K$. Khattak and Mikaitis measured that arithmetic through the warp-level \code{mma} instructions, not the warpgroup \code{wgmma} instruction. Neither model is a vendor contract: no vendor documents how the stock kernel's tensor-core instructions align and round, so whether either model bounds the stock kernel is an open assumption. The largest error observed in the stock GEMM's FP32-output variant, a separate kernel whose accumulator can be read, is 1/58 of the \modelhopper's bound \ev{kernel-error}. Neither model covers split-$K$ partial sums stored in BF16, which PyTorch permits by default~\cite{torchnumeric}; on this build, forbidding them changes neither the selected kernel nor any output bit \ev{kernel-error}. |
There was a problem hiding this comment.
Synchronize Appendix A.3 with the corrected accumulator model
The revised text says the conservative model covers adders with at least 23 fractional bits and attributes the published Hopper measurements to warp-level mma, but the unchanged paper/sections/app_proofs.tex:57-58 still requires “24 fractional bits” and explicitly describes the measured instruction as wgmma. These contradictory definitions leave readers unable to determine which precision and instruction actually justify the paper’s error constants; update the appendix alongside this correction.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed that the appendix must say the same thing. That change is in #184 rather than here, so the citation and appendix edits stay in one PR: bb9f886 states the threshold as at least 23 fractional bits per 8- to 32-term block in app_proofs.tex:57 and in the gamma_copy row, and badf789 replaces the wgmma attribution in app_proofs.tex:58, the Table A.1 row and notes/engine.tex with the warp-level mma wording and the same open-assumption sentence as §2.2 here. #184 and this PR are meant to merge together (#184 first), and neither touches the other's lines. No change in this PR.
|
Verdict: REQUEST CHANGES at 69c42e8 Reviewer 2 (paper fidelity and quality). I diffed every changed paragraph against main (7cc3135; main's paper sources are unchanged since), checked the changed numbers and conditions against the evidence, and built the head in the CPU window. The PR does what it says. Most units read better, the strong ones are left alone, and every Checked and correct
Blocking
Optional
Build and checks at 69c42e8 (CPU window, one core): 0 LaTeX warnings, 0 overfull or underfull boxes. The paper is 48 pages and the notes 52. The Conclusion and the References heading are both on p10, in the right column. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: APPROVE at 87da898 Reviewer 2. I checked the delta from 69c42e8, where I had requested changes, to 87da898. All the blocking items are fixed, and so are the optional items, apart from one wording point.
Build at 87da898, CPU window, one core: 0 LaTeX warnings, 0 overfull or underfull boxes. The paper is 48 pages and the notes 52. The Conclusion ends on p10, and the References heading is at the top of p11. This approval covers 87da898 only. Under main's merge order (#184, then #181, then #183), this PR rebases after #181, and the new head will need my re-check. I will check:
|
…unified Introduction: the opening states both questions; the speed paragraph drops the forward use of "certified head", says why a drafter's head need not be exact, and glosses MTP-4B as named after its 4B target; transport is described before it is named, with its scope beside the 0.7% claim; the contributions lead says who replicates which kernel; item 1 calls the stock kernel's bound an error model, item 2 gets its own heading; the research notes are described. Footnote 1: "exact references" made explicit, the (derived) legend split from the tag legend, the glossary pointer left to §1.1. Section 2: the notation sentence is split and says what the references are for; the R-bf16 witness is described as an emulation of a sequential kernel; "The stock kernel's error" is split into the assumption and the two models; the screen margin defines z-bar by formula; §2.4's one paragraph becomes the last sentence of §2.3 (label kept; its FP64 clause repeated Table 1's last row). Proposition 2.4 is renamed "interval condition", "every admissible accumulation" says which, and Table 1's seeded row says "sequence index" instead of "position". Citations (auditor): the Hopper model's source measured mma, not wgmma; PyTorch's BF16 split-K default cites its documentation. Terminology: "drift ratio" becomes "drift" (main, appendices, register, notes, glossary); "seeded verification" is dropped for the cited "fixed-noise verification" (§3.3); the glossary moves S-race to the appendix scope, retitles the interval row and writes gamma_stock.
…e, R-bf16 wording, Khattak and Mikaitis named, a position's head input)
…ble 1 pointer closes the contract paragraph Title (Sam's choice): "The Work a Verifier Needs: Certified Int8 Output Heads That Match a Production Kernel's Rounding" in \mlsystitle and the PDF metadata; the running head is unchanged. Limitations, "The error model is an assumption": says that the Hopper model comes from measurements of the warp-level mma path and that the stock kernel's instructions are unchecked against it; the two "Agreement" openings become one; the FP32-output variant is named briefly (Section 4.3 introduces it in the next pass). Section 2.3: the Table 1 sentence becomes the last sentence of the contract paragraph (after #172's merge).
…t least 23 fractional bits per block (§1.1 item 2, §2.2, §3.1) The reviewer checked the condition against Appendix A: the published Hopper model keeps 25 bits. §3.1 ¶1 also splits mechanism, consequence and proof pointer into separate sentences and cites the adder model beside Lemma A.1.
…assumption (§2.2, Limitations); line trims in §1-2 Main's ruling: no vendor documents how the stock kernel's tensor-core instructions align and round, so §2.2 states that whether either model bounds the stock kernel is an open assumption, with the FP32-output variant's largest observed error (1/58 of the Hopper bound) beside it. Limitations adds that the conservative model needs adders with at least 23 fractional bits per block, a width no vendor publishes. To stay within ten pages: §2's one-sentence lead (a third statement of the framing in §1 ¶1 and ¶4) is cut; "G_i is an assumption" is said once, in the models paragraph; the screen paragraph drops a clause the next sentence makes redundant; Table 1's row 3 points to §2.2; §1 ¶6's opener is shorter.
…2.2 signpost, Limitations caveats in one sentence)
The research-notes sentence in §1.1 goes (lead's first choice). The line
after Theorem 2.3 ('decides with the sharper Proposition 2.4 ... only to
screen') repeats what §2.2's screen paragraph and §2.3's opening say.
Limitations states the mma and 23-bit caveats as one unchecked assumption,
so the follow-up with the measured wgmma evidence replaces one sentence.
…eplay beside the claims, "about 1/58")
B1: the 23-bit condition names the block sizes Appendix A.3 proves it for
("per block of 8 to 32 addends") in §2.2 and §3.1.
B2: the seeded-sampling noise is keyed by "(seed, token position in the
sequence, token)" in Table 1 and §3.3; SGLang hashes token positions.
B3: the §2.3 pointer to Table 1 keeps "the offline replay approximates real
arithmetic in FP64" in the main text; Table 2's engine-check rule reads
"fixed-noise verification".
Optional (approved): R-real's difference from R-stock gives "either" its
antecedent; eta "is a floor that covers underflow"; "is unchecked" replaces
"is an open assumption" (consistent with Limitations); Limitations "rests on
an assumed model ...; neither of the two models covers ..."; "about 1/58"
(the measured ratio is 57.6) in §2.2 and Limitations; App C says "smallest
drift" for the two smallest-ratio values.
Row 3's status points to §2.2, where the FP32-output variant is introduced; row 7 keys the seeded noise by the token position in the sequence. The sentence before the full table no longer says Table 1 is in the main text.
The wgmma evidence (#186, profile-wgmma) replaces the open-assumption wording, within the probes' scope. §2.2: Khattak and Mikaitis measured the warp-level mma path; the two stock head kernels we inspected (at M = 1 and 32) issue the warpgroup wgmma instead, and on crafted inputs all fourteen stock head kernels accumulate as the Hopper model assumes (16-product blocks, 25 fractional bits, truncation of the dropped bits and of the sum). It is a measurement on one GPU, and neither model is a vendor contract; the 1/58 sentence stays. Limitations: the probes find that accumulation, with more fractional bits than the conservative model needs, but used products with one exact operand and reached neither subnormals nor other GPUs, so neither model is established for all inputs. Appendix A: the Hopper-model item names the HMMA source of the published model and gives the probe result with its full scope (operands, GH200, driver 570.195.03, CUDA 13.0, PyTorch 2.13's cuBLAS; what was not probed); Table A.1's row and Table 1's row 3 cite the probes. Notes: the divergence figure's caption says the same in one clause. Both registers get an identical profile-wgmma entry (files and producers as in evidence/profiles/README.md).
With Table 1 and §2.4 already out of the main text, the qualifiers from review and the wgmma statement pushed the Conclusion onto p11. Cuts, none touching the wgmma sentences: - §2.2: R-bf16 "does not give the engine's result" (reviewer's rephrase-without-"either" route); the emulation sentence and the certified-tie sentence are shorter; "(the published Hopper model keeps 25)" goes, since the wgmma sentence gives the 25 bits. - Limitations: the FP32-output variant's 1/58 stays in §2.2; Limitations keeps that the engine's BF16-output kernel hides its accumulator, so the variant's error is indirect evidence. - Related Work, "What is and is not new" (outside §1-2, moved in for the page budget): keeps every prior-art item it named and points to §1.1 for the contributions instead of listing them a second time. - Theorem 2.3's proof moves to Appendix A beside Lemma 2.2's, with the step from the accumulator bounds written out.
87da898 to
d6ea9f0
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: REQUEST CHANGES at d6ea9f0 Reviewer 2. I re-checked #183 after its rebase onto #181 (ccc30c1). The rebase is right, and the page-budget cuts keep every number and condition. One sentence in the new wgmma commit claims more than its evidence shows, and that blocks. Rebase (diff of diffs)
dca5164, the wgmma measured statement. I checked it against
d6ea9f0, page budget
Blocking
Optional
Build at d6ea9f0 (my own, one core, niced, during an untimed hold): 0 LaTeX warnings, 0 overfull or underfull boxes. The paper is 50 pages and the notes 53. The Conclusion and the References heading are both on p10, so the main text is within budget. |
…s read Appendix A's Hopper-model item now says that the two stock head kernels whose SASS could be read (M = 1 and 32) issue wgmma (only HGMMA) and that the other twelve could not be read statically; the accumulation result for all fourteen is unchanged. Both register entries say the same. §2.2: the emulation sentence reads "An exact emulation of a sequential FP32 kernel gives an example with D = 3 on which the two choose different tokens".
|
Reviewer 2's blocker is addressed in a03d730: app_proofs.tex now says "The two stock head kernels whose SASS could be read ( |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: APPROVE at a03d730 Reviewer 2. I checked the delta from d6ea9f0 to a03d730. The one blocking item and the optional item are fixed. This approves the PR: I reviewed it in full at 69c42e8, then 87da898, then the rebase onto #181 at d6ea9f0 (diff of diffs, the Table 1 carry-over, the wgmma statement and the page cuts), and now this head.
Build at a03d730 (my own, one core, niced, during an untimed hold): 0 LaTeX warnings, 0 overfull or underfull boxes. The paper is 50 pages and the notes 53. The Conclusion and the References heading are both on p10. Carried from d6ea9f0:
Codex is clean on a03d730 (09:34), and the earlier Codex threads have replies. After merge: both PDFs need a rebuild PR (paper 50 pages). |
Why
The editorial pass (#161) left the introduction and Section 2 uneven: some paragraphs read well, while others still carried a term before its definition, a sentence doing four jobs, or a pronoun with no referent. Two cold readers rated the draft 4/5 for difficulty and listed failures sentence by sentence. This PR grades every unit of the front matter, §1 and §2 (strong, uneven or weak), fixes the sentences that fail and leaves strong units word for word. It also applies the terminology decisions that ripple across files, Sam's choice of title and the citation auditor's two fixes in §2.2. The ledger, one row per unit, is at the end of this description.
What changed
Title. Sam's choice, "The Work a Verifier Needs: Certified Int8 Output Heads That Match a Production Kernel's Rounding", in
\mlsystitleand the PDF metadata. The running head is unchanged.Footnote 1. "exact references" becomes "exact-arithmetic references". The "(derived)" legend is its own sentence. The glossary pointer is left to §1.1's closing sentence in the body. The AI-use footnote is unchanged.
Introduction.
Section 2.
Section 3.1, first paragraph. Mechanism, consequence and proof pointer are now separate sentences. The proof pointer cites Lemma A.1 together with the adder model of Appendix A.3 (see the fidelity qualifiers below).
Limitations, "The error model is an assumption". The two sentences that both opened with "Agreement" become one. The FP32-output variant is named briefly, because §2.2 introduces it. The mma and 23-bit caveats are now one sentence ("Whether either model fits the stock kernel's instructions is unchecked: ..."), so a later commit that adds measured wgmma evidence can replace it whole.
Fidelity qualifiers (main's rulings; each narrows a claim, and no number changes).
mmainstructions, not the warpgroupwgmmainstruction (citation auditor S1). This is in §2.2 and Limitations; Limitations adds that whether the stock kernel's instructions accumulate the same way is unchecked.Terminology, across files.
Checks
scripts/check_paper_references.py --rev HEADis clean. Pages 1-5 and 10 were rendered at 150 dpi and inspected. On p4, Table 1 floats to the foot of the right column with about three lines of space above it, because §3's heading moves to p5. P1 moves Table 1 to the appendix.origin/main..HEAD) reports 0 numbers found nowhere and one dropped token kind, "16". Two tokens leave §2 on purpose:Added tokens: "4B target" and "at batch 1" (Fig. 1's B=1 row); "Int8" twice in the title; "23" (×4) and "25" from the 23-bit qualifier; "1/58" and "FP32-output" in §2.2, where the variant is now introduced (\ev{kernel-error}).
\evand\pendis still on its claim. The removed and added markers match key by key, plus one\ev{kernel-error}on the new §2.2 sentence. The only citation added is\cite{torchnumeric}(S4).Overlaps
\label{sec:assumptions}and the words "in Appendix~\ref{app:proofs}".Ledger: one row per unit
Review round (reviewer 2), 87da898
multinomial_with_seed); "sequence index" read as the request index.\label{sec:assumptions}.Rebase onto #181 and the wgmma statement, d6ea9f0
The branch is rebased onto ccc30c1 (#181). It adds three commits on top of the seven reviewed ones.
4dc3ca4, Table 1 moved by Main text: the served frontier and the exact engine changes (Section 4.5); Tables 1-4 to the appendices #181. Table 1 now sits in Appendix A and carries this PR's rows 3 and 7: the FP32-output variant, and "(seed, token position in the sequence, token)". App A no longer says that Table 1 is in the main text. One
\label{sec:assumptions}remains, at the pointer that closes §2.3's contract paragraph: "Table 1 in Appendix A lists the assumptions behind every agreement claim; the offline replay approximates real arithmetic in FP64". Main text: the served frontier and the exact engine changes (Section 4.5); Tables 1-4 to the appendices #181's separate "Assumptions" paragraph is folded into that pointer. The moved Table 2 says "fixed-noise verification".dca5164, wgmma: measured statement. Profiles: the inspected head kernels issue HGMMA (wgmma), and all 14 accumulate BF16 as the Hopper model says (k = 16, F = 25, truncation) #186 is merged, so
\ev{profile-wgmma}is committed evidence. Its scope as written:mma(HMMA) measurements.wgmmainstruction.wgmmabehaves the same, that inputs off the ties rule out rounding to nearest, and that the BF16 epilogue rounds to nearest even.Places: §2.2, Limitations, the App A Hopper item and Table A.1 row, Table 1's row 3, notes/engine.tex, and an identical
profile-wgmmaentry in both registers. The "about 1/58" sentence stays in §2.2.d6ea9f0, ten pages after the rebase. After the rebase, M1's qualifiers no longer fit in ten pages, because Main text: the served frontier and the exact engine changes (Section 4.5); Tables 1-4 to the appendices #181 had already used the space the old Table 1 and §2.4 freed. Four changes bring it back:
Build of d6ea9f0: 0 warnings, 0 overfull boxes, paper 50 pages, notes 53. The main text ends on p10, with References near the foot of p10's right column. The checker is clean, including the identical-register check.
numdiff against origin/main: 0 numbers found nowhere and no dropped token kind; "1/58" nets out, leaving L1 and appearing in §2.2. Every removed
\evand\pendreappears.