Skip to content

Served certified-head benchmark (H4): small-batch gains, envelope losses; identical to stock at c = 1 and in check mode, and for MTP under identical batches; the MTP c = 64 divergence sits at a position where stock's BF16 decode path errs against FP32 - #190

Merged
SamMausberg merged 62 commits into
mainfrom
benchcert/served
Oct 2, 2026

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

This is the served before-and-after test of H4: does the certified LM head improve the served latency-throughput frontier of the tuned arms without changing their outputs? Each family's tuned arm runs against the same arm with SGLANG_CERTIFIED_HEAD_* set, on SGLang with engine/sglang/patches/kernel/0001-0010. The plan was pre-registered in experiments/benchcert/README.md (pushed, reviewed by main and a red team, pinned before the first timed run). Results and commands are in evidence/certified_head/served/README.md.

Result on the served envelope (measured)

For each concurrency, the table takes the confirmation frontier's best arm and gives its paired throughput ratio with the certified head: the geometric mean of three sessions, with a 95% interval.

c Envelope arm y, certified / stock
1 dflash-tuned-b16 1.012 (1.007-1.018)
2 dflash-tuned-b16 0.990 (0.984-0.996)
4 dflash-tuned-b16 0.970 (0.958-0.983)
8 dflash-tuned 0.975 (0.967-0.984)
16 dflash-tuned 0.988 (0.962-1.015), head gated off
32 dflash-tuned 0.994 (0.945-1.046), head gated off
64 plain-tuned 0.999 (0.994-1.005)
128 plain-tuned 0.994 (0.993-0.996), head gated off

The envelope rises only at c = 1. It falls at c = 2, 4, 8 and 128.

Declared verdicts

The verdicts come from one primary point per family, with Holm's adjustment across the four (summary.json, regenerated after the check rerun):

Family Primary y ratio 95% interval Bonferroni-4 interval Decision Predicted
plain c = 1 1.0251 1.0219-1.0283 1.0185-1.0317 gain 1.035
MTP c = 1 1.0456 1.0447-1.0464 1.0438-1.0473 gain 1.086
DFlash block 16 c = 1 1.0125 1.0074-1.0177 1.0019-1.0232 gain 1.045
DFlash block 8 c = 4 0.9880 0.9774-0.9986 0.9664-1.0100 loss 1.024

H4 is supported under the declared rule. Context for that verdict:

  • Plain's and MTP's gains are real, and their exactness is established at c = 1 and in check mode (for MTP also under identical batch evolution), but neither arm leads the envelope at c ≤ 32. The one large class, at MTP c = 64, sits at a position where stock's BF16 decode path errs against FP32 and stock MTP runs err too (Exactness); under the declared rule a large class is reported and investigated, not by itself a failure, so the verdicts stand as computed.
  • Block 8's loss passes only at Holm's last step (its Bonferroni interval includes 1), and its exactness rests on check mode alone.
  • The gains are confined to small batches. DFlash loses at every tested point where its certified batches reach 28-64 rows (block 16 at c = 2 and 4, block 8 at c = 4 and 8, by 1.0-3.0%). MTP gains through c = 8 (+1.7% with 32-row verify batches), shows no detectable change at c = 16 and 32, and loses 3.3% at c = 64 (64-row draft batches).
  • Where every certified path is gated off, the captured certified graph still costs 0.6-1.2%.
  • The measured gains are 28-71% of the predicted saving. The check launches show why this is plausible: at c = 1-4, 42-82% of block-16 verify calls and 37-76% of its draft-projection calls needed a fallback; at c = 16-64, 61-63% of MTP verify calls, 32-76% of MTP draft calls and 25-58% of draft-extend calls did (check.csv, step check2). The predictions assumed plain decoding's rates. This mechanism is a hypothesis: no per-fallback timing or profile was taken.

Exactness

MTP identity with stock is claimed at c = 1, in check mode and under identical batch evolution (the seeded control at batch 1, 8, 12 and 16, and the wave controls). Closed-loop outputs at c ≥ 8 can differ through batch evolution, as stock runs differ from each other across timings. The certified head's contract is identity with the stock engine's output for the same batch, and the stock engine is not FP32-exact at the one position below.

The certified verify defers to the stock head for any batch holding a request that asks for logprobs, penalties, a grammar or token mask, logit bias, a custom logit processor or logprob capture (_adjusts_logits). The benchmark workload has none of these (greedy, ignore_eos, no logprobs), and every check launch counted certified verify calls at every point, so the timed and check results are unaffected. In a deployment such batches get the stock verify, which bounds both the exactness scope and the speedup.

The MTP c = 64 event: stock's BF16 decode path errs against FP32 at one position, and no observation requires a certified-head error. Session 1's certified run committed token 1756 at prompt 579ae7ce, output position 439, in text the model wrote after its own end-of-text token. Stock runs there committed 68189, 8078 or 5715.

  • Stock's BF16 decode path errs there (pre-set reading). At the position FP32 puts 68189 on top (-0.87) and 1756 at -9.79; its two paths (one forward, recurrent decode) agree within 0.0001 nats and side with the stock BF16 prefills (1756 at -8.1 to -8.9), while stock batch-1 plain decoding from position 400 puts 1756 on top (-0.32), 8.9 nats below FP32's top token. By the serial-references hold's pre-set reading that is a stock-engine numerics fault in the decode path, independent of the certified head (the reading named the GDN decode path; the layer was not located). At the plain c = 128 event (a4db11ff, position 333) the reading's other branch applies: the BF16 prefill and scorer references err, by about 13-15 nats, and stock decoding commits FP32's top token. The reading reserved "ill-conditioned even in FP32" for FP32's paths disagreeing by more than 0.1 nats, which did not happen. As an interpretation, both are positions ill-conditioned in BF16: every path, BF16 and FP32, agrees within 0.05 nats on each of the 39 preceding positions, and they part at the position alone. The measure throughout is FP32's top logprob minus FP32's logprob of the token a path puts on top.
  • Stock errs there too. Against FP32, closed-loop c = 64 draws that reached the position committed a token 2 or more nats below the top (post hoc: measure and grouping chosen after seeing the data) in 4 of 19 stock MTP draws (all 5715, 4.7 below) and in 8 of 34 uninstrumented draws of engines carrying the certified graphs (1756 four times, 5715 four times). Per-arm counts of 68189 / 8078 / 5715 / 1756: stock 12 / 3 / 4 / 0; certified graphs, uninstrumented, 21 / 5 / 4 / 4; instrumented 23 / 1 / 2 / 0; h8's planted and reordered draws 10 / 6 / 1 / 0. Only 1756 is confined to the certified-graph arms: 4 of 34 against 0 of 19, one-sided Fisher p about 0.16, a grouping chosen after seeing the data.
  • No observation requires a certified-head error. cert0 (MAX_ROWS=0, the head never decides) committed 1756. The head matched the stock argmax on every check-mode row (592,433) and every stress-test row (967,680; batch-1 inputs in head-only graphs), and was consistent with its own bounds on every ring-logged row. And stock batch-1 decode itself puts 1756 on top. The gate at the session-1 and h6a events is unknown, but with the gate on the head returns the stock head's argmax for the hidden state it receives (its contract; 0 differing rows in check mode and in the stress test).
  • Under identical batch evolution the arms are identical. With 579ae7ce seeded through position 399 (state at 439 = prefill to 400 plus 39 decoded tokens), stock, cert0 and the certified engine agree on every token of 109 requests at batch 1, 8, 12 and 16, with logprobs at 439 identical to the bit. Those requests asked for logprobs, which keep the verify on the stock head by design. A token-only rerun, with the counters read around every wave, shows the certified verify deciding all 3,708 verify steps of the waves (137,584 rows, at most 64 per step) with every token equal to stock's. Stock MTP's verify there commits 68189, FP32's top, so plain decode's 1756 is a property of the plain decode path. 1756's logprob depends on the batch size alone (-8.02 at batch 1, -5.51 at 8 and 12, -6.16 at 16). The closed-loop 439 verifies ran at 14-19 requests, so this covers part of that range.
  • Untested: whether session_000527's content feeds the event. The planted-donor hold (h8) saw no 1756 and no planted token in any draw, and its unplanted cert0 control did not fire (0 of 12; about 0.22 by chance at the uninstrumented rate). The planting removed 1756 from 527's function-name slot only; 527 still emits it in first_type.
  • Earlier wording corrected. "3.8 nats below the top" and "a three-way near tie" came from references scored with 16 requests in flight (Codex's P1 below). Serially the prefill reference puts 1756 6.8 nats below and 5715 2.2 below, and FP32 8.9 and 4.7. The cache did not feed the decode reference: the arm runs radix-off and every reference prefill shows zero cached tokens.

Evidence, one item per hold:

  • Check launches (untimed, tuned flags at capacity, CHECK=1; rerun as step check2 in the settling hold with every counter written): every certified call counted (uncounted_calls 0 at every point and path) and 0 of 592,433 certified rows differ. h1's first run (594,329 counted rows, also 0 differing) wrote its counters every 25 glue calls and stays in check.csv labelled partial.
  • Concurrency 1, timed: token ids identical between the arms in all three sessions for plain, MTP and block 16 (32 of 32 prompts each).
  • Wave controls and the settling hold's waves of 64 (exploratory): with the batch evolution fixed, certified equals stock on 64 of 64 prompts for MTP at 8 requests and for block 16 at c = 8 (gated off, and with MAX_ROWS=0), and on 512 of 512 prompts in MTP waves of 64.
  • Drain reruns (h6a, h6b; reading rule set before them): session 1's c = 64 point rerun closed loop, 12 points per arm. The rule reads the reruns only and treats session 1 as the discovery. Under the serial reference, which replaced the concurrent scorer, h6a has 3 of 12 certified points with a gross event at 579ae7ce/439 (1756 once, 5715 twice) and 1 of 12 stock points (5715), and check mode 0 of 8. By the rule's own words, a gross event in stock too means the event is not specific to the certified engine. The concurrent first reading (1 of 12 against 0 of 12, a reproduction) is superseded. Post hoc, pooling session 1 with the concurrent counts gave 2 of 15 against 0 of 15 (one-sided Fisher p = 0.24).
  • Teacher-forced scores (h6s): every committed token of the campaign (214 points, 24.2 million tokens, no unscored request; drain_scores.csv, drain_score_report.json, drain_gross_events.csv). Every near and gross context was re-scored one request at a time (drain_serial_rescore.json): the 8 gross and 22 near flagged concurrently keep their classes, and contexts below 0.5 nats concurrently were not re-scored, except 579ae7ce/439 in every point. There, serially, 5715 is 2.19 nats below the top, so h6a's stock2 repeat 2 (and cert1 repeats 3 and 5) are gross too: "no gross event in any stock MTP point" holds only under the concurrent reference. By FP32's measure the two MTP gross events (579ae7ce/439) are BF16 errors and the six plain c = 128 ones (a4db11ff/333) are scorer errors: the served token is FP32's top. A BF16 teacher-forced reference, even at batch 1, can be wrong by 13 nats or more at such positions. All eight gross events follow the request's first <|endoftext|> (about 1.2% of positions).
  • Ring-logged reruns (h7): certring 24, stock 12 and cert0 12 points (drain_ring_439.csv, drain_ring_report.json). At the 439 verify, located in all 20 certring draws that reached it, the server batch held 14-19 requests. In the 9 with the gate on (batch 14-16) the head chose 68189 with status 0 and 1756 was never a candidate; in the 11 with it off (batch 17-19) the stock head chose 68189 (8), 5715 (2) or 8078 (1). Over all four certring launches (911,240 certified rows, 17,518 column-fallback, 286 dense-merge, 729,006 accepted) every id was consistent with its own bounds and the verify committed the head's id on every accepted row: self-consistency, not correctness against stock. cert0 committed 1756 in 2 of 12 points.
  • Stress test and pool probe (shared lane; stress_summary.json, stress_pool_probe.json): 0 differing rows and 0 envelope breaches over 967,680 certified rows, under graph replay of the drain's real batch sizes and gates. This clears the head's decision path for batch-1 inputs in head-only graphs. Limits: the graphs hold the head alone; the gate-off branch is simplified; no mismatch in 967,680 rows bounds a generic per-row fault at about 3.1e-6; and 579ae7ce's rows are batch-1 hidden states from one prefill. The probe refutes allocator aliasing. The scheduler's write-after-read overlap is ranked low on a reading of the code, not tested.
  • Reference paths and FP32 (reference_paths.json): the table and traces above, read on rescore.py's stock server one request at a time with a cache flush before each, and in FP32 on the CPU (transformers' Qwen3.5, eager attention, torch GDN kernels; one forward and recurrent decode agree within 0.0001 nats at 579ae7ce/439 and 0.0024 at a4db11ff/333).
  • Planted donor (h8) (drain_donor_h8.json): planted 13 of 18 draws reached 439 (68189 7, 8078 6), unplanted cert0 12 of 12 (68189 10, 5715, 8078), reordered 4 of 6 (68189 3, 5715); no 1756 and no 9471 anywhere. Inconclusive by the pre-set rule.
  • Small-batch context waves (stopped, descriptive; context_waves_stopped_*.json): in batches of 8-16, 579ae7ce leaves session 1's text at output position 154 in 45 of 48 stock waves (55 of 60 in an earlier run), so the design almost never reaches 439. They were stopped in their first block; no cert0 or certified wave ran.
  • Seeded MTP control (control_seeded_mtp.json, control_seeded_stats.json): above.
  • Divergence above c = 1: cert vs stock against stock vs stock: plain 1.21 (0.92-1.59), MTP 1.11 (1.0002-1.22), block 8 1.03 (0.91-1.16). MTP's excess fits the certified engine's different step times changing the batch evolution: under identical batch evolution the arms are identical (seeded control).
  • Classes (declared re-score, classes.csv): rerun one context at a time as pre-registered (amendment in experiments/benchcert/README.md). Of 1,113 unique contexts, 540 tie, 553 one ulp, 19 near and 1 large (the concurrent run: 530, 550, 32 and 1). Only the large context moved by more than 0.5 nats (3.6 to 6.8). The verdicts are unchanged.

Memory

The certified graphs' buffers are allocated at graph capture, after SGLang sizes its pools. They add 3.8 GB (plain), 25.7 GB (MTP), 6.4 GB (block 16) and 10.0 GB (block 8). The DFlash pairs needed an explicit 60,000-token KV pin on both arms: without it, the stack workstream's certified block-16 server ran out of memory at start-up. Graphs of 65-256 rows carry certified nodes that MAX_ROWS=64 never runs. A derived estimate says capturing the head only up to MAX_ROWS would save most of this memory; that is a proposal, not implemented.

Changes

  • bench/sweep.py: two opt-in flags, --return-token-ids (prompt and output token ids in the final sglext chunk; no logits) and --snapshot-file (copy a file before and after each point). Default behaviour is unchanged.
  • experiments/benchcert/:
    • plan.py, the declared plan;
    • run_session.py and hold.sh, the holds; they refuse a dirty tree, a wrong engine tree, or any head but the README's recorded hold commit;
    • analyze.py, the predictions, validity, Holm decisions, token comparisons, check counters, capture memory and post hoc diagnostics;
    • figures.py;
    • rescore.py, control_waves.py and hold_shared.sh (re-score and wave controls), hold_settle.sh (settling hold), drain.py, hold_drain.sh and hold_drain_score.sh (drain reruns h6-h9 and their scoring), and replay_hook/ (per-replay log for check-mode runs; benchcert_ring.py, the device ring of the certring launches);
    • score_report.py and ring_report.py, the readouts of the scores and the ring;
    • fallback_stress.py and hold_stress.sh, the stress test, the pool probe and the planted-donor hold's reference step;
    • context_waves.py and hold_context_waves.sh, the small-batch waves at 579ae7ce's context (stopped);
    • paths.py and hold_paths.sh, the reference paths, FP32 and the serial re-scores; hold_seeded_waves.sh and hold_seeded_stats.sh, the seeded control and its counter rerun (in control_waves.py);
    • the pre-registration README, with the reading rule of every exploratory hold set before it ran.
  • evidence/certified_head/served/: points (long form), pairs, ratios, summary, equality and classes, check counters, launch and capture-memory records, figures and figure data, the wave controls and the predictions; for the wrong token, 579ae7ce's position 439 in every MTP c = 64 point, the h6s scores and gross events and their serial re-score, the ring readings, where the events sit, the stress test's summary and pool probe, the reference paths and FP32, the planted-donor draws, the stopped waves and the seeded control.
  • tests/test_benchcert.py, test_benchcert_score_report.py, test_benchcert_ring_report.py, test_benchcert_fallback_stress.py and test_benchcert_paths.py: 67 CPU tests, covering the plan's matching, Holm, exactness status (including the fail-closed cases and complete check counters), token comparison, a synthetic end-to-end report, the re-score response parsing, the controls, the drain reruns' launches and scoring, the score and ring readouts (with a ring locator fixture), the stress test's CPU parts, the planted token's selection rule, the reference-path and serial re-score readouts, and the seeded control's plan and comparisons.

Validation

  • Tests and hooks: at 8453414, the 67 benchcert CPU tests pass (tests/test_benchcert*.py) and pre-commit passes on the changed files. Commits made while a timed hold was running skipped the hooks and were checked in the following window.
  • Regeneration: analyze.py report at 708c723, which contains the check-completeness fix, reproduced every committed analysis output byte for byte apart from analysis_commit. The outputs were then regenerated at 0ece39a with --classes pointing at the serial re-score; only the class counts and analysis_commit changed, and the verdicts and exactness status are unchanged.
  • Validity: 132 of 132 timed points are valid. Foreign CPU means were 0.13-0.67 cores, with no KV retraction. Pools and captured graph sizes are equal within every pair. The post hoc slow-launch diagnostic flags no launch.
  • Red team: it reproduced every primary ratio, interval and p value from the raw sweep manifests.
  • GPU time: 104.6 minutes exclusive over four timed holds, 8.9 minutes of untimed shared holds and 17.1 minutes for the untimed settling hold; 41.5 minutes for the timed drain reruns (h6a, h6b), 1.1 minutes for the first scoring attempt and 12.3 for the scoring (h6s); 64.8 minutes for the ring-logged reruns (h7a, h7b); 8.4 minutes shared for the stress test (plus about 1 minute in two attempts stopped by a parser bug and a test fixture before any GPU work), 4 minutes for a first context-wave run stopped to add the cert0 arm; 50.3 minutes for the planted donor (h8, timed); 4.7 minutes for the second context-wave run, stopped; 2.9 minutes shared for the serial references; 8.1 minutes for the seeded control and 2.8 and 4.6 minutes for its counter and token-only reruns (untimed).

Not done

  • The engine default MAX_ROWS=256 was not timed.
  • No Nsight Systems profile was taken.
  • mtp-tuned (the FlashInfer MTP arm for c ≥ 48) was not tested.
  • plain-tuned-replayssm, which may lead the envelope at c = 96-128, was not tested.
  • Why closed-loop certified-graph runs landed on 1756 rather than 5715 at that position is not established (4 of 34 against 0 of 19, post hoc, not significant), and contamination by session_000527 is untested. No further closed-loop reruns are planned for it.
  • An upstream-relevant observation, not pursued here: stock BF16 decode and prefill miss FP32's top token by about 9 and 13-15 nats at one position each of two post-end-of-text texts.

Declares the before-and-after test of the certified LM head on the served
engine (kernel patches 0001-0010): four families (plain-tuned, mtp-tuned-triton,
dflash-tuned-b16, dflash-tuned), each pair stock against the same arm with
SGLANG_CERTIFIED_HEAD_* (column fallback, conservative model, MAX_ROWS=64),
three sessions in four exclusive holds, DFlash pairs pinned at 60,000 KV tokens,
the decision rule, exactness tests (check mode, c=1 identity, divergence rates
against the stock floor, re-scored classes) and the derived predictions.

bench.sweep gains two opt-in flags: --return-token-ids (prompt and output token
ids in the sglext chunk) and --snapshot-file (copy a file before and after each
point). Hooks run in the next CPU window; committed without them because a timed
hold is running.
…evision)

Red-team review of the pre-registration, before any timed run:
- B1: one primary point per family (plain c=1, MTP c=1, DFlash b16 c=1, b8 c=4)
  decides the family verdicts and H4, Holm-adjusted across the four; every other
  point is descriptive, and the gated-off points are reported as gate overhead.
- B2: tokens are compared whenever the outputs are complete and the launch ran
  its declared configuration, whatever the timing validity; exactness is
  established only on positive evidence (check mode clean, c=1 identity) and
  fails only on a difference; a missing or failed check launch is incomplete.
- Points without a running-batch or foreign-load record are invalid; pairs
  compare captured graph sizes; pairs report accept-length and cycle-rate
  ratios and foreign load per arm; the order diagnostic (s2 against s1, s3).
- README: 22 points, the worst-case KV need, power, the start-up failure rule,
  no changes after h1 starts, truncated timed counters.
…s loudly on a missing token; rescore-only mode
@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-02T15:52:20.931578Z 8453414 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

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

ℹ️ 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 experiments/benchcert/plan.py Outdated
# launches once per 25-90 s of decoding (two to five calls per step or cycle), in
# check launches often enough that a point's snapshot lags it by at most 25 calls.
TIMED_STATS_EVERY = 20000
CHECK_STATS_EVERY = 25

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 Flush check counters before declaring exactness

With CHECK_STATS_EVERY set to 25, the engine writes its cumulative check counters only on every 25th glue call, while bench/sweep.py copies the file immediately after each point and never requests a final flush. Consequently, calls after the last write—especially the tail of each check launch's largest tested shape—are absent from check.csv; a mismatch confined to those calls would still make check_counters() return True and support the headline exactness verdict. Check launches need a forced final dump or per-call writes before their snapshots are treated as complete.

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 09616ca. Check launches now write the certified-head counters on every glue call (CHECK_STATS_EVERY = 1). check_counters() also requires the device counters to cover every certified replay the host gated: uncounted_calls = host certified gates x calls per gate - device calls, which must be 0 at every point, or the family's check verdict is incomplete, not passed. Tests: test_check_counters_need_every_certified_call_counted, test_settling_controls. The check launches of all four families rerun as step check2 in the settling hold (hold_settle.sh, queued). Until it lands, the README scopes the claim to 0 differing rows among the 594,329 counted rows, with up to 24 uncounted calls per point; h1's counts stay in check.csv, labelled partial.

Comment thread experiments/benchcert/analyze.py Outdated
Comment on lines +540 to +543
out[path] = {
key: value - prior.get(key, 0)
for key, value in counters.items()
if isinstance(value, int)

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 Preserve high-water marks when computing snapshot deltas

stats_delta() subtracts every integer field as though it were a cumulative counter, but max_certified_rows is a high-water gauge. When the same maximum appears before and after a point, this reports zero rather than the batch size actually certified; the committed check.csv demonstrates the corruption with 42 of 43 max_certified_rows entries equal to zero. Handle gauges separately instead of subtracting them.

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 09616ca. stats_delta() no longer subtracts max_certified_rows (a gauge). A point's largest certified batch now comes from the difference of the certified-rows histograms, and the host's certified gate count is reported beside the device counters. Test: test_stats_delta_treats_the_high_water_mark_as_a_gauge. check.csv is regenerated with the settling hold's evidence, after its rerun lands; the committed copy predates the fix, so its max_certified_rows column is invalid until then.

Comment on lines +207 to +208
if step == REPLACEMENT_SESSION:
raise ValueError('s4 launches are chosen by analyze.py replacement-plan')

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 Provide an execution path for replacement session s4

When any s1–s3 pair is invalid, the declared protocol requires s4, and analyze replacement only prints the affected families. However, run_session.py accepts only h1–h4 and this function explicitly rejects s4, so there is no supported way to execute the replacement pairs that the analysis already expects. Implement the selected s4 launch plan and expose it through the hold runner; otherwise a recoverable invalid session permanently leaves the experiment incomplete.

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.

Scoped reply, no change in this PR: s4 was not needed. Every s1-s3 pair at every concurrency was valid (132 of 132 points, pairs.csv all counted), so analyze.py replacement selects no family and no s4 launch was due. The gap is real for any future campaign: plan.py has no s4 launch plan and run_session.py accepts only the named holds. If this harness is reused, s4 should become a hold built from replacement_families() (stock and cert pairs of those families, in session 1's order) before any timed run.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Red team at a88f705: the declared verdicts reproduce exactly, and the accepted B1/B2 items are in. One blocking item remains: the account of the single large divergence. The raw outputs show that it came from the certified run, and the README's explanation of it does not hold.

What I checked

  • Recomputed from raw data. I recomputed every ratio from the 24 raw sweep.json files: each primary, interval and p value matches, Holm rejects all four (MTP 1.8e-5, plain 8.6e-4, b16 0.0090, b8 0.0396), and ratios.csv here equals my output.
  • Validity. All 132 points are valid. Every pair has equal pools, equal captured graph sizes, the same clean engine and identical commands apart from SGLANG_CERTIFIED_HEAD_*. Foreign CPU means are <= 0.67 cores.
  • Envelope comes first. The PR body and README lead with the per-concurrency table and its losses (c = 2, 4, 8, 128), the gate overhead (0.6-1.2%), the 32-64-row losses and block 8's check-mode-only exactness.
  • Prediction misses. The measured gains are 28-71% of the predicted saving (plain 2.51 / 3.54, MTP 4.56 / 8.59, b16 1.25 / 4.46 points). The fallback-call rates are given and labelled a hypothesis.
  • Exactness scope. It is limited to c = 1, the check-mode batches and the two wave controls. The block-16 control (control_waves_dflash16.json) shows stock, cert and cert with MAX_ROWS=0 pairwise 64/64 identical. Under the pre-set reading rule that closes the b16 c = 8 divergence as closed-loop timing, and the README states the one-shape caveat.

Blocking: the large event (MTP, c = 64, session 1)

I traced its context (rescore/contexts.jsonl id e483c271980890a8; prompt 579ae7ce, a code task; position 439 after ...(3,4,5)==12\nassert perimeter) through all six MTP c = 64 runs (request_ids on each r0/c064):

Run Same prefix up to 439 Token at 439
s1 certified yes 1756 _type
s1 stock yes 68189 _triangle
s2 certified yes 68189 _triangle
s3 certified yes 68189 _triangle
s3 stock yes 68189 _triangle
s2 stock no (diverged at 154) -

So the odd token comes from the certified run. With the same 514-token prefix, two other certified sessions and two stock runs committed _triangle. That token is 0.19 nats below the batch-1 top (_valid -1.68, _input -1.81, _triangle -1.87). _type sits at -5.50, 3.8 nats below the top. After position 439, s1 certified matches the others on all 72 remaining tokens. The README needs these changes:

  1. Say which arm. "Which run ... is not established" is no longer true.
  2. Retract or scope the mechanism sentence. "Only the draft path runs certified there, which changes the draft blocks and the buffered GDN replay, not the head's decision ... a difference in model state between the runs, not a head decision" does not hold.
    • If the certified draft head is exact, it does not change the draft blocks at all.
    • If it is not exact, a wrong draft is rejected by greedy verification and cannot be committed.
    • So the s1 certified run committed a token that its verify should not have produced. That needs either a target state corrupted by about 3.8 nats at an identical prefix (rounding cannot do that) or a bookkeeping error on the step, for example certified ids routed or attached to the wrong output.
    • c = 64 is an untested shape (verify gated off at 256 rows, draft and draft extend certified at 64 rows), and this is the only large event among 1,113 contexts. The stock floor has none in 729.
    • It should be reported as an unexplained wrong-token event in a certified run, not attributed to the stock head.
  3. Scope the title and the exactness section accordingly. "Exact at the tested shapes" stays true only if the text says that one certified run, at an untested shape, committed a token far from the stock argmax.
  4. Name a check that would settle it. For example, a fixed-batch control at the gated-off-verify / certified-draft shape (MTP, waves of 64 on an exclusive server, stock against certified), or a replay of that s1 prompt with per-step certified-head logging.

Optional

  • The README says "132 of 132 timed points"; that matches the raw data.
  • The wave controls ran on small shared-lane servers (8 running, KV 100K / 30K) rather than the timed pools; the README says so. Keep that sentence next to the "closes the divergence" claim.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES at a88f705

The declared analysis is right, and the envelope-first presentation, the losses, the gate overhead, the prediction misses and the hypothesis labelling are as main asked. Six items block, the first two of substance.

What I recomputed

  • Ratios and decisions. From pairs.csv I recomputed all 22 points: the geometric mean of three paired y ratios, a 95% t interval on the logs with df 2, the two-sided p, and the Bonferroni-4 intervals at the primaries (t = 8.86). All match ratios.csv, apart from last-digit rounding at four plain points, which recomputing from the raw y values confirms.
    • Holm across the four primaries: MTP c1 p = 1.8e-5, plain c1 8.6e-4 and b16 c1 0.0090 are gains; b8 c4 p = 0.0396 passes at the last step (0.05) as a loss.
    • The verdicts improve / improve / improve / loses, and "H4 supported", follow the pre-registration's own definition of "established": check launches with zero differing rows, plus c = 1 identity, with block 8 resting on its check launch.
  • Timeline and pins.
    • Pre-run revisions 3997a67 and aa121d8 (01:47 and 01:49 UTC) predate h1 (02:18:28).
    • All four holds ran from hold commit aa121d8 with one engine commit, tree and certified-head digest.
    • predictions.json is byte-identical to its pre-registration version (bfc4e73).
    • The changes to the pre-registration after h1 alter no declared item. They add the dated key-bug disclosure, a post hoc diagnostic and two exploratory controls, labelled, approved by main and given reading rules in advance.
  • Envelope table. It matches ratios.csv, and its arms are the confirmation frontier's leaders (b16 at c = 1-4, b8 at c = 8-32, plain from c = 48).
  • Check launches. 594,329 rows with 0 mismatches (check.csv). The fallback-call table in the README matches check.csv.
  • Equality.
    • c = 1 certified against stock is 32/32 in all 9 comparisons.
    • The per-family class table matches equality.csv, and 530/550/32/1 matches the 1,113 contexts of ~/vp-data/benchcert/rescore/classes.jsonl.
    • The rate ratios against the stock-only floor are 1.21, 1.11 and 1.03.
    • Both wave controls are 64/64, and block 16 is 64/64 across all three arms.
  • Memory, validity, CPU. Capture memory differences are 3.8 / 25.7 / 6.4 / 10.0 GB (session means 3.76-3.90, 25.3-25.9, 6.32-6.41, 9.81-10.16). 132/132 points are valid with no retraction, and foreign CPU means are 0.13-0.67 cores.

Blocking

  1. The large event came from a certified run (red team's item; I reproduced it). In the MTP c = 64 runs, prompt 579ae7ce (rescore context e483c271980890a8), output position 439 has the same prefix in every run that reaches it:

    • s1 certified committed 1756 (_type, 3.6 nats below the batch-1 top);
    • s1 stock, s2 certified, s3 certified and s3 stock committed 68189;
    • s2 stock had diverged earlier.

    README lines ~214-222 say both arms commit from the stock verify head and call it "a difference in model state, not a head decision" with "which run ... not established", and that does not hold. With the verify gated off, greedy verification commits the stock verify's argmax. An exact certified draft changes no draft, and an inexact one would be rejected. So the certified run committed a token its verify should not produce at that prefix: either a target state off by about 3.6 nats (not rounding) or a bookkeeping or aliasing error at that shape.

    Fix:

    • name the arm;
    • retract the mechanism sentence;
    • report this as an unexplained wrong-token event in a certified run, at the verify-gated-off / certified-draft-and-extend shape;
    • scope "exact at the tested shapes" in the title, the PR body and the README's exactness section;
    • name the check that would settle it (the red team's fixed-batch control at that shape, or a replay of that s1 prompt with per-step certified-head logging).

    The declared rule ("any large class is reported and investigated, not by itself a failure") keeps the verdicts as computed, but this event has to be reported prominently next to them.

  2. Codex P1 4164402443, check counters not flushed. With CHECK_STATS_EVERY=25 the engine writes cumulative counters every 25 glue calls, and the snapshot is copied right after each point with no final flush. So up to 24 calls at the end of each check level are not in check.csv. The 594,329 rows / 0 mismatches are the counted rows, not every certified row, and MTP c = 64, the large event's shape, is a check level. Fix: either add a forced final dump and rerun the check launches (a GPU decision for main), or scope the claim to the counted rows. In the second case, bound the uncounted calls per level (from the engine's call counts or logs) and state that bound in both READMEs. Reply on the thread either way.

  3. evidence/certified_head/served/README.md:37-38 and the PR body: "Wherever the head serves 32-64-row MTP or DFlash batches it loses up to 3.3%" is contradicted by ratios.csv. At MTP c = 8 the verify batches have 32 rows and y is 1.0169 (1.0042-1.0297), a gain; at MTP c = 16 and 32 the intervals include 1. Every DFlash point with 32-64-row batches does lose (0.970-0.990), and MTP loses 3.3% only at c = 64, where the certified calls are 64-row draft batches. Your own paragraph at README:122-129 states this correctly; make the summary match it.

  4. The unique-context class counts are not committed. "Of 1,113 unique contexts, 530 ... 1 large" rests on ~/vp-data/benchcert/rescore/classes.jsonl, outside git. The per-pair counts are committed, but this headline number is not. Add the unique-context counts (and the large context's id and classes) to summary.json or a small committed file when the evidence is refreshed for item 1.

  5. Codex P2 4164402450, gauge subtracted as a counter. stats_delta() subtracts max_certified_rows, so 42 of 43 entries in the committed check.csv read 0. Fix the delta (take the after value for gauges) and regenerate, or drop the column. Reply on the thread.

  6. Codex P2 4164402455 (s4 path). It needs a reply. A scoped one is fine: no pair was invalid, so s4 was never needed.

Optional

  • PR body, fallback summary. "42-83% of block-16 verify and draft calls at c = 1-4, and 59-76% of MTP calls at c = 16-64" does not match check.csv. Block-16 verify is 42-83% and the draft projection 37-75%; MTP verify is 59-67% at c = 16-64, MTP draft 32% at c = 16 and 76% at c = 64, and draft extend 28-59%. Quote the README's table instead.
  • PR body, primary table. The pre-registration says the primary intervals are displayed Bonferroni-adjusted. The README shows both; the body shows only the unadjusted ones. Block 8's Bonferroni interval, 0.966-1.010, includes 1, which is worth showing beside "passes only at Holm's last step".
  • PR body, classes. "530 tie, 550 one ulp, 32 near, 1 large" should say "of 1,113 unique contexts".
  • Stale sentence. experiments/benchcert/README.md: "Until it runs, token identity is claimed only at c = 1 and at the check-mode batches" is out of date now that the block-16 control has run.

…eteness (Codex P1); max_certified_rows as a gauge (Codex P2); settling hold with MTP waves of 64 and a logged replay; README names the certified run behind the wrong token
@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: c3b4234f22

ℹ️ 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 (head c3b4234)

This is the final delta from cf3ffc9 to c3b4234 (abce5bd plus the red-team wording commit). The regeneration is clean, my five items at cf3ffc9 are fixed, and every new number I checked reproduces. Two blocking items remain. Both are about reporting a result in the terms of the reading set before its run, and both are wording fixes that need no new data.

Regeneration (clean worktree at c3b4234, every output to scratch)

  • analyze report --no-plot --classes ~/vp-data/exactness/paths/classes_serial.jsonl. All 11 CSVs are byte-identical, including the regenerated classes.csv and equality.csv. summary.json differs only in analysis_commit (0ece39a committed).
  • New files. drain.py target (now with h8's rows), paths summary (reference_paths.json), score_report serial-readout (drain_serial_rescore.json) and score_report donor (drain_donor_h8.json) are all byte-identical. control_seeded_{mtp,stats,tokens}.json and both context_waves_stopped_*.json are byte-identical to their raw compare.json files.
  • Unchanged files. drain_scores.csv, drain_score_report.json, drain_gross_events.csv, drain_context.json, drain_ring_report.json and drain_ring_439.csv are unchanged since cf3ffc9. Their generators changed in this delta, so I reran them at c3b4234, and all six are still byte-identical.
  • Tests. tests/test_benchcert*.py: 66 passed.

Order of the new holds

Each hold ran at a commit that already carried its reading:

  • the paths hold started 14:37:14 at 12643a1 (reading in 79611ee, 14:03);
  • the seeded control started 14:40:19 at e0a282e, which carries its reading;
  • the counter rerun started 14:54:23 at 5809538;
  • the token-only rerun started 15:00:28 at 5a7ee16.

f0c35da (14:40:13) is formatting, type annotations and a B023 refactor, and changes no behaviour (the old closure was called within the same loop iteration). The serial re-score is recorded as a dated amendment. It repairs the implementation to match the declared "at concurrency 1", so it is not a change of rule.

My items at cf3ffc9

  1. Fixed. The gate is on in 9 of 20 draws (batch 14-16) and off in 11 (batch 17-19), in the README (lines 416, 488) and the body. The gate-off tokens, 68189 ×8, 5715 ×2 and 8078 ×1, match drain_ring_439.csv.
  2. Fixed. Four-launch totals of 911,240 rows (909,733 complete), 17,518, 286 and 729,006, in both places.
  3. Fixed. The title no longer claims what the head decided. "No observation requires a certified-head error" is supported, and the README says the gate at s1 and h6a is unknown.
  4. Fixed. A dated note under the h7 motivation; the pre-set text is untouched.
  5. Fixed. 79611ee sets --workers 1 for both scorers, and the reply is 4167016177.
    • The serial re-score gives classes 540 / 553 / 19 / 1, against 530 / 550 / 32 / 1 concurrently, and my regeneration matches.
    • The verdicts and the exactness status are unchanged.

New numbers checked against the files

  • reference_paths.json.

    • FP32 puts 68189 on top at -0.8737 and 1756 at -9.7868, 8.91 nats below its top.
    • The prefills put 1756 at -8.12, -8.89 and -8.32, and the serial prefill has it 6.81 below its own top. BF16 decode puts it on top at -0.3215.
    • 5715 is 4.74 below FP32's top.
    • At a4db11ff/333, the prefills give 18299 at -13.40 to -15.32 while FP32 puts it on top at -0.45.
  • Draws at 439 (drain_579ae7ce.csv), for every group in the README's table:

    • stock: 12 / 3 / 4 / 0 of 68189 / 8078 / 5715 / 1756 (19 draws);
    • certified graphs, uninstrumented: 21 / 5 / 4 / 4 (34);
    • certified graphs, instrumented: 23 / 1 / 2 / 0 (26);
    • planted and reordered: 10 / 6 / 1 / 0 (17).

    That gives 2-plus nats below FP32's top in 4 of 19, 8 of 34, 2 of 26 and 1 of 17, so 11 of 77 over all certified-graph draws. The Fisher p for 1756 at 4/34 against 0/19 is 46376/292825 = 0.158.

  • Seeded control. There are 109 requests (1 + 3 × (8 + 12 + 16)).

    • In the logprob run every server pair is 109 of 109 identical, differs_from_both_stock is empty for cert0 and cert, the baseline is intact, and stock's batch-1 token is 68189.
    • In the token-only run, the certified verify steps over the waves are 272 + 1,128 + 1,166 + 1,142 = 3,708, and certtokens equals stocktokens 109 of 109 on both passes.
    • The counter rerun's 5 certified calls were all in the warm-up, which the README explains correctly.
  • drain_serial_rescore.json.

    • All 8 gross and 22 near events keep their class, and none is missing.
    • At 579ae7ce/439 the serial gap is 6.81 in s1 cert and h6a cert1 r1 (1756), and 2.19 in cert1 r3, cert1 r5 and stock2 r2 (5715).
  • Codex. "Didn't find any major issues" on c3b4234.

  • Hygiene. The hostname grep on the delta is clean. The author and committer are Samuel Mausberg, with no attribution lines.

Blocking

  1. Apply the drain rule with the serial reference and state its outcome. The serial-references reading, set before the hold, says "the serial re-scores replace the concurrent classes and h6s gaps where they differ". Serially, 579ae7ce/439 is gross in h6a stock2 r2 (5715, 2.19 nats) as well as in cert1 r1, r3 and r5. The drain rule says "a gross event in stock too means it is not specific to the certified engine".

    The README states the serial stock gross (h6s bullet, lines 437-441), but elsewhere it still gives the concurrent reading as the rule's outcome:

    • line 320: "which the teacher-forced scores count as a reproduction under the reruns' pre-set rule";
    • the drain table's "Gross event (h6s)" column: certified 1 of 12, stock 0 of 12.

    Give the rule's outcome under the serial reference: 3 of 12 certified against 1 of 12 stock, so not specific to the certified engine. Keep the concurrent count beside it as superseded, and make line 320 and the body say the same.

  2. Report the paths hold in the terms of its own reading. The reading set before the run defined three outcomes:

    • FP32's paths agree with each other and with the stock prefills: the stock GDN decode path carries the error at this row, "a stock-engine numerics fault, independent of the certified head";
    • they side with decode: the prefill and scorer references are wrong;
    • they disagree with each other by more than 0.1 nats: "ill-conditioned even in FP32".

    The measured outcome is the first at 579ae7ce/439 (FP32's paths agree to 0.0001 and put 68189 on top with the prefills) and the second at a4db11ff/333. The README already says that the six plain gross labels invert, which follows the second reading.

    But the title, the summary heading, README:34 ("the next-token distribution at that position is ill-conditioned") and README:600 ("Neither path is systematically wrong: these are single ill-conditioned positions") use the term that reading reserved for the third outcome, which did not occur. State the pre-set reading's result first: at 579ae7ce/439, stock BF16 decode carries an 8.9-nat error by FP32, a stock-engine numerics fault independent of the head. Then offer "ill-conditioned in BF16" (small BF16 perturbations change the top, while FP32's two paths agree) as your description, labelled as such.

Optional

  • README:596 says "every path, BF16 and FP32, ... within about 0.03 nats". The largest spread over the 39 positions is 0.032 for the BF16 paths but 0.046 with FP32 (position 437: -0.0443 against -0.0899). Say 0.05, or 0.03 for BF16.
  • "FP32's two paths agree to 0.001 nats": 0.0001 at 579ae7ce/439 but 0.0024 at a4db11ff/333.
  • README:323 says "stock BF16 paths disagree there by up to 8 nats". On 1756 the gap is 8.6 (-0.32 against -8.89).
  • The 4 of 19 against 8 of 34 count rests on an FP32 threshold chosen after the data; it could carry "post hoc" as the Fisher p does.

Once items 1-2 are fixed (a README and body change), I'll check that delta.

…4234)

Drain rule under the serial reference: h6a 3 of 12 certified against 1 of 12 stock gross at
579ae7ce/439, so by the rule the event is not specific to the certified engine; the
concurrent 1 of 12 against 0 of 12 is kept as the superseded first reading. Paths reading:
FP32's paths agree within 0.0001 nats and side with the prefills, so the stock decode path
carries the error (a stock-engine numerics fault), stated first, with 'ill-conditioned in
BF16' as an interpretation. Numbers: 0.046 nats before the target, 0.0024 at a4db11ff/333,
8.6 nats; the per-arm FP32 comparison labelled post hoc.
@SamMausberg SamMausberg changed the title Served certified-head benchmark (H4): small-batch gains, envelope losses; identical to stock at c = 1 and in check mode, and for MTP under identical batches; the MTP c = 64 divergence sits at an ill-conditioned position Served certified-head benchmark (H4): small-batch gains, envelope losses; identical to stock at c = 1 and in check mode, and for MTP under identical batches; the MTP c = 64 divergence sits at a position where stock's BF16 decode path errs against FP32 Oct 2, 2026
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (head 3d6d0b9; provisional on Codex, which is running on this head)

This is a delta review of c3b4234..3d6d0b9: one commit, evidence README only, plus the PATCHed title and body. Both of my blocking items are fixed, and so are the four optional ones.

  1. The drain rule under the serial reference. The event paragraph, the drain table and the body now give the serial outcome first: h6a certified 3 of 12 (cert1 r1 with 1756, r3 and r5 with 5715), stock 1 of 12 (stock2 r2, 5715), check mode 0 of 8. They state the rule's reading in its own words, "not specific to the certified engine". The concurrent 1 of 12 against 0 of 12 is kept and marked as the superseded first reading, and the table notes that only concurrently flagged contexts and position 439 were re-scored. These counts match drain_serial_rescore.json (target_439), which I checked at c3b4234.
  2. The paths outcome in the pre-set reading's terms. The title, the summary heading and opening, the reference-paths paragraph, the verdict sentence and the body now say the following:
    • FP32's paths agree within 0.0001 nats and side with the stock prefills, so by the pre-set reading the stock decode path carries the error, a stock-engine numerics fault independent of the head. The README adds that the reading named the GDN decode path and the layer was not located.
    • At a4db11ff/333 the other branch applies.
    • The reserved "ill-conditioned even in FP32" case did not occur, and "ill-conditioned in BF16" appears only as an interpretation.
  3. Optional items.
    • The spread over the 39 positions is now within 0.05 nats (0.046 at position 437).
    • FP32's paths agree to 0.0024 nats at a4db11ff/333.
    • The largest disagreement between stock BF16 paths is given as 8.6 nats.
    • The 4 of 19 against 8 of 34 comparison is labelled post hoc in the README summary, the per-arm paragraph and the body.

Nothing else changed since c3b4234, where I regenerated every evidence file byte for byte, ran 66 tests and checked the new numbers (issuecomment-5955533018). The hostname grep on the delta and the body is clean, and the commit is authored and committed by Samuel Mausberg with no attribution lines.

This approval becomes final once Codex is clean on 3d6d0b9.

@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: 3d6d0b9b04

ℹ️ 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 on lines +449 to +453
entry['certified_steps'] += c['certified_steps']
entry['stock_graph_steps'] += c['stock_graph_steps']
entry['rows'] += c['rows']
entry['max_rows'] = max(entry['max_rows'], c['max_rows'])
verify_steps = sum(v['certified_steps'] for v in by_size.get('verify', {}).values())

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 Require device coverage for the seeded token rerun

When a per-wave snapshot has more host certified_steps than device calls, this aggregation discards calls and derives verify_steps solely from the host gate count. tokens_compare() can therefore report that the certified verify matched stock—and support the committed claim that all 3,708 verifies were certified—even when some gated replays are unaccounted for. Fresh evidence beyond the fixed check2 path is that this token-only seeded readout has an independent aggregation with no uncounted_calls check; aggregate device calls and require them to equal the host count before issuing that reading.

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: the reading should not rest on the host gate count alone. Fixed in 011aac2. tokens_compare now sums the device calls per path and wave size, computes uncounted calls against the family's calls_per_step, and returns its reading only when none are uncounted; otherwise it reports the run as incomplete. A test covers both cases.

The raw per-wave snapshots of the token-only rerun meet that condition. In all 20 wave passes (10 waves × 2), device calls equal host-gated certified steps on every path:

  • verify 3,708 calls for 3,708 steps;
  • draft 7,416 for 2 × 3,708;
  • draft-extend 3,708 for 3,708.

control_seeded_tokens.json was regenerated with the fixed code (bc4b31e) and shows waves_uncounted_calls: 0 and per-size uncounted_calls: 0. The claim of 3,708 certified verifies stands.

…ed step (Codex)

tokens_compare took the certified verify count from the host gate alone. It now sums the
device calls per path and wave size, computes uncounted calls against calls_per_step, and
gives its reading only when none are uncounted. Test covers both cases.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (head bc4b31e; provisional on Codex, which is running on this head)

This is a delta review of 3d6d0b9..bc4b31e: two commits answering Codex P2 4167213657 (reply 4167234397).

  • 011aac2. tokens_compare now sums the device calls per path and wave size, sets uncounted_calls to host-gated certified steps × calls_per_step (MTP: draft 2, others 1, plan.py:134) minus device calls, and returns its reading only when none are uncounted. Otherwise it reports "incomplete". This applies the same coverage rule as check_counters uses for the check launches, so the "3,708 certified verify steps" claim no longer rests on the host gate count alone. The new test covers both cases.
  • bc4b31e. I regenerated control_seeded_tokens.json with the README's command at this head, writing to a scratch copy of the raw directory so the raw compare.json stayed untouched. It is byte-identical to the committed file, which is also byte-identical to the raw compare.json.
    • Verify: device calls equal steps at every wave size (272, 1,128, 1,166 and 1,142; 3,708 in all).
    • Draft: 544, 2,256, 2,332 and 2,284 calls, two per step.
    • Draft extend: equal to the steps.
    • waves_uncounted_calls is 0, and the reading is unchanged ("the certified verify decided the waves' verifies and matched stock").
  • README. The seeded paragraph and the Files row say what the file shows, and the row now gives the regeneration command at 011aac2.
  • Checks. tests/test_benchcert*.py: 67 passed. Pre-commit on the four changed files is clean. The hostname grep on the delta is clean, and the author and committer are Samuel Mausberg with no attribution lines.

Everything I verified at c3b4234 and 3d6d0b9 still holds. This approval becomes final once Codex is clean on bc4b31e.

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

ℹ️ 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 on lines +476 to +479
elif identical:
reading = "the certified verify decided the waves' verifies and matched stock"
else:
reading = 'certified verify mismatch under identical batch evolution'

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 Reject token readouts when the baseline is unstable

When either server produces different outputs across its two identical passes, the pre-set reading rule says the result must not be interpreted as a certified-head match or mismatch. Although baseline is computed above, this branch ignores it, so matching stock/cert outputs within each repetition can still yield “matched stock” even when repetition 0 differs from repetition 1; conversely, cross-arm differences can be mislabeled a certified mismatch despite nondeterministic baseline behavior. Check baseline before issuing either conclusive reading.

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. Fixed in a1ecb36. tokens_compare gives a match or mismatch reading only when both baselines hold: each server's two passes are identical (baseline_identical), and the token-only stock run equals the logprob stock run from another server (stock_runs_identical). Otherwise it reports "baseline failed" with no conclusion. A test covers an unstable stock pass.

The committed data meet both: baseline_identical: true and stock_runs_identical: true in the regenerated control_seeded_tokens.json (ae97aa4). The reading is unchanged.

Comment thread experiments/benchcert/control_waves.py Outdated
entry['uncounted_calls'] = (
entry['certified_steps'] * per_step.get(path, 1) - entry['calls']
)
uncounted = sum(e['uncounted_calls'] for sizes in by_size.values() for e in sizes.values())

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 Check every counter delta instead of their signed sum

Fresh evidence after the earlier device-coverage fix is that this aggregate sums signed uncounted_calls values before deciding completeness. If one path or wave size is missing a device call (+1) while another has an extra device call (-1), the total is zero and the readout can claim that the certified verify decided and matched even though both per-entry coverage checks failed. Treat any nonzero per-path/per-size delta as incomplete, as check_counters() already does.

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; a signed sum (or even a per-size total) could cancel. Fixed in a1ecb36. tokens_compare now checks coverage for every wave pass and path on its own, certified_steps × calls_per_step == calls, as check_counters does. Any nonzero entry is listed in waves_uncovered_entries and makes the reading "incomplete". A test covers a missing call on one path cancelling an extra one on another.

The committed data meet the stricter check: all 20 wave passes, on every path, have zero uncounted calls. control_seeded_tokens.json was regenerated in ae97aa4 with waves_uncovered_entries: [], and the reading is unchanged.

…lines (Codex)

Coverage is checked for every wave pass and path on its own, so a missing call on one entry
cannot cancel an extra one on another; and no match or mismatch reading is given unless each
server's two passes are identical and the token-only stock run equals the logprob stock run.
Tests cover the cancelling case and an unstable baseline.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (head ae97aa4; provisional on Codex, which is running on this head)

This is a delta review of bc4b31e..ae97aa4: two commits answering Codex P2s 4167277454 and 4167277448 (replies 4167299469 and 4167299681).

  • a1ecb36, per-entry coverage. tokens_compare now checks device coverage for each wave pass and path separately, as host-gated steps × calls_per_step against device calls. Every nonzero entry is listed in waves_uncovered_entries, and the per-size uncounted_calls sums absolute values, so a +1 in one entry can no longer cancel a -1 in another. Any uncovered entry makes the reading "incomplete".
  • a1ecb36, baselines. A match or mismatch reading now also requires each server's two passes to be identical and the token-only stock run to equal the logprob stock run (stock_runs_identical). If either fails, the reading is "baseline failed". The tests cover a cancelling +1/-1 case and an unstable baseline.
  • ae97aa4, regeneration. I regenerated control_seeded_tokens.json at this head with the README's command, writing to a fresh scratch copy of the raw directory, and it is byte-identical to the committed file. The only change from bc4b31e is waves_uncounted_calls: 0 giving way to stock_runs_identical: true and waves_uncovered_entries: []. baseline_identical is true, 3,708 certified verify steps are covered, and the reading is unchanged. The Files row cites a1ecb36.
  • Checks. tests/test_benchcert*.py: 67 passed. Pre-commit on the four changed files is clean. The hostname grep on the delta is clean, and the author and committer are Samuel Mausberg with no attribution lines.

Everything I verified at c3b4234, 3d6d0b9 and bc4b31e still holds. This approval becomes final once Codex is clean on ae97aa4.

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

ℹ️ 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 on lines +559 to +562
elif identical:
reading = (
'certified verify rows over the server life (warm-up included); outputs equal stock'
)

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 Withhold the counter reading when calls are uncounted

When any path has a nonzero uncounted_calls, this branch still issues the conclusive “certified verify rows … outputs equal stock” reading as long as some verify rows were counted. In that scenario the missing device calls may include wave verifies, so the observed rows cannot establish that the certified head decided every host-gated replay; gate the reading on uncounted_calls_zero and report it as incomplete otherwise.

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. Fixed in 2b0f0d1. stats_compare gives a reading only when every path has zero uncounted calls and both runs (the cert arm and the reference stock run) are identical across their two passes. Otherwise it reports "incomplete" or "baseline failed". Tests cover both cases.

I checked the rest of control_waves.py for the same gap. tokens_compare (per-entry coverage and both baselines, a1ecb36) and small_compare (within-server and stock-against-stock baselines) are gated the same way. The remaining comparisons report counts without a conclusion.

The committed counter-rerun data meet the condition: uncounted calls are 0 on verify, draft, draft-extend and the DFlash draft, and the passes are identical. control_seeded_stats.json was regenerated in this push with uncounted_calls_zero: true and passes_identical: true; the reading is unchanged.

…ounted call or unstable pass (Codex)

stats_compare now requires zero uncounted calls on every path and identical passes in both
the cert run and the reference stock run before it reads anything; otherwise it reports
incomplete or baseline failed. With tokens_compare (per-entry coverage, both baselines) and
small_compare (both baselines), every computed reading in control_waves.py is gated. Tests
cover both new cases.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 84534146e7

ℹ️ 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 (head 8453414; final, Codex clean on this head)

This is a delta review of ae97aa4..8453414: two commits answering Codex P2 4167344058.

  • 2b0f0d1. stats_compare, the counter-rerun readout, now gives a reading only when every path has zero uncounted calls and both the cert run and the reference stock run have identical passes. Otherwise it reports "incomplete" or "baseline failed". The output records uncounted_calls_zero and the new passes_identical. The tests cover both failure cases. Combined with a1ecb36's gating of tokens_compare, the seeded readouts now all require coverage and stable baselines.
  • 8453414. I regenerated control_seeded_stats.json at this head with the README's command, writing to a scratch copy of the raw directory. It is byte-identical to the committed file, which is also byte-identical to the raw compare.json. The only change from ae97aa4 is the added "passes_identical": true. uncounted_calls_zero is true, and the reading is unchanged (certified verify rows only in the warm-up; outputs equal stock).
  • Checks. tests/test_benchcert*.py: 67 passed. Pre-commit on the four changed files is clean. The hostname grep on the delta is clean, and the author and committer are Samuel Mausberg with no attribution lines.

Everything I verified at c3b4234, 3d6d0b9, bc4b31e and ae97aa4 still holds, and Codex found no major issues on 8453414. Ready to merge on my side.

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