Skip to content

Appendix E: exactness classes of the confirmed arms, speculation at the floor, GSM8K (#131) - #141

Merged
SamMausberg merged 4 commits into
mainfrom
paper/appendix-serving
Oct 1, 2026
Merged

SamMausberg merged 4 commits into
mainfrom
paper/appendix-serving

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #140. The base is paper/appendix-draftreq, so the diff shows only this PR's two commits. After #140 merges I'll retarget it to main. The author's planned frontier PR (paper/frontier, after #137) uses the same bench-frontier entry and the two App E markers; whichever merges second drops its copies.

This PR folds #131 (evidence/bench/, the equality/, quality/ and confirm/ sections) into Appendix E and the register. The frontier itself goes to the main text through the author's frontier PR; here it is cited only where App E had \pend{bench-frontier} or \pend{bench-mtp}.

What App E now says

  • Lever classes (E.6). A lever that changes the target's arithmetic is classed by its greedy outputs against a matched stock reference:
    • exact up to rounding if every first divergence is at an exact tie, within one BF16 step, or a near tie within two steps;
    • lossy otherwise.
      These are the classes of the stock engine's own batch-shape divergences. Replayed plain decoding is exact up to rounding by this comparison but is not bit-exact: it persists BF16-cast state, and its outputs differ from the packed decode's in 30-35% of words on synthetic activations. So P4 remains the bit-exact alternative.
  • Levers table.
    • Replayed verification, Triton target attention and replayed decoding leave "pending" and become exact up to rounding.
    • Replayed verification gets its confirmation-split numbers (0.86x plain at c = 128, against 0.68x with snapshot verification, one session) and "no detectable GSM8K loss".
    • Replayed decoding's single confirmation session is labelled as one session, with more sessions pending.
    • The caption's footnote says the TF32 mechanism suggested lossy but the outputs are rounding-level.
    • The exact stack now admits the exact-up-to-rounding levers.
  • New paragraph, "Output equality" (E.8).
    • Setup: the 320 divergence prompts, 256 greedy tokens, c = 1, prefix cache off, and the matched references. The DFlash runs are at capacity 4.

    • The class rule was fixed after the first comparisons were seen, and it rests on the earlier State safety: differential harness and tensor-level divergence mechanisms #37 classes.

    • Rates against the 3.42/1k floor:

      Arm Rate per 1,000 Ratio to floor
      buffered MTP 3.79 1.11
      Triton MTP 4.05 1.19
      Triton DFlash block 16 3.82 1.12
      Triton plain 3.89 1.14
      replayed plain 3.40 0.99

      Every interval includes 1, and the ratios inform the class rather than decide it.

    • Reclassification of replayed plain: the large event against the prefix-cache-on plain run sits where that run's own token rests on a gap of 0.0625, which the run without the prefix cache resolves the other way. The two stock plain references differ on 96 of 320 prompts (1.69/1k), all rounding-level.

    • Speculation: against the run without the prefix cache, stock MTP s3 and DFlash b16 sit at 1.15x the floor (intervals 0.93-1.43 and 0.93-1.42), down from 1.29x/1.28x against the prefix-cache-on run. The check no longer detects an excess, but cannot exclude one of up to about 40%. Limits: the floor is a prefix-cache-on pair, the pools are unpinned, and DFlash ran at capacity 4 against 16.

  • Quality check. GSM8K for six runs: plain at 89.99 and 90.30%, MTP buffered at 89.54, MTP with snapshot verification at 88.93, DFlash b8 at 89.69 and replayed plain at 91.05 (run while it was classed lossy).
    • Paired differences run from -1.36 to +1.06 points, with McNemar p ≥ 0.18. A non-significant test excludes nothing by itself. The paired 95% Wald intervals on the discordant problems (derived from comparisons.json) have lower bounds from -0.70 to -3.27 points, so the data exclude only losses larger than about 3.3 points (Codex P1 and the reviewer, fixed in 8f23b9d).
    • Sampled runs are not reproducible under the fixed seed: 77% of final answers agree, and 17-19% of outputs hit the 16K limit.
  • Speculation and state (E.4). On the confirmation split every speculative family leads through c = 32 and trails from c = 48, with flat acceptance. This answers bench-mtp.
  • Frontiers paragraph. The class definitions match bench/arms.toml. All nine arms are stock or exact up to rounding, so the exact envelope equals the envelope over all arms. The frontier is cited as \ev{bench-frontier}. Replayed plain decoding does not rank with one session.

Register

  • New entries: bench-frontier (the text the author's frontier PR uses), bench-equality and bench-quality.
  • bench-equality, bench-quality, bench-frontier and bench-mtp leave the pending list.
  • New pending entry bench-replayssm: two more confirmation sessions.

Checks

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-01T15:57:24.758947Z 4f28c83 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.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional: Codex is still running on b8a0aa3, and the branch must be rebased onto a main that contains #131 before it merges; I will re-check then)

Review of the exact head b8a0aa3: 36740a6 (App E and the register) plus the PDF, stacked on #140 at d0bb0f0.

  • Every number matches Confirmed serving frontier: nine arms, exactness classes, GSM8K quality #131's committed evidence, which I verified on Confirmed serving frontier: nine arms, exactness classes, GSM8K quality #131:

    • matched-reference rates and ratios of 3.79/1.11, 4.05/1.19, 3.82/1.12, 3.89/1.14 and 3.40/0.99, every interval including 1;
    • stock MTP and DFlash at 1.15x the floor (0.93-1.43, 0.93-1.42), against 1.29 and 1.28 with the prefix-cache-on reference;
    • the two plain references differing on 96 of 320 prompts at 1.69 per 1,000;
    • the reclassification event: a 0.0625 gap in the radix-on run, then a tie further on;
    • GSM8K: 89.99 / 90.30 / 89.54 / 88.93 / 89.69 / 91.05%, differences from −1.36 to +1.06 points, p ≥ 0.18, about 150 discordant problems, and 77% of final answers shared between the two plain runs;
    • "17 to 19%" at the token limit: 219-250 of 1,319, or 16.6-19.0%;
    • acceptance flat at 3.24-3.28 and 4.66-4.81, and 0.86 and 0.68 of plain at c = 128.

    "30 to 35% of words" is the existing Appendix E figure (465,102 and 543,225 of 1,572,864).

  • Disclosures and scope.

    • The class rule is disclosed as fixed after the first comparisons were seen.
    • The three limits are stated: a radix-on floor, unpinned pools, and DFlash at capacity 4.
    • Replayed plain decoding's single session is kept off the ranking, under \pend{bench-replayssm}.
    • The exact-stack definition and tab:axes follow the new classes.
  • Rebuild in place. latexmk -g on one core finished with 0 warnings, wrote 81 pages, and its text is identical to the committed PDF. References start on p11.

  • Register. Every path of bench-frontier, bench-equality and bench-quality exists on main, so check_paper_references.py (which checks main) is clean. The hostname check is clean.

Merge condition. This branch's ancestry does not contain #131: evidence/bench/quality/ and equality/ are not in it. Its register entries cite files that exist on main but not in the branch. When #140 merges and this PR is retargeted, rebase it onto main so the cited evidence is in its history (Codex raised the same point on #132).

@SamMausberg
SamMausberg changed the base branch from paper/appendix-draftreq to main October 1, 2026 15:40
…t the floor, and GSM8K (#131)

From evidence/bench/ (#131), sections equality/, quality/ and confirm/:
- Lever classes: exact up to rounding (every first divergence against a
  matched stock reference at a tie, one BF16 step or a near tie) and lossy;
  the class rule was fixed after the first comparisons were seen. Every
  confirmed arm is stock or exact up to rounding; replayed verification,
  Triton target attention and replayed plain decoding move out of pending
  in the levers table, and the exact stack admits them.
- Output equality (new paragraph): rates and ratios to the 3.42/1k floor
  per arm; replayed plain decoding reclassified from lossy once the
  reference is stock plain without the prefix cache (3.40/1k, 0.99x);
  stock MTP and DFlash at 1.15x the floor against that reference
  (intervals 0.93-1.43 and 0.93-1.42), down from 1.29x/1.28x against the
  prefix-cache-on run: no detectable excess, not excluding up to ~40%;
  limits (prefix-cache-on floor, unpinned pools, DFlash capacity 4).
- Quality: GSM8K for six runs, no detectable difference (differences
  -1.36 to +1.06 points, McNemar p >= 0.18; rules out ~2.5-point losses
  only); sampled runs are not reproducible under a fixed seed.
- Speculation and state: speculation leads through c = 32 and trails from
  c = 48 with flat acceptance; buffered MTP 0.86x and stock verify 0.68x
  plain at c = 128 (bench-mtp answered).
- Register: bench-frontier (as in #137), bench-equality, bench-quality;
  bench-equality, bench-quality, bench-frontier and bench-mtp leave the
  pending list; new pending bench-replayssm (two more sessions).
@SamMausberg
SamMausberg force-pushed the paper/appendix-serving branch from b8a0aa3 to a246ec7 Compare October 1, 2026 15:40
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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: a246ec72a0

ℹ️ 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/app_stack.tex Outdated
\paragraph{Frontiers}\label{sec:serving-frontiers} The baseline frontier is the upper envelope over arms A, B and C, since no arm need be best at every concurrency: speculation saves weight traffic, which matters most at low concurrency, and adds per-request state traffic, which matters most at high concurrency (Appendix~\ref{app:spec-state}). Every arm carries an exactness class in \path{bench/arms.toml}: \emph{stock} when it sets only flags known to leave the target's arithmetic as in plain decoding with FlashInfer target attention and stock state handling, \emph{exact up to the floor} when its greedy outputs, classified against plain decoding, stay at the batch-shape noise floor of Appendix~\ref{app:divergence}, \emph{pending} until then, and \emph{lossy} otherwise. The envelope is drawn twice, over all arms and over the stock and exact-up-to-the-floor arms. The frontier plot ($y$ against $x$ for each arm, the mean of the three sessions with their range), the frontier table ($x$, $y$, time to first token and accepted length per arm and concurrency, with within-session speedups over arm A and over the tuned speculative arm) and the run-to-run variance across sessions are \pend{bench-frontier}. So are the before-and-after frontiers for the certified head in MTP drafting, verification and plain decoding, with output-equality checks at the same batch shape, which decide H4 \pend{bench-cert}, and the exact and lossy stacks \pend{moonshot-frontiers}.
Stock speculation against the same plain reference diverges at 1.15 times the floor's rate both for MTP with three steps (3.95 per 1,000; the ratio's 95\% interval is 0.93 to 1.43) and for DFlash at block 16 (3.92; 0.93 to 1.42). Against the prefix-cache-on run the ratios were 1.29 and 1.28, with intervals above 1, so that apparent excess came at least partly from the reference's prefix cache. The check therefore no longer detects an excess of speculation over the batch-shape floor, but it cannot exclude one of up to about 40\%. Three limits apply: the floor is a prefix-cache-on pair on one server, and a floor without the prefix cache was not run; the servers' pools were sized from free memory, not pinned; and the DFlash runs used a capacity of 4 against plain decoding's 16.

\paragraph{Quality check}\label{sec:serving-quality} Output length and throughput say nothing about whether a change preserved the model. The quality check is the full GSM8K test split (1,319 problems) scored with the GSM8K grader of the \code{sgl-eval} package, version 0.1.2 (a zero-shot prompt, the last boxed answer, symbolic equality) with thinking on, natural stopping at 16,384 tokens, and Qwen's recommended thinking-mode sampling for precise tasks (temperature 0.6, top-$p$ 0.95, top-$k$ 20) under a fixed request seed. Two runs are compared problem by problem: the accuracy difference, an exact McNemar test on the discordant problems, and the share of identical final answers. Sampled accuracy tests equality in distribution for a lossless change and prices a lossy one; it cannot show that greedy outputs are unchanged, which the output comparisons of Appendix~\ref{app:divergence} address. No arm differs detectably from plain decoding~\ev{bench-quality}. Two launches of plain decoding score 89.99\% and 90.30\%, buffered MTP 89.54\%, MTP with snapshot verification 88.93\%, DFlash at block 8 89.69\% and replayed plain decoding 91.05\% (run while it was still classed lossy). Every paired difference against either plain run lies between $-1.36$ and $+1.06$ points, with exact McNemar $p\ge0.18$. With about 150 discordant problems per pair, the test rules out losses of roughly 2.5 points or more, not smaller ones. Two sampled runs of one arm agree on the final answer for only 77\% of problems, so the fixed request seed does not make these runs reproducible, and 17 to 19\% of outputs in every arm reach the 16,384-token limit.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not claim the test rules out 2.5-point losses

A nonsignificant McNemar result plus an 80%-power threshold does not exclude losses above that threshold. For example, the snapshot-verification comparison against plain-tuned-b has 91 reference-only successes versus 73 arm-only successes; its observed difference is -1.36 points, but a paired confidence interval extends below -3 points, so a 2.5-point loss remains compatible with these data. Please describe 2.5 points as the test's approximate detection sensitivity or report an actual confidence bound rather than saying such losses are ruled out.

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.

Fixed in 8f23b9d (head 4f28c83). The sentence now reads: "A non-significant test excludes nothing by itself. The paired 95% intervals (Wald intervals on the discordant problems, derived from the committed counts) have lower bounds between -0.7 and -3.3 points, the lowest for MTP with snapshot verification against the second plain run (-1.36 points, interval -3.27 to +0.54), so the data exclude losses larger than about 3.3 points for every arm and cannot exclude smaller ones." The intervals are computed from correct_only_a and correct_only_b for all nine pairs in evidence/bench/quality/comparisons.json.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (a246ec7, 1 blocking)

The rebase checks out. a246ec7 sits on the current main (c6c121c), and its source commit c1373a3 has the same diff as 36740a6 at b8a0aa3, which I approved provisionally.

Blocking: Codex P1 r4157402485 (app_stack.tex:303) is right. The sentence "the test rules out losses of roughly 2.5 points or more" turns the power statement in evidence/bench/README.md (a difference below about 2.5 points would not reach p < 0.05 with 80% probability) into an exclusion, which a non-significant test does not give.

I computed the paired 95% intervals (Wald, on the discordant problems) for the nine comparisons in evidence/bench/quality/comparisons.json:

  • the lower bounds run from -0.70 to -3.27 points;
  • the lowest is plain-tuned-b against mtp-stockverify (91 against 73 discordant, -1.36 points, interval -3.27 to +0.54).

A sentence the data support: "The paired 95% intervals reach down to -3.3 points, so losses of up to about 3 points are not excluded; with about 150 discordant problems per pair, a 2.5-point loss would reach p < 0.05 with about 80% probability." Please also reply on the Codex thread.

On the fix head I will check the new sentence against these numbers, rebuild the PDF with latexmk -g and compare it with pdftotext, check that the References still start after page 10, and check Codex.

…paired intervals)

Codex P1 and the reviewer on #141: a non-significant McNemar test excludes
nothing by itself. The paired 95% Wald intervals on the discordant problems
of the nine comparisons in comparisons.json (derived) have lower bounds
from -0.70 to -3.27 points, the lowest for MTP with snapshot verification
against the second plain run (91 vs 73 discordant, -1.36, interval -3.27
to +0.54), so the data exclude losses larger than about 3.3 points for
every arm and cannot exclude smaller ones.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on 4f28c83: Codex is still running on this head. I will confirm or withdraw once it finishes.)

Re-review of 8f23b9d and 4f28c83.

  • The blocking item is resolved. The sentence no longer treats a non-significant test as an exclusion, and its figures match the nine paired intervals I computed from comparisons.json:
    • lower bounds from -0.70 to -3.27 points;
    • the lowest for mtp-stockverify against plain-tuned-b (-1.36 points, interval -3.27 to +0.54).
  • Rebuild. A latexmk -g rebuild at 4f28c83 gives text identical to the committed PDF (pdftotext -layout diff empty). The PDF has 81 pages, with References starting on page 11, and check_paper_references.py is clean.
  • The delta changes app_stack.tex (one sentence) and paper.pdf only, on top of c6c121c. Host identity: 0 hits. Attribution: clean. Pre-commit passes.

Suggestion (not blocking): "cannot exclude smaller ones" is true only of the widest interval. For replayed plain decoding, for example, losses above 1.1 points lie outside both of its intervals. "and, for the widest interval, nothing smaller" would be exact.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 4f28c832e9

ℹ️ 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 (4f28c83, confirmed: Codex found no issues on this head, comment 5935232929)

My provisional approval of 4f28c83 now stands. The branch is up to date with main (c6c121c), and merging is clean.

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