Skip to content

Paper §1-2 prose: targeted fixes by unit, Sam's title, error-model qualifiers, terminology unified - #183

Merged
SamMausberg merged 11 commits into
mainfrom
writing/m1-intro-contract
Oct 2, 2026
Merged

SamMausberg merged 11 commits into
mainfrom
writing/m1-intro-contract

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

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 \mlsystitle and 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.

  • ¶1 states both questions of the title: how little of the head's work an exact shortcut requires, and what "exactly" must mean.
  • ¶2 no longer uses "certified head" two paragraphs before the method appears. It says why a drafter's head need not be exact, and what an exact one preserves (the drafts and the acceptance rate). MTP-4B is glossed as named after its 4B target. The MTP shares are stated as shares "of a profiled cycle at batch 1" (Fig. 1's denominator).
  • ¶3 replaces "the leader's" (undefined) with the exact condition. ¶4 gives the 1.0% its denominator. ¶5 glosses batch shape at first use.
  • ¶6 describes transport before naming it. "beat" becomes "narrower than", the comparison Proposition 5.2 makes. "in every variant tested" now stands beside the 0.7% claim.
  • §1.1: the lead says who replicates which kernel. A public Metal implementation replicates its engine's kernel; the cuBLAS kernel here cannot be replicated. Item 1 calls the stock kernel's bound an error model, because "error bound" is the int8 copy's proved bound. Item 2 gets a heading that names both contributions. The research-notes sentence was cut for the page limit (see Checks).

Section 2.

  • §2.2: the notation sentence is split, and a purpose sentence comes first. The R-bf16 witness is described as an emulation of a sequential FP32 kernel, not of cuBLAS (cold reader 4).
  • "The stock kernel's error" is split into the assumption with its form, then the two models. eta is described as covering underflow. "G_i can only be assumed" is now said once.
  • The FP32-output variant of the stock GEMM is introduced here, as a separate kernel whose accumulator can be read.
  • "A screen needs a margin" defines z-bar by formula. "The leader" is gone.
  • §2's one-sentence lead is cut to keep the main text within ten pages. It was the third statement of the framing in §1 ¶1 and ¶4. The line after Theorem 2.3 ("decides with the sharper Proposition 2.4 ... only to screen") is cut for the same reason; §2.2's screen paragraph and §2.3's opening say the same.
  • §2.3: Proposition 2.4 and the subsection title say "interval condition". The phrase "every admissible accumulation" now says which accumulations: those the error model admits.
  • §2.4, a one-paragraph subsection, becomes the last sentence of the contract paragraph ("Table 1 lists the assumptions behind every agreement claim."), and the label is kept. P1 points this sentence to Appendix A when it moves Table 1.
  • Table 1: row 3's status cell points to §2.2, where the FP32-output variant is now introduced. Row 7 says "(seed, sequence index, token)": "position" is the paper's term for a head input and its decision.

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).

  • The conservative constant covers truncating tensor-core adders only if they keep at least 23 fractional bits per block of addends; the published Hopper model keeps 25. This is added in §1.1 item 2, §2.2 and §3.1 ¶1. §3.1 now cites Lemma A.1 together with the adder model of Appendix A.3, because Lemma A.1 alone does not show it. The reviewer checked the condition against Appendix A, whose own "24" is corrected separately.
  • The Hopper model comes from Khattak and Mikaitis's measurements of the warp-level mma instructions, not the warpgroup wgmma instruction (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.
  • No vendor documents how the stock kernel's tensor-core instructions align and round, so whether either model bounds the stock kernel is stated as an open assumption in §2.2. The FP32-output variant's largest observed error, 1/58 of the Hopper bound [E12], stands beside it. Limitations adds that no vendor publishes the 23-bit width for those instructions.
  • S4: PyTorch's BF16 split-K default now cites its documentation.

Terminology, across files.

  • "drift ratio" becomes "drift": §5.2, app_transport ×4, app_register ×2, notes register ×2, notes status ×1, and the glossary. Fig. 4's axis label is left to the figures pass.
  • "seeded verification" is dropped in favour of the cited "fixed-noise verification" (§3.3 ¶1). Table 2's use follows with P1.
  • Glossary: S-race moves to the appendix scope, the interval row notes that the appendices say "enclosure", the error-model row writes gamma_stock, and the column-fallback note becomes its own sentence.

Checks

  • Build at 69c42e8 (build_paper.sh, one core): 0 LaTeX warnings and 0 overfull boxes. The paper is 48 pages and the notes 52, both with 0 warnings. The main text ends on p10, and the References heading sits near the foot of p10's right column. scripts/check_paper_references.py --rev HEAD is 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.
  • Length: about 4 lines longer than 2367122 in the right column of p10. That includes Pins and contract text: FlashAttention 4 runs here; the start-up self-test re-checks only gathered entries #172's additions to §2.3 and Table 1, and roughly 6 lines of fidelity qualifiers. PDF words from the title to REFERENCES: 9,037 at 2367122 and 9,212 here (lead's method). To keep the main text within ten pages, three sentences were cut: §2's one-sentence lead (a third statement of the framing in §1 ¶1 and ¶4), the signpost after Theorem 2.3 (repeated by §2.2's screen paragraph and §2.3's opening), and the research-notes sentence in §1.1. The §2.4 heading went too.
  • numdiff (origin/main..HEAD) reports 0 numbers found nowhere and one dropped token kind, "16". Two tokens leave §2 on purpose:
    • "BF16" in "its BF16 output" (§2.2 notation): the new sentence says the kernel "outputs L_i = rn_B(...)", and rn_B is defined in the same sentence as rounding to BF16.
    • "FP64" in the old §2.4 sentence: it repeated Table 1's last row ("The offline replay evaluates real logits in FP64").
      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}).
  • Every \ev and \pend is 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

Ledger: one row per unit
id file:unit grade action one-line reason render check
F1 paper.tex: footnote 1 (repo, tags) uneven targeted "exact references" -> "exact-arithmetic references"; the (derived) legend is its own sentence; glossary pointer dropped (§1.1 closing gives it in the body) p1
F2 paper.tex: footnote 2 (AI use, preprint) strong kept disclosure unchanged p1
I1 intro.tex: §1 ¶1 strong targeted (last sentence) one job per sentence; states both questions of the title p1
I2 intro.tex: §1 ¶2 uneven targeted no forward use of "certified head"/"stock"; says why a drafter's head need not be exact; MTP-4B glossed as named after its 4B target; MTP shares "of a profiled cycle at batch 1" (Fig. 1's denominator, conditions.md) p1-2
I3 intro.tex: §1 ¶3 strong targeted (one phrase) "the leader's" (undefined) -> "lies wholly below another entry's" p2
I4 intro.tex: §1 ¶4 strong targeted (denominator) "1.0% of positions" p2
I5 intro.tex: §1 ¶5 strong targeted (gloss) batch shape glossed at first use p2
I6 intro.tex: §1 ¶6 uneven targeted opener "A second source of bounds would reuse the drafter's work."; operation before its name; one job per sentence; "narrower than" (Prop 5.2's comparison) for "beat"; "in every variant tested transport skips under 0.7%" (scope beside the claim, wording as item 4) p2
I7 intro.tex: §1.1 lead weak rewritten says who replicates which kernel (Metal implementation vs cuBLAS); no "Specifically" p2
I8a intro.tex: §1.1 item 1 uneven targeted "The kernel's error bound" -> "The error model" (terminology 5; the item already names the stock kernel) p2
I8b intro.tex: §1.1 item 2 uneven targeted heading as the lead worded it; "certifies the token of SGLang's seeded sampler"; fidelity: "truncating tensor-core adders that keep at least 23 fractional bits" p2
I8c intro.tex: §1.1 item 3 -- untouched P1
I8d intro.tex: §1.1 item 4 strong kept p2
I9 intro.tex: §1.1 closing uneven targeted (cut to one sentence) the glossary pointer stays; the research-notes sentence (drafted to describe the notes) was cut for the ten-page limit, lead's first choice p2
C0 contract.tex: §2 lead strong cut (page budget) a third statement of the framing in §1 ¶1 and ¶4; cut to keep the main text within ten pages; restorable if a later build has slack p3
C1 contract.tex: §2.1 strong kept p3
C2 contract.tex: §2.2 notation uneven targeted split; a purpose sentence before the definitions p3
C3 contract.tex: ¶ after Def 2.1 uneven targeted "either" without antecedent fixed; the D=3 witness described as an emulation of a sequential kernel, not of cuBLAS p3
C4 contract.tex: Lemma 2.2, Thm 2.3, proof; closing line strong kept; closing line cut (page budget) the maths is unchanged; "The certified head decides with the sharper Proposition 2.4 below and uses this theorem's margin only to screen" is cut because §2.2's screen paragraph and §2.3's opening say the same p3
C5 contract.tex: "The stock kernel's error" weak rewritten (split, no new heading) the assumption and its form / the two models in two paragraphs; "FP32 sum" -> "FP32 accumulator"; eta "covers underflow in products and partial sums"; "can only be assumed" said once; fidelity: S1 (Khattak and Mikaitis measured mma, not wgmma), the reviewer's 23-bit condition on truncating adders (Hopper keeps 25), main's open-assumption sentence with the FP32-output variant's 1/58 [E12]; S4 \cite{torchnumeric} p3-4
C6 contract.tex: "A screen needs a margin" uneven targeted z-bar defined by formula over all entries; "the leader" removed; the clause the margin definition makes redundant dropped p4
C7 contract.tex: §2.3 title, opening, Prop 2.4, proof strong targeted (rename) "Interval form" -> "Interval condition" in the subsection title and the proposition (terminology 1) p4
C8 contract.tex: "Two entries whose logits round ..." strong targeted (one phrase) "every admissible accumulation" -> "every accumulation the error model admits" p4
C9 contract.tex: "The contract and the fallback" uneven untouched #172
C10 contract.tex: §2.4 Numerical Assumptions weak merged heading dropped, label kept; one sentence at the end of §2.3 ("Table 1 lists the assumptions behind every agreement claim."); the status summary dropped (it repeats Table 1's Status column, incl. the FP64 row) p4
C-T1 contract.tex: Table 1 uneven targeted (wording) row 3 status: "Assumed; consistent with every replayed position and the FP32-output variant (Section 2.2)" (§2.2 now introduces the variant); row 7: "(seed, sequence index, token)"; row 6 is #172's p4-5
H6r head.tex: §3.3 ¶1 (rename only) uneven targeted (rename) "Seeded verification" dropped; "Fixed-noise verification" leads the sentence (terminology 3). Rest of H6 in M2 p5-6
T3r transport.tex: §5.2 ¶1 (rename only) uneven targeted (rename) "drift ratio" -> "drift" (terminology 2). The rest of T3 in M3 p8
AG terminology.tex: glossary uneven targeted S-race row moved to app scope (alphabetical); "Interval [lo_i,hi_i]" row (enclosure noted); gamma_stock in the error-model row; "column fallback" note as its own sentence; "Drift" App G
AC-r app_transport.tex (4), app_register.tex (2), notes/register.tex (2), notes/status.tex (1) -- targeted (rename) "Drift ratio" -> "Drift"; Fig 4's x-axis label ("Drift ratio rho") left for the figures editor
T1 paper.tex: title uneven rewritten (Sam's choice B) "The Work a Verifier Needs: Certified Int8 Output Heads That Match a Production Kernel's Rounding"; pdftitle too; running head unchanged p1
C9b contract.tex: "The contract and the fallback" (after #172) uneven targeted (one sentence appended) the Table 1 pointer is its last sentence (old §2.4); #172's text otherwise untouched p4
L1 discussion.tex: "The error model is an assumption" uneven targeted main's rulings: the Hopper model comes from mma measurements and the stock kernel's instructions are unchecked against it; the conservative model needs at least 23 fractional bits per block, a width no vendor publishes; one "Agreement" opening; FP32-output variant named briefly (§2.2 introduces it) p10
H1 head.tex: §3.1 ¶1 uneven targeted mechanism, consequence and proof pointer in separate sentences; fidelity: "Lemma A.1 and the adder model of Appendix A.3 show that this constant covers any summation order, and truncating adders that keep at least 23 fractional bits per block" p4-5

Review round (reviewer 2), 87da898

  • B1: the conservative model's adder condition now reads "per block of 8 to 32 addends" in §2.2 and §3.1, which is the range App A.3 proves. The intro and Limitations keep the short form.
  • B2: "(seed, token position in the sequence, token)" in Table 1 and §3.3. SGLang hashes token positions (multinomial_with_seed); "sequence index" read as the request index.
  • B3: the Table 1 pointer at the end of §2.3 keeps "the offline replay approximates real arithmetic in FP64", so that statement stays in the main text once Table 1 moves, and the "FP64" token is no longer dropped. Table 2 says "fixed-noise verification". When Main text: the served frontier and the exact engine changes (Section 4.5); Tables 1-4 to the appendices #181 merges first, this PR rebases and carries Table 1's row 3 and row 7 edits into the moved table in app_proofs.tex, with one \label{sec:assumptions}.
  • Reviewer 2's optional points, all applied:
    • "either" in §2.2 now has its antecedent: R-real can differ from R-stock at near ties.
    • eta is introduced before it is named as a floor.
    • "open assumption" becomes "unchecked", as in Limitations.
    • Limitations reads "an assumed model ...; neither of the two models".
    • "about 1/58", since the measured ratio is 57.6.
    • "smallest drift" in App C's caption and text, after the rename.
  • Codex's comment on the App A lines is answered by scope: Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184 carries those lines and merges first.
  • Build of 87da898: 0 warnings, 0 overfull boxes, paper 48 pages, notes 52. The main text ends at the foot of p10's right column and References start on p11. The checker is clean. numdiff: 0 numbers found nowhere; the only dropped token kind is "16" (from "its BF16 output"); added "8", "32" and "about 1/58" besides the earlier ones.

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:

    • Khattak and Mikaitis's model was published from warp-level mma (HMMA) measurements.
    • The two stock head kernels inspected (at M = 1 and 32) issue the warpgroup wgmma instruction.
    • 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. App A adds that Triton's wgmma behaves the same, that inputs off the ties rule out rounding to nearest, and that the BF16 epilogue rounds to nearest even.
    • This is a measurement on one GH200 with the recorded toolchain, not a vendor contract. App A names what was not probed: full-significand products, subnormals, offsets beyond 128 terms, other GPUs or libraries.

    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-wgmma entry 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:

    • Related Work "What is and is not new": this is outside §1-2 and was moved in for the page budget. It keeps the five prior-art items word for word and points to §1.1 for the contributions, instead of listing them a second time.
    • Limitations: the observed-error sentence is shortened to "the engine's BF16-output kernel hides its accumulator, so the error measured on its FP32-output variant (Section 2.2) is indirect evidence"; the 1/58 stays in §2.2.
    • Theorem 2.3's proof moves to App A.2, next to Lemma 2.2's, with the accumulator step written out. The theorem's title points there.
    • Three smaller trims in §2.2 and §2.3.
  • 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 \ev and \pend reappears.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T09:34:25.722341Z a03d730 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread paper/sections/contract.tex Outdated
\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}.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SamMausberg

Copy link
Copy Markdown
Owner Author

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 \ev/\pend stays on its claim. Three things block approval: one dropped condition, one ambiguous technical term, and two merge conditions with #181. The rest are optional.

Checked and correct

  • Fig. 1 denominators: 4.4% and 12.9% are the target and draft head chains of the profiled MTP cycle at B = 1, and 10.3% is the plain step (evidence/profiles/tables.md, "LM-head share per configuration"). "Of a profiled cycle at batch 1" is right. "Only about 11%" is kept.
  • 1/58: stock_invariance.json gives model_hopper 1.1922e-4 and max_rel_to_sum_abs 2.0701e-6, a ratio of 57.6 (see O5).
  • 23-bit qualifier: with u_v = (k+1)2^-F + 2^-23 over D/k nodes, γ_cons = 6.107e-4 covers k = 16 by 6.1x at F = 25, 3.4x at 24 and 1.8x at 23, and fails at 22 (0.91x). k = 8 and k = 32 fail at F = 22 too (0.84x and 0.96x). Hopper's model has F = 25.
  • Khattak and Mikaitis (arXiv 2512.07004v4, §4.1.6, read in the PDF): they measured H100/H200 fp16/bf16 through the WMMA API and mma.sync (N_FMA = 16, 25 fractional bits, truncation). They used wgmma.mma_async only for fp8 (13 fractional bits, N_FMA = 32). "Warp-level mma, not the warpgroup wgmma" is accurate.
  • Lagunaprune: the audit in Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184 quotes the source, "a TEXTUAL replica of the stock gemv_al_bfloat16 ... bit-identical to the stock full GEMV's". That supports the new §1.1 sentence.
  • torchnumeric is in paper/references.bib at this head, so the new citation resolves without Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184.
  • Conditions file: plain decoding is kept (§1 ¶1). "In every variant tested" now sits beside the 0.7% claim, and "not a vendor contract" is kept. The seeded race keeps no-top-k/top-p and keeps "checked, not proved".
  • \Srace appears in no main-text section, so moving its glossary row to the appendix scope is correct.
  • Codex P2 (app_proofs.tex:57-58, "24 bits" and "wgmma") has a scoped reply. Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184 fixes those lines (bb9f886, badf789), and I checked that.

Blocking

  1. contract.tex:37 and head.tex:14. "Truncating adders that keep at least 23 fractional bits per block of addends" drops the block-size range under which Appendix A.3 shows the bound. Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184 (bb9f886) states it as "multi-term adders over blocks of 8 to 32 terms that keep at least 23 fractional bits". As written, the main text claims coverage for any block size. Fix: "per block of 8 to 32 addends" in §2.2 and §3.1. Intro item 2 and Limitations may keep the short form, since they point to the full statement.
  2. contract.tex:67 (Table 1, row 7), carried into head.tex:33. "(seed, sequence index, token)" reads as the index of the sequence, that is, which request. SGLang hashes the token's position in its sequence: multinomial_with_seed(logprobs, seed, positions), murmur_hash32(seed, positions, col_indices), with the docstring "The positions of the tokens in the sequence" (sampler.py:878-902 at bd66ce34). Fix: "(seed, token position in the sequence, token)" in Table 1 and §3.3. This keeps "position" free for the paper's own term. App D's table (app_exactness.tex:135, "(seed, position, token)") can follow later.
  3. Merge conditions with Main text: the served frontier and the exact engine changes (Section 4.5); Tables 1-4 to the appendices #181. Whichever PR merges second carries these:

Optional

  • O1 contract.tex:20. "\Rbf{}, which rounds each real logit once, is not the engine's result either:". "Either" still has no antecedent in §2.2, although the ledger marks it fixed. Suggest: "Nor is \Rbf{}, which rounds each real logit once, the engine's result: ...".
  • O2 contract.tex:35. "where the floor $\eta=2^{-113}$ covers underflow": the definite article comes before the floor has been introduced. Suggest "where an absolute floor ...".
  • O3 contract.tex:37. "Whether either model bounds the stock kernel is an open assumption" mixes a question with an assumption. Limitations' wording reads naturally: "...so that either model bounds the stock kernel is assumed, not checked." The same phrase appears three times in Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184.
  • O4 discussion.tex:8. "Rests on a model of a closed-source kernel's accumulation, and neither model covers ..." gives "neither model" no referent in this paragraph. Suggest "rests on one of two models of ..., neither of which covers". Also "The stock GEMM's FP32-output variant shows a largest observed error of 1/58" reads awkwardly. Suggest "The largest error observed in the stock GEMM's FP32-output variant is 1/58 of ...".
  • O5. 2.0701e-6 is 1/57.6 of the Hopper bound, so "1/58" rounds in the favourable direction. This predates the PR (Limitations, register, notes "58 times inside"). Consider "about 1/58", or "under 1/57" where the paper calls it the more direct test.
  • O6 app_transport.tex:106. After the rename, "The smallest ratio over all pairs is 0.823" should read "The smallest drift ...".
  • O7. Fig. 4's x-axis still reads "Drift ratio ρ" (figures/transport.tex:53), so it disagrees with the text until F1. Please make sure F1 is tracking this.
  • O8. After Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184 merges, the audit rows that quote sentences this PR rewrites go stale: lagunaprune (intro.tex:38), khattak2026 (contract.tex:37), torchnumeric (new citing location contract.tex:37) and daliri2025 (head.tex:33). The checker only checks that each key has a row. Refresh those quotes in this PR or the next one.

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. check_paper_references.py --rev 69c42e8 is clean. numdiff 7cc3135..69c42e8: one token count dropped, a "6" that is the "BF16" of the old §2.2 sentence. It is found elsewhere, 0 tokens are found nowhere, and 23, 25 and 58 were added. I rendered p1, p3, p4 and p10 at 150 dpi and found no clipping or collisions. Table 1 sits at the foot of p4's right column, as the PR says. Commits are by Samuel Mausberg with no trailers, and the host-identity check is clean.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 87da898134

ℹ️ 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".

@SamMausberg

Copy link
Copy Markdown
Owner Author

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.

  • B1: "per block of 8 to 32 addends" now appears in §2.2 (contract.tex:37) and §3.1 (head.tex:14), matching App A.3 in Citations: recheck all 125 references and their citing sentences; audit trail to sources/; two error-model qualifiers in App A #184.
  • B2: "(seed, token position in the sequence, token)" now appears in Table 1 row 7 and in §3.3, matching multinomial_with_seed(..., positions).
  • B3, in the parts that can be done before the rebase:
    • the contract paragraph keeps "the offline replay approximates real arithmetic in FP64";
    • Table 2 now says "fixed-noise verification".
  • Optional items applied:
    • "Rreal can differ from it at near ties (Section 1)" gives "either" its antecedent;
    • "η = 2^-113 is a floor that ...";
    • "unchecked";
    • "an assumed model ...; neither of the two models";
    • "about 1/58" in §2.2 and in Limitations;
    • "smallest drift" in App C, twice.
  • Optional item not applied: "shows a largest observed error of" is unchanged in Limitations, which is fine.

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. check_paper_references.py --rev HEAD is clean. numdiff 69c42e8..87da898: nothing dropped; 8, 32 and 4 added. Codex is clean on 87da898.

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.
@SamMausberg
SamMausberg force-pushed the writing/m1-intro-contract branch from 87da898 to d6ea9f0 Compare October 2, 2026 09:24
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: d6ea9f0317

ℹ️ 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".

@SamMausberg

Copy link
Copy Markdown
Owner Author

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)

  • I compared the seven reviewed commits, git diff 7cc3135 87da898 against git diff ccc30c1 7240d29. They differ only where the rebase forces it:
    • Table 1's rows are no longer in contract.tex;
    • the tab:sources row now lives in app_register.tex;
    • the pointer sentence names "in Appendix~\ref{app:proofs}".
  • 4dc3ca4 carries rows 3 and 7 into the moved Table 1 in app_proofs.tex, word for word. Row 3 points to sec:headcontracts, and row 7 reads "(seed, token position in the sequence, token)".
  • There is one \label{sec:assumptions} (contract.tex:49), and "the offline replay approximates real arithmetic in FP64" is kept.

dca5164, the wgmma measured statement. I checked it against evidence/profiles/README.md:388-442, head_tensor_instructions.json and wgmma_precision.json.

  • §2.2: "The two stock head kernels we inspected (at M=1 and 32) issue the warpgroup wgmma instruction instead, and on crafted inputs all fourteen ... accumulate as the Hopper model assumes: blocks of 16 products, 25 fractional bits, and truncation". This matches: HGMMA only at M=1 and 32 (64 and 48 HGMMA, no HMMA); 14 kernels at M = 1-256; F = 25, blocks of 16, truncation toward zero, sum truncated to FP32.
  • The scope is in Limitations and App A: products with one operand equal to 1, no subnormals, no K offsets beyond the first 128, one GPU (driver 570.195.03, CUDA 13.0), and no vendor contract.
  • The profile-wgmma entries are identical in both registers.

d6ea9f0, page budget

  • Theorem 2.3's proof moves to App A.2 with the step written out: ŷ_a − ŷ_b ≥ z_a − z_b − G_a − G_b > ulp(...) ≥ ulp(max|ŷ|), using |ŷ_i| ≤ |z_i| + G_i. It is correct.
  • "What is and is not new" keeps the five prior-art items word for word and points to §1.1 for the contributions.
  • Limitations keeps the point that the FP32-output variant is indirect evidence, and 1/58 stays in §2.2.

Blocking

  1. app_proofs.tex:81 (the Hopper-model item). "The stock head kernels issue the warpgroup \code{wgmma} instead: the two whose SASS we read ($M=1$ and 32) contain only \code{HGMMA}." The first clause claims that every stock head kernel issues wgmma. The README says the SASS of the other twelve "could not be read statically ... so for those kernels only the behaviour below is measured". Their measured behaviour does not show which instruction they issue, because Khattak and Mikaitis give the same k = 16, F = 25 model for Hopper's HMMA path. Fix: "The two stock head kernels whose SASS could be read ($M=1$ and 32) issue the warpgroup \code{wgmma} instead (only \code{HGMMA}); the other twelve could not be read statically." §2.2, Limitations and the notes caption already state this correctly.

Optional

  • contract.tex, §2.2: "gives an example with D=3 on which the two differ". The earlier "on which the two choose different tokens" said what differs.

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. check_paper_references.py --rev HEAD is clean. numdiff against ccc30c1: no token is found nowhere. On the main text alone, one "6" (a BF16) goes, and the 23-bit, 25-bit, 8-to-32 and 16-product tokens come in. Codex is clean on d6ea9f0 (09:28).

…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".
@SamMausberg

Copy link
Copy Markdown
Owner Author

Reviewer 2's blocker is addressed in a03d730: app_proofs.tex now says "The two stock head kernels whose SASS could be read ($M=1$ and 32) issue the warpgroup \code{wgmma} instead (only \code{HGMMA}); the other twelve could not be read statically." Both register entries now name only the two kernels whose SASS could be read, and they stay identical. The notes caption, §2.2 and Limitations were already scoped that way. The optional point is in too: §2.2 reads "An exact emulation of a sequential FP32 kernel gives an example with D=3 on which the two choose different tokens". Build: 0 warnings, the main text ends on p10, the checker is clean. numdiff: 0 numbers found nowhere.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: a03d730eeb

ℹ️ 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".

@SamMausberg

Copy link
Copy Markdown
Owner Author

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.

  • app_proofs.tex:81 now reads "The two stock head kernels whose SASS could be read ($M=1$ and 32) issue the warpgroup \code{wgmma} instead (only \code{HGMMA}); the other twelve could not be read statically." This matches evidence/profiles/README.md. Both profile-wgmma register entries now say the same, and they remain identical, so the cross-register check passes.
  • §2.2 restores "on which the two choose different tokens".

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. check_paper_references.py --rev HEAD is clean. numdiff against d6ea9f0: no change. numdiff against main ccc30c1: nothing dropped.

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).

@SamMausberg
SamMausberg merged commit 6490520 into main Oct 2, 2026
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