Skip to content

Confirmed serving frontier: nine arms, exactness classes, GSM8K quality - #131

Merged
SamMausberg merged 31 commits into
mainfrom
bench/confirm-results
Oct 1, 2026
Merged

SamMausberg merged 31 commits into
mainfrom
bench/confirm-results

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

This PR adds the confirmed serving frontier for Qwen3.5-4B on one GH200: nine tuned arms measured on the held-out confirmation split, each with an exactness class from greedy-output comparisons, and a GSM8K quality check. x is output tokens/s per user (including TTFT) and y is output tokens/s on the GPU. Every number below comes from evidence/bench/ (README sections confirm/, equality/, quality/).

Frontier

Three declared sessions (confirm-r0, -r1, -r2), each launching every arm afresh with its matched plain baseline in the same hold, plus one supplementary session (confirm-supp). Workload: 1,152 confirmation prompts, 512 output tokens with ignore_eos, greedy, thinking on, c = 1-128 against one server per arm launched at capacity 128.

c Best arm (class), points with n >= 3 sessions y, tok/s x, tok/s/user n vs matched plain, same session
1 dflash-tuned-b16 (exact-up-to-rounding) 874 987 3 3.06x y, 3.45x x (Triton plain)
4 dflash-tuned-b16 (exact-up-to-rounding) 2,433 713 3 2.29x
8 dflash-tuned (stock) 3,651 519 3 1.82x
16 dflash-tuned (stock) 5,256 370 3 1.44x
32 dflash-tuned (stock) 6,844 238 3 1.10x
48 plain-tuned (stock) 8,286 173 4 best speculative arm 0.98x
128 plain-tuned (stock) 13,898 109 4 best speculative arm 0.86x
  • Speculation leads plain decoding through c=32 in both families and trails it from c=48. Acceptance is flat across concurrency (3.24-3.28 for MTP, 4.66-4.81 for DFlash block 8), so the loss is not a drop in acceptance.
  • Across the three sessions, y varies by a median of 0.35% (coefficient of variation) and at most 1.9%; x by at most 1.95%. Every paired ratio is within 0.025 of its three-session mean.
  • Only points with three valid sessions rank or lie on the envelope (--envelope-min-n 3). Buffered plain decoding (plain-tuned-replayssm, one session) is level with plain at c=64 (+0.2%) and above it at c=96 and c=128 (1.05x and 1.08x, 15,012 tok/s at c=128). It became eligible only after the reclassification below, so it is listed as best_below_min_n and drawn hollow. Two more sessions (confirm-supp2, confirm-supp3) are scheduled as the next bench holds; it is not a result until they land.

Exactness

Every arm is stock or exact-up-to-rounding: every first greedy divergence against its matched stock reference is a tie, one_ulp or near event (320 prompts x 256 tokens, the coordinator's rule in bench/README.md). The exact envelope therefore equals the envelope over all arms.

Two changes since the classes were first set:

  • Buffered plain decoding is reclassified from lossy to exact-up-to-rounding. The plain reference used at first was the state workstream's plain c=1 run, which has the radix cache on. With the radix cache on, a request's logprobs can depend on earlier requests (evidence/state_safety, "History dependence"), and the arms all run with it off. Against stock plain c=1 without the radix cache, buffered decoding diverges at 3.40 per 1,000 tokens, the floor's rate (3.42), with no event above one_ulp. Its one large event against the radix-on run sits where that run itself resolves a near-tie (logit gap 0.0625) the other way. The radix-on comparisons stay in the report, labelled.
  • No measurable divergence excess for speculation. Against the radix-on run, stock MTP s3 and DFlash block 16 diverged at 1.29x and 1.28x the batch-shape floor, with intervals above 1. Against the radix-off reference both are 1.15x (intervals 0.93-1.43 and 0.93-1.42). This check no longer detects an excess, though it cannot exclude one of up to about 40%.

Quality

GSM8K test (1,319 problems, thinking on, T 0.6 / top-p 0.95 / top-k 20, seed 0, 16K limit): plain 89.99% and 90.30% (two launches), mtp-tuned 89.54%, mtp-stockverify 88.93%, dflash-tuned 89.69%, plain-tuned-replayssm 91.05%. No arm differs detectably from either plain run (exact McNemar, p >= 0.18). With about 150 discordant problems per pair, this rules out losses of roughly 2.5 points or more, not smaller ones. Greedy equality is the check for smaller changes.

Host load and invalid points

Each point records the CPU used outside the run's own process tree (foreign_cpu_mean and _max in points.csv); a mean above 2 cores invalidates the point. Of 186 points, 4 are invalid, all plain-tuned in confirm-supp (c=2, 8, 16, 32; 2.1-3.8 foreign cores during an unlocked Triton build and other agents' test runs). They stay in points.csv with their reason and out of all means and pairs. As a result, mtp-stockverify, mtp-tuned at c <= 16 and plain-tuned-replayssm at c=32 lack a paired baseline in that session. A rerun session (confirm-supp2) covers those points; it is the next bench hold (priority 1, after one FIFO exclusive). The valid points saw a median of 0.55 and at most 1.81 foreign cores.

Negative and unexplained results

  • Stock GDN verify (mtp-stockverify, one session) falls to 0.68x plain at c=128. Buffered verify (mtp-tuned) recovers part of that (0.86x) but does not reach plain above c=32.
  • DFlash block 16 is the best arm at c <= 4 but 0.81x its baseline at c=32. Block 4 never leads at any concurrency.
  • Both FlashInfer DFlash arms dip relative to plain at c=96 (0.69x and 0.72x) and recover at c=128 (0.76x and 0.83x). Their median ITL is about the same at batch 96 and 128. The verify graph has a batch-96 entry, so padding is not the cause. Not explained.
  • Triton attention changes plain decoding by at most 1.3%; it matters only for the speculative arms at low concurrency.

Code changes

  • bench/arms.toml: plain-tuned-replayssm and plain-tuned-triton notes cite the radix-off reference; the replayssm class is exact-up-to-rounding.
  • bench/campaigns/equality_tuned.sh: radix-off plain reference and pairs for every speculative arm; pool sizes per server (pools.csv).
  • bench/campaigns/confirm_supplementary.sh: the supplementary hold and a rerun mode for contended points.
  • bench/campaigns/confirm.sh, confirm_supplementary.sh, sensitivity.sh: exit 1 when any sweep fails, after running the remaining arms.
  • bench/pareto.py:
    • --envelope-min-n: points with valid runs in fewer distinct sessions stay in frontier.csv but do not rank, are not Pareto-optimal and are not on the envelope; envelope.csv names the best of them where it beats the envelope;
    • foreign_cpu_mean per point;
    • plot colours by family (three validated palette slots), with line style and marker by variant; nine arms had cycled through seven colours.
  • bench/campaigns/confirm_evidence.sh: fails the build if any evidence file names the machine.
  • bench/sweep.py, bench/results.py, bench/server.py: wait for a departing GPU process instead of refusing; check sent prompts by text hash; record a random host id rather than the hostname.
  • bench/campaigns/*.sh: show why a campaign's sweep failed.
  • bench/README.md: the layout table lists every module and campaigns/.
  • Removed four campaign scripts that produced nothing committed: tuning_knobs.sh, dflash_tuning.sh, dflash_probes_frontend.sh, natural_lengths.sh.

Main is merged in, so the host-identity hook from #111 ran on every commit since. Nothing was installed.

Validation

  • pytest tests/test_bench_harness.py: 37 passed at 7bd1e93. After 0d73d99 I ran only the touched tests (-k 'series or point_row or invalid', 3 passed). The full file run under nice -n 19 on one busy core failed only test_host_load_attributes_short_lived_own_children_to_the_run, which needs its children to get 0.35 cores and passed un-niced.
  • pre-commit on every changed file, including mypy over the tree.
  • Evidence rebuilt by bench/campaigns/confirm_evidence.sh (CPU only) from the run directories.
  • The equality comparisons were recomputed from the existing runs. Every earlier pair reproduced exactly, and bench.divergence reproduces classes.json byte for byte.
  • The hostname scan ran over evidence/bench: clean.

Review

  • Codex (P1): the campaign scripts printed a failed sweep's status and exited 0. Fixed in 98d168b: they still run the remaining arms, then list the failed ones and exit 1.
  • Reviewer (blocking): the envelope put the single-session plain-tuned-replayssm points on the frontier at c=64-128. Fixed in bc86d42 (--envelope-min-n) and 82e75d7 (rebuilt with N=3; plain-tuned is best at c=48-128; replayssm hollow and listed separately; c=64 called level).
  • Reviewer (nits): foreign-load median 0.55, x CV maximum 1.95%, DFlash block 8 accept length minimum 4.66. Corrected in the README and here.
  • Codex (P2): a length mismatch after an identical prefix had no divergence class, so it could pass as exact. Fixed in 3cbe606: it now makes the arm lossy, and classes.json records it per matched pair. No committed pair has one, so no class changed (6f25dff).
  • Codex (P2): an empty eligible envelope crashed write_csv. Fixed in 3cbe606: envelope.csv and pairs.csv have fixed field lists and are written header-only when empty.
  • Codex (P1): a partial run could be classified from the subset of prompts both runs held. Fixed in 9e74006: the equality campaign treats a run without exactly the prompt set as missing, checks both runs of every pair, and bench.divergence refuses a pair that compared any other number of prompts (--expect-prompts). Every committed run holds all 320 prompts; the rerun reproduces evidence/bench/equality byte for byte.
  • Codex (P2): the envelope threshold counted rows, not sessions. Fixed in 9e74006: it counts distinct sessions (n_sessions in frontier.csv). It equals n at every committed point, so nothing else changed (99065e5).

Not in this PR

Coordinator request after repair's #89: dflash-tuned-b16-gdnverify-triton
(pending; a different GDN kernel) runs at c=1, 8 and 32 in a second
supplementary hold with dflash-tuned-b16 and its matched plain-tuned-triton
baseline, and joins the equality check. The supplementary hold is split in
two (a: the FlashInfer arms with plain-tuned; b: the Triton DFlash arms
with plain-tuned-triton) to stay within one exclusive hold each.

The DFlash block-16 equality runs use capacity 4: at the runner's 0.25
memory fraction, 16 requests' verify states left no KV memory and the
first attempt failed at launch.
Coordinator's class rule (set after the first equality results): an arm
is exact-up-to-rounding when every first divergence against its matched
stock reference is a tie, one_ulp or near, and lossy otherwise; rates and
ratios to the floor are reported beside the class, not used as a test.
Plain levers are matched to plain c1, speculative levers to stock
speculation with the same drafter and steps. equality_tuned.sh adds stock
DFlash block 16 (FlashInfer) as the DFlash reference, the matched pairs
for buffered Triton MTP and both Triton DFlash arms, and writes
classes.json through bench.divergence --arms.
The class formerly called exact-up-to-floor is exact-up-to-rounding: every
first divergence against the arm's matched stock reference is a tie,
one_ulp or near event (#37's classes), over 320 prompts x 256 tokens.
bench/README.md records the rule with its time (2026-10-01 05:20 UTC) and
that it was set after the first equality results; rates and ratios to the
floor are reported beside each class, never as a test, and stock MTP's
1.29x-floor rate at rounding level is stated as a finding.

Applied: mtp-tuned and mtp-tuned-triton (against stock MTP s3) and
plain-tuned-triton (against plain c1) are exact-up-to-rounding;
plain-tuned-replayssm is lossy (one large first divergence) and joins the
quality holds; the Triton DFlash arms stay pending until their comparison
against stock DFlash block 16. Exact arms carry exactness_note instead of a
lossy note, so a lossy note added in code always makes an arm lossy. The
Pareto builder takes --divergence classes.json and annotates each arm with
its rate against plain c1.
Against stock DFlash block 16 (FlashInfer, radix off), every first
divergence of dflash-tuned-b16 is rounding-level (3.82 per 1,000 tokens),
so it is exact-up-to-rounding. --linear-attn-verify-backend triton changes
nothing at this pin: the verify kernel already defaults to Triton when
decode uses Triton (every server log reports verify=triton), and the arm
with the flag produced the same tokens on all 320 prompts. The arm and the
supplementary hold that would have timed it are removed; the equality
pairs stay as the record. Stock DFlash block 16 diverges from plain at
4.39 per 1,000 (1.28x the floor), like stock MTP, all rounding-level.
evidence/bench/equality/ holds the comparator's summary, the per-pair
report with rates, intervals and #37 classes, every first divergence,
the arm-to-reference map and classes.json; the README section tabulates
them. Corrected in bench/README.md: stock DFlash block 16 diverges at 4.38
per 1,000 (not 4.39) and stock MTP's ratio interval is 1.04-1.58.
Per repair's #89: with FlashInfer GDN decode (the DFlash card's setting)
verify follows decode onto FlashInfer, and the Triton verify kernel is
2.06-2.34x faster at widths 64-256; the tuned arms decode with Triton and
already verify with it.
Repeat 2 part b and the supplementary hold ended without a single run at
07:35: every sweep refused to start, and its usage error was lowercase, so
the campaign's filter ("Error") hid it. The campaigns now keep each
sweep's output, match "error" in either case, and print the exit status
and last lines of a sweep that fails.
At 07:35 every sweep of repeat 2 part b and the supplementary hold refused
to start within seconds of acquiring the lock, while the GPU was empty when
the next hold launched moments later: the previous holder's server was
still leaving the GPU. bench.sweep now polls for up to --busy-gpu-wait
(300 s) before refusing.
Reported by moonshot: the prompt index kept one id per text, so a
workload with repeated texts, or with ids shared with the warmup pool,
failed prompts_as_expected even when exactly the declared texts were
sent. The check now compares the multiset of sent prompt hashes with the
measured prompts' hashes, per-prompt output lengths are matched by text
hash (a workload may not give one text two lengths), and the workload's
id wins over the warmup pool's in the request labels. Every confirmation
and tuning point (unique texts, disjoint ids) passed the old check.
Per the state workstream: with the radix cache on, a request's logprobs
can depend on earlier requests (KV provenance through the cache), and the
plain c1 reference ran with it on while every arm runs with it off. Plain
levers (Triton attention, buffered decode) are now classified against
stock plain c1 with the radix cache off; their rates against the original
plain c1 stay in the report. Each server's capacity, KV and GDN pool sizes,
radix setting and kernel backends go to pools.csv.
Six runs (two plain-tuned launches, mtp-tuned, mtp-stockverify,
dflash-tuned, plain-tuned-replayssm) with per-problem results, and paired
comparisons against both plain runs. No arm differs detectably; the check
rules out losses of more than about 2.5 points, including for the lossy
buffered-decode arm. bench/campaigns/quality_compare.py regenerates the
comparisons.
launch.json no longer records the hostname, which encodes the machine's
public address. It carries host_id, a random 8-hex-digit id generated once
and stored outside the repository (~/vp-data/host_id), so run records can
still tell machines apart. Nothing is derived from the hostname: a hash of
it could be reversed by enumerating addresses.
The rate shown beside each arm's class was against the state workstream's
plain c1 run, which has the radix cache on while every arm runs with it off.
Stock MTP s3 and stock DFlash block 16, and the buffered and Triton arms,
are now also compared with stock plain c1 without the radix cache, and that
pair is the rate reported beside the class. The radix-on pairs stay in the
report as the first classification.
The plain levers were classified against the state workstream's plain c1
run, which has the radix cache on; the arms run without it. Against stock
plain c1 without the radix cache, buffered decoding (plain-tuned-replayssm)
diverges at the floor's rate (3.40 against 3.42 per 1,000) with no event
above one_ulp, so it is exact-up-to-rounding. Its one large event against
the radix-on run sits where that run itself resolved a near-tie the other
way. The radix-on comparisons stay in the report and the README, labelled
as the first classification.

Against the radix-off reference, stock MTP s3 and stock DFlash block 16
diverge at 1.15 times the floor (intervals 0.93-1.43 and 0.93-1.42), not
1.29 and 1.28 with intervals above 1 as against the radix-on run, so the
READMEs no longer state an excess for speculation.
…ed output

The layout table now covers divergence, frontend, hostload, lengths,
natural_workload, sensitivity_arms, token_map and campaigns/, and the
sensitivity section cites natural_lengths_confirm.sh. Four campaign scripts
produced nothing that is committed: tuning_knobs.sh and dflash_tuning.sh
were superseded by tuning_knobs_dflash.sh and tuning_backend_dflash.sh
before they ran, dflash_probes_frontend.sh was stopped and replaced by
frontend_diagnostic.sh, and natural_lengths.sh (mixed-v2) never ran; the
committed tune-split length run used mixed-v1 and the command in
evidence/bench/README.md.
confirm_supplementary.sh rerun <session> arm:levels ... reruns named arm and
concurrency points, so that points invalidated by foreign CPU load can be
measured again together with their matched baseline in one session.
The validity rule flags a point whose mean foreign load exceeds two cores,
but points.csv carried only the one-second maximum, so the flag could not be
checked from the evidence. foreign_cpu_mean now sits beside it.
Nine arms cycled through seven colours, so two pairs of arms shared a
colour. Hue now encodes the family (plain, MTP, DFlash; three validated
palette slots) and line style plus marker the variant within it; an arm
outside the exact classes is drawn faded, with its class in the legend.
Rebuilds evidence/bench/confirm from the three declared sessions and the
supplementary hold (confirm-supp, 14:17-14:50): stock MTP verify at every
concurrency, buffered MTP below c=32 and buffered plain decoding from c=32.
Four plain-tuned points in confirm-supp are invalid for host contention
and stay labelled in points.csv. The README's confirm/ section gives the
design, the frontier, variance over sessions, the session-paired ratios and
the negative results.
@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:26:17.977963Z 99065e5 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: 75f0f86aaf

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

echo "sweep for $arm exited $status:"
tail -3 "$log"
fi
rm -f "$log"

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 Return a nonzero status when a sweep fails

When bench.sweep exits nonzero because of a launch failure, timeout, or failed check, the status is only printed; the helper's final rm succeeds, so the function and ultimately the campaign report exit 0. The same pattern appears in confirm_supplementary.sh and sensitivity.sh, allowing orchestration to treat an incomplete experiment as successful. Preserve and return or aggregate the captured failure status after cleanup.

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 98d168b. confirm.sh, confirm_supplementary.sh and sensitivity.sh still run the remaining arms after a failed sweep, then list the failed ones and exit 1.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (one blocking item; Codex is still running on 75f0f86)

Review of the exact head 75f0f86. I recomputed the frontier from the committed points.csv, pairs.csv, equality/ and quality/ files. The numbers hold. One committed artifact contradicts what the PR says it claims.

Verified from the committed files

  • Points and host load. 186 points, 4 invalid (plain-tuned in confirm-supp at c = 2, 8, 16, 32: 3.84, 2.36, 2.11, 2.55 foreign cores). The valid points' foreign load has a median of 0.55 and a maximum of 1.81.

  • Envelope by mean y at n >= 3:

    c Best arm y x n
    1 dflash-tuned-b16 874 987 3
    4 dflash-tuned-b16 2,433 713 3
    8 dflash-tuned 3,651 519 3
    16 dflash-tuned 5,256 370 3
    32 dflash-tuned 6,844 238 3
    48 plain-tuned 8,286 173 4
    128 plain-tuned 13,898 — 4

    dflash-tuned-b16 over Triton plain at c = 1 is 3.061x in y and 3.451x in x, and dflash-tuned is 2.89x in x.

  • Variance. Over the 52 three-session points, the CV of y has a median of 0.35% and a maximum of 1.90% (mtp-tuned c = 48, dflash-tuned-b16 c = 16). Every paired ratio is within 0.023 of its session mean.

  • Paired ratios. mtp-tuned gives 0.976 at c = 48 and 0.863 at c = 128. The negative results check: mtp-stockverify 0.68 at c = 128, b16 0.81 at c = 32, the DFlash dip 0.69 / 0.72 at c = 96 and 0.76 / 0.83 at c = 128. Triton plain is at most 1.28% above plain.

  • Accept length is flat: MTP 3.24-3.28, DFlash block 8 4.66-4.81.

  • The reclassification is a genuine fix, not a relaxation. The arms all run with the radix cache off, so a radix-on reference violates the KV-provenance rule. The run's own divergences.csv shows the decisive event at cnn_dailymail-0033 position 25: radix-on plain against radix-off plain is near, with the radix-on run choosing 18816 by 0.0625. Buffered decoding picks 23059 like the radix-off run, with a 0.56 margin, and first differs from radix-off plain at position 53, a tie. In classes.json, every arm's matched pair is rounding-level.

  • The speculation-excess withdrawal checks: 1.15x (0.93-1.43 and 0.93-1.42) against the radix-off reference.

  • GSM8K accuracies match comparisons.json. The smallest McNemar p is 0.184, with 140-170 discordant problems per pair.

  • Code and hygiene.

    • bench/server.py now records a random host_id kept outside the repository instead of socket.gethostname().
    • confirm_evidence.sh computes the hostname at run time to scan the evidence.
    • The hostname check is clean over the tree, git log -p origin/main..HEAD and the PR text.
    • The four removed campaign scripts are referenced nowhere (exact-name grep over the tree and every unmerged branch), and every campaign script cited in the READMEs exists.
  • Checks. tests/test_bench_harness.py passes on one core, 38 passed, un-niced and with no exclusive hold running. Pre-commit passes on every changed file. All commits are by Samuel Mausberg, with no AI lines.

Blocking

  1. The committed frontier claims the single-session lead the PR says it does not claim.
    • The PR body says this PR "does not claim the lead until they land", and the README says "Until they land, the declared n=3 frontier at c >= 64 is plain-tuned".
    • But envelope.csv, envelope-exact.dat and envelope-all.dat all put plain-tuned-replayssm (n = 1) on the frontier at c = 64, 96 and 128 (9,917, 12,773, 15,012 tok/s). pareto.png is drawn from them, and the README's frontier table also lists it as "Best arm" there.
    • These are the files a paper figure would read. Please build the declared envelope from arms with n >= 3 at each point, so c >= 64 is plain-tuned, and keep the single-session points as a separately labelled series or file. Regenerate the plot to match.
    • Also, "leads at c >= 64 ... by 0.2%" claims a lead at c = 64 from one session at 0.2%, which is below the session CV range. Describe c = 64 as level, and keep 96 and 128 as single-session leads.

Suggestions (non-blocking)

  • Small rounding differences in the README:
    • the valid points' foreign-load median is 0.552, not 0.56;
    • x's largest CV is 1.95%, which rounds to 2.0% rather than "at most 1.9%";
    • DFlash block 8's lowest accept length is 4.66, not 4.67.
  • GSM8K class field. The replayssm GSM8K quality.json still records exactness: lossy, which the README explains. Since quality/ is an evidence file, a one-line note in comparisons.json or the README index row saying the class field predates the reclassification would stop a reader of the JSON alone being misled.

confirm.sh, confirm_supplementary.sh and sensitivity.sh printed a failed
sweep's status and went on, then exited 0, so a driver could not tell an
incomplete hold from a complete one. They still run the remaining arms but
now list the failed ones and exit 1 (Codex review on #131).
bench.pareto --envelope-min-n N keeps points with fewer than N valid
repeats out of the Pareto flags, the per-concurrency ranking and both
envelopes. They stay in frontier.csv, envelope.csv names the best of them
where it beats the envelope, and the plot draws them hollow. The
confirmation build uses N=3, so a single supplementary session can no
longer put an arm on the frontier (review of #131).
Rebuilds evidence/bench/confirm with --envelope-min-n 3: plain-tuned is the
best arm at c=48-128, and buffered plain decoding (one session) is listed as
best_below_min_n and drawn hollow rather than ranked. The README calls it
level at c=64 and not a result until its two scheduled sessions land, and
corrects three summary numbers (foreign-load median 0.55, x CV maximum
1.95%, DFlash block 8 accept length 4.66-4.81). bench/README.md gains two
open items: the exactness check ignores --sglang-worktree, and the DFlash
dip at c=96.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on 82e75d7: Codex's last review is of 75f0f86. I've requested a review of this head and will confirm or withdraw once it finishes.)

Re-review of 98d168b, bc86d42 and 82e75d7 on top of 75f0f86.

  • My blocking item is fixed.
    • bench.pareto --envelope-min-n 3 keeps points with fewer sessions out of the ranking, the Pareto flags and both envelopes. envelope.csv, envelope-exact.dat and envelope-all.dat now have plain-tuned at c = 48-128 (8,286 / 9,901 / 12,180 / 13,898).
    • plain-tuned-replayssm appears only as best_below_min_n (n = 1), and points.csv is unchanged.
    • The README frontier table matches, and calls c = 64 "level (+0.2%)" and the single-session lead "not a result" until confirm-supp2/3.
    • In pareto.png the envelope follows plain-tuned at high c, and the single-session points are hollow.
  • Nits fixed. The foreign-load median is 0.55, x's CV maximum 1.95%, and DFlash block 8's accept length 4.66-4.81.
  • Codex P1 r4156947170 is fixed in 98d168b and answered. confirm.sh, confirm_supplementary.sh and sensitivity.sh collect failed sweeps and exit 1 after running the remaining arms. The scripts use set -uo pipefail without -e, so the status capture works.
  • Checks. tests/test_bench_harness.py passes, 39 passed (one core, no exclusive hold). Pre-commit passes on the changed files. The hostname check is clean over git log -p 75f0f86..HEAD.

Everything else from my review of 75f0f86 stands.

@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: 82e75d7de3

ℹ️ 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 bench/divergence.py Outdated
Comment on lines +108 to +111
rounding = all(
count == 0 for name, count in reference['classes'].items()
if name not in ROUNDING_CLASSES
) # fmt: skip

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 Treat length mismatches as non-rounding divergences

When a matched run stops after an otherwise identical prefix, compare.py records a positive length_mismatch but no divergence class. This predicate therefore sees all large/not_argmax counts as zero and classifies the arm as exact-up-to-rounding, even though the comparator explicitly treats this case as a finish bug. Include reference['length_mismatch'] == 0 in the classification condition so a truncated or extended output cannot be published as exact.

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 3cbe606. classify() now requires length_mismatch == 0 as well as no large/not_argmax event, the report's rounding_level_only does the same, and classes.json records each matched pair's length mismatches. Every committed pair has zero (report.json, 21 pairs), so no class changed (6f25dff regenerates classes.json; the rule text in bench/README.md now states the condition).

Comment thread bench/pareto.py Outdated
write_envelope_dat(pareto_envelope(frontier, exact_only=False), args.out / 'envelope-all.dat')
write_envelope_dat(pareto_envelope(frontier, exact_only=True), args.out / 'envelope-exact.dat')
min_n = args.envelope_min_n
write_csv(envelope(frontier, min_n), args.out / 'envelope.csv')

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 Handle an empty eligible envelope

When --envelope-min-n is greater than every point's valid-repeat count—for example while rebuilding evidence before the third session—envelope() returns an empty list, but write_csv() immediately reads rows[0] and raises IndexError. This prevents the documented behavior of retaining under-repeated points in frontier.csv; emit a header-only envelope or otherwise handle the no-eligible-point case.

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 3cbe606. envelope.csv and pairs.csv are written with fixed field lists (ENVELOPE_FIELDS, PAIR_FIELDS), so an empty eligible set gives a header-only envelope.csv and frontier.csv keeps the under-repeated points; write_csv now fails with a clear message only if it gets neither rows nor fields. Tested in test_envelope_ranks_only_points_with_enough_repeats.

bench.divergence classified an arm exact-up-to-rounding from its event
classes alone, but compare.py gives no class to a prompt whose outputs
differ only in length after an identical prefix; such a mismatch now makes
the arm lossy and is reported with the matched pair. bench.pareto wrote
envelope.csv and pairs.csv from the first row's keys and failed on an
empty list (e.g. --envelope-min-n above every point's repeats); both now
have fixed field lists and are written header-only when empty (Codex
review on #131).
bench/README.md adds the condition to the exact and lossy classes. The
regenerated classes.json records each matched pair's length mismatches
(zero for every pair); no class changes. evidence/bench/confirm rebuilt with
the current pareto.py is unchanged.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

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

Re-review of 3cbe606 and 6f25dff, the two Codex P2s on 82e75d7:

  • Length mismatches now block exact-up-to-rounding in bench.divergence and in report.json's rounding_level_only. This tightens the rule, it does not relax it. All 21 committed pairs in report.json have length_mismatch 0, so no class changes. classes.json gains only the matched.length_mismatch field, and bench/README.md states the condition.
  • Empty envelope. envelope.csv and pairs.csv are written with fixed field lists, header-only when nothing is eligible. No file under evidence/bench/confirm/ changed.
  • Checks. tests/test_bench_harness.py passes, 39 passed on one core, and pre-commit passes on the changed files.

Everything else stands from my reviews of 75f0f86 and 82e75d7.

@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: 6f25dffa4f

ℹ️ 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 bench/divergence.py
Comment on lines +115 to +118
rounding = all(
count == 0 for name, count in reference['classes'].items()
if name not in ROUNDING_CLASSES
) and int(reference.get('length_mismatch', 0)) == 0 # fmt: skip

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 Reject incomplete comparisons before classifying exactness

When a matched c1.jsonl contains only a nonempty subset of the 320 prompts, run_missing accepts it because it checks only -s, and compare.py silently compares the intersection of prompt IDs. This predicate then classifies the arm as exact-up-to-rounding whenever that subset has no non-rounding event, even if omitted prompts would contain one. Require the matched pair's prompts count and prompt set to equal the declared reference set before emitting an exact class.

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 9e74006. The equality campaign now treats a c1.jsonl without exactly the prompt set's ids (count, uniqueness and set) as missing, checks both runs of every pair against the prompt file after comparing, and passes --expect-prompts to bench.divergence, which refuses to classify from any pair that compared a different number of prompts. Every committed run holds all 320 prompt ids and every pair compared 320; rerunning the campaign with these checks reproduces evidence/bench/equality byte for byte.

Comment thread bench/pareto.py Outdated
entry['failed_total'] = sum(int(m.get('failed') or 0) for m in members)
frontier.append(entry)
means = [(entry['x_e2e_mean'], entry['y_mean']) for entry in frontier]
eligible = [entry for entry in frontier if entry['n'] >= max(min_n, 1)]

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 Count distinct sessions for the envelope threshold

When multiple valid runs of the same label and concurrency carry the same session name—for example rerunning a supplementary session—the new --envelope-min-n 3 threshold counts all rows and can qualify three launches from one session. This contradicts the campaign's stated requirement of three valid sessions and can promote insufficiently replicated points onto the published envelope; reject duplicate session entries or compute eligibility from distinct session names.

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 9e74006. Eligibility now counts distinct sessions among a point's valid runs (n_sessions, written to frontier.csv; a run without a session counts as its own), so reruns that share a session name count once. In the committed build n_sessions equals n at all 72 points, so the envelope is unchanged (99065e5).

compare.py compares the prompts both runs hold, and the equality campaign
accepted any nonempty c1.jsonl, so a partial run could be classified from a
subset. The campaign now treats a run without exactly the prompt set's ids
as missing, checks both runs of every pair after comparing, and passes
--expect-prompts to bench.divergence, which refuses to classify from a pair
that compared any other number of prompts.

bench.pareto --envelope-min-n counted valid rows, so reruns sharing a
session name could qualify; it now counts distinct sessions (n_sessions in
frontier.csv; a run without a session is its own). Codex review on #131.
Rebuilding evidence/bench/confirm with 9e74006 adds n_sessions to
frontier.csv; it equals n at all 72 points, and every other file and value
is unchanged. The equality campaign rerun with the completeness checks
reproduces evidence/bench/equality byte for byte: every run holds all 320
prompts and every pair compared 320.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

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

Re-review of 9e74006 and 99065e5, Codex's P1 and P2 on 6f25dff:

  • Partial comparisons (P1). equality_tuned.sh treats a c1.jsonl without exactly the prompt set's ids as missing and checks both runs of every pair after compare.py. bench.divergence --expect-prompts refuses to classify from a pair that compared any other number of prompts. Every committed pair in report.json compared 320 prompts, so no class changes.
  • Distinct sessions (P2). --envelope-min-n now counts distinct sessions. The rebuilt frontier.csv only adds n_sessions, which equals n at all 72 points. No value in an existing column changed, and the envelope files are unchanged.
  • Checks. tests/test_bench_harness.py passes, 41 passed on one core, and pre-commit passes on the changed files.

@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

classes = {name: int(entry.get('classes', {}).get(name, 0)) for name in CLASSES}

P2 Badge Reject unclassified divergence events

When the comparator emits an unknown class because a first divergent token lacks usable top-k logprobs, this normalization silently drops that count. classify() then sees zero large/not_argmax events and can publish the arm as exact-up-to-rounding, even though the stated rule requires every divergence to have a rounding-level class. Preserve unknown classes or verify that the classified events account for every divergence before assigning exactness.

ℹ️ 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
SamMausberg merged commit c0d1d31 into main Oct 1, 2026
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (confirmed on 99065e5)

Codex finished its review of 99065e5 with no new inline comments, and the head is unchanged, so my approval stands. The confirm-supp2/3 results will come as later commits; each new head needs a re-check, mainly of whether plain-tuned-replayssm reaches n >= 3 and enters the envelope.

SamMausberg added a commit that referenced this pull request Oct 1, 2026
…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 added a commit that referenced this pull request Oct 1, 2026
Appendix E: exactness classes of the confirmed arms, speculation at the floor, GSM8K (#131)
SamMausberg added a commit that referenced this pull request Oct 1, 2026
#131 merged, so ceiling.json now reads evidence/bench/confirm/frontier.csv on main (its
DFlash rows at c<=8 are identical to the ones used before; only the file's other
columns changed); expected.json follows. The README and levers.csv no longer cite #131
as a pull request.
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