Skip to content

Appendix E.8: describe the confirmation protocol (#66) - #79

Merged
SamMausberg merged 5 commits into
mainfrom
paper/appendix-confirm
Oct 1, 2026
Merged

SamMausberg merged 5 commits into
mainfrom
paper/appendix-confirm

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

Brings Appendix E.8 (the serving protocol) in line with the confirmation harness merged in #66. It adds design only: every confirmation result stays pending. The main text is unchanged.

What the appendix now says

  • Sweep. The confirmation sweep covers c ∈ {1, 2, 4, 8, 16, 32, 48, 64, 96, 128}, each arm over the concurrencies where it competes (bench/campaigns/confirm.sh). Before, the paper listed powers of two only.
  • Sessions and ratios. There are three sessions. Each launches every tuned arm afresh in the same exclusive hold as its matched plain baseline (FlashInfer or Triton), with arm order reversed in alternate sessions. Speedups are ratios within a session. A pair with an invalid point on either side is dropped and counted, never replaced (bench/pareto.py, paired_ratios). Points where the attention cache limited the batch are flagged from the scheduler log.
  • Exactness classes and two envelopes. Every arm carries a class from bench/arms.toml: stock, exact up to the floor, pending or lossy. The envelope is drawn over all arms and over the stock and exact-up-to-the-floor arms. bench-frontier is restated for sessions, and its old "five within-launch repeats" is dropped, since that plan is not in the harness.
  • Sensitivity workload. Each confirmation prompt is sent with its own greedy length under plain decoding, capped at 2,048 tokens, at c = 32 and 128. Arms are chosen by the rule fixed in bench/README.md. The workload was declared while the first confirmation session was running and before any arm was timed on it. The fixed-length panel stays primary. New pending item bench-sensitivity.
  • Diagnostic only. The scheduler's full-batch generation rate is recorded as a diagnostic, never as a frontier metric.
  • Tuning detail (from the corrected bench README in Confirmation harness: exactness classes, session-paired ratios, envelopes #66). In the low-concurrency arm's own configuration (replayed verification, Triton), depth 4 led depth 3 by 3.2% at c=1 and 0.4% at c=8 and trailed by 2% at c=32. This is why one depth serves both MTP arms.

Validation

  • latexmk -pdf builds 72 pages with no LaTeX or BibTeX warnings. The main text ends on page 10. The rebuilt paper.pdf is committed, and I looked at the changed pages.
  • python scripts/check_paper_references.py passes: no uncited or missing keys, and every register path exists on origin/main.
  • The repo's hooks exclude paper/; there are no other changed files.

The serving protocol now matches the merged harness. The confirmation
sweep covers c = 1-128, including 48, 64 and 96, each arm over the
concurrencies where it competes. It runs three sessions, each with
every arm launched afresh in the same hold as its matched plain
baseline. Speedups are ratios within a session, and a pair with an
invalid point is dropped; attention-cache-limited points are flagged.

Every arm carries an exactness class from bench/arms.toml (stock, exact
up to the floor, pending, lossy). The envelope is drawn over all arms
and over the exact arms. The declared natural-length sensitivity
workload is described, with its results pending (new item
bench-sensitivity). The server's full-batch rate is a diagnostic only.
The tuning text adds the low-concurrency arm's depth comparison, and
bench-frontier is restated for sessions. No results are added.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head bc5488e: one commit on 13368f4 that describes #66's confirmation protocol in Appendix E.8. It is a design description; the results stay pending. One sentence describes a step that the confirmation sweep does not perform.

Checked and correct

  • Concurrency grid and holds. The grid is 1-128 with 48/64/96, each arm over the concurrencies where it competes (confirm.sh). Each speculative arm runs in the same hold as its matched plain baseline, in reversed order in alternate sessions.
  • Pairing. Ratios are within a session, a pair with an invalid point on either side is dropped and counted, and points limited by the attention cache are flagged. This matches paired_ratios and the Tune the plain, MTP and DFlash baselines and define the tuned arms #57 KV columns.
  • Exactness classes. The four classes and the two envelopes match bench/arms.py's allowlist and pareto.py.
  • Sensitivity workload. It was declared while the first session was running and before any timed sensitivity run, with the rule over the three confirmation sessions fixed before any run. This matches the Confirmation harness: exactness classes, session-paired ratios, envelopes #66 and Sensitivity workload: dated rule refinement, arm list derived from results #70 READMEs. bench-sensitivity is new and pending.
  • The full-batch server rate is described as a diagnostic, never a frontier metric.
  • The depth detail. Under RV with Triton, depth 4 is +3.2% at c = 1 (552 / 535), +0.4% at c = 8 (3,104 / 3,093) and -2.0% at c = 32 (6,958 / 7,103), matching points.csv.
  • Build. I rebuilt from source: 72 pages, no warnings, and the text matches the committed PDF. The main text ends on page 10, and check_paper_references.py passes.

Blocking

B1. "Repeats alternate the order of concurrencies" is not what the confirmation sweep does (app_stack.tex, the paragraph after Protocol and baselines).

  • bench.sweep alternates ascending and descending concurrency only between repeats within one invocation (run(), --repeats, line 392). confirm.sh runs each arm once per session with the default --repeats 1 and an ascending list.
  • So every confirmation session sweeps concurrency in ascending order, including repeat 0. Only the order of the arms is reversed in alternate sessions.
  • Fix: say that the arm order alternates between sessions and that concurrency runs in ascending order within each. Alternatively, pass a descending list on odd sessions in confirm.sh. That is a protocol change after repeat 0, so it would need its own note.

Address review B1 on #79. confirm.sh runs each arm once per session
over ascending concurrencies. bench.sweep alternates the concurrency
order only between --repeats within one launch, which the confirmation
sweep does not use.
@SamMausberg

Copy link
Copy Markdown
Owner Author

B1 is fixed in 9bf7af7. The protocol now says that only the arm order alternates between sessions: "so that drift does not align with an arm". It adds: "Within a session each arm runs once, over its concurrencies in ascending order; the harness alternates the order of concurrencies only between repeats within one launch, which the confirmation sweep does not use" (confirm.sh; sweep.py run()). No other text claims alternating concurrencies. Build: 72 pages, 0 warnings, main text ends on page 10; the checker passes.

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

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread paper/sections/app_stack.tex Outdated
\paragraph{Frontiers}\label{sec:serving-frontiers} The baseline frontier is the upper envelope over arms A, B and C, since no arm need be best at every concurrency: speculation saves weight traffic, which matters most at low concurrency, and adds per-request state traffic, which matters most at high concurrency (Appendix~\ref{app:spec-state}). The frontier plot ($y$ against $x$ for each arm over concurrency 1 to 128, the mean of three launches with its range), the frontier table ($x$, $y$, time to first token and accepted length per arm and concurrency, with speedups over arm A and over the tuned speculative arm) and the run-to-run variance across three launches and five within-launch repeats are \pend{bench-frontier}. So are the before-and-after frontiers for the certified head in MTP drafting, verification and plain decoding, with output-equality checks at the same batch shape, which decide H4 \pend{bench-cert}, and the exact and lossy stacks \pend{moonshot-frontiers}.
\paragraph{Frontiers}\label{sec:serving-frontiers} The baseline frontier is the upper envelope over arms A, B and C, since no arm need be best at every concurrency: speculation saves weight traffic, which matters most at low concurrency, and adds per-request state traffic, which matters most at high concurrency (Appendix~\ref{app:spec-state}). Every arm carries an exactness class in \path{bench/arms.toml}: \emph{stock} when it sets only flags known to leave the target's arithmetic as in plain decoding with FlashInfer target attention and stock state handling, \emph{exact up to the floor} when its greedy outputs, classified against plain decoding, stay at the batch-shape noise floor of Appendix~\ref{app:divergence}, \emph{pending} until then, and \emph{lossy} otherwise. The envelope is drawn twice, over all arms and over the stock and exact-up-to-the-floor arms. The frontier plot ($y$ against $x$ for each arm, the mean of the three sessions with their range), the frontier table ($x$, $y$, time to first token and accepted length per arm and concurrency, with within-session speedups over arm A and over the tuned speculative arm) and the run-to-run variance across sessions are \pend{bench-frontier}. So are the before-and-after frontiers for the certified head in MTP drafting, verification and plain decoding, with output-equality checks at the same batch shape, which decide H4 \pend{bench-cert}, and the exact and lossy stacks \pend{moonshot-frontiers}.

\paragraph{Sensitivity to output length} With a closed-loop client and equal output lengths, plain requests start and finish in synchronized waves, while speculative arms advance requests at rates that vary with acceptance, so their completions spread out into more, smaller prefill passes and a drain at the end of a point. A sensitivity workload, declared while the first confirmation session was running and before any arm was timed on it, removes the equal lengths and nothing else: each confirmation prompt is sent with its own greedy completion length under plain decoding with natural stopping, capped at 2,048 tokens, so that every arm generates the same number of tokens per request. It runs at concurrency 32 and 128 for the best arm of each speculative family at each concurrency, by a rule over the three confirmation sessions fixed before any sensitivity run, with matched plain baselines, in three sessions. The fixed-length panel stays the primary result; where the sensitivity workload changes a ranking, both numbers are reported. Its results are \pend{bench-sensitivity}.

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 Describe the actual sensitivity prompt subset

The sensitivity campaign does not send every one of the 1,152 confirmation prompts at either point: bench/campaigns/sensitivity.sh retains the sweep defaults of max(64, 8c) requests, yielding 256 prompts at c=32 and 1,024 at c=128. Claiming that each confirmation prompt is sent therefore overstates the evaluated data scope; describe these ordered prefixes, as the preceding fixed-length protocol and bench/README.md do.

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 3f51575. The text now says the sensitivity runs use max(64, 8c) measured requests, the ordered prefix of the confirmation split: 256 prompts at c=32 and 1,024 at c=128. Each prompt carries its own capped natural length.

Comment thread paper/sections/app_stack.tex Outdated
\paragraph{Frontiers}\label{sec:serving-frontiers} The baseline frontier is the upper envelope over arms A, B and C, since no arm need be best at every concurrency: speculation saves weight traffic, which matters most at low concurrency, and adds per-request state traffic, which matters most at high concurrency (Appendix~\ref{app:spec-state}). The frontier plot ($y$ against $x$ for each arm over concurrency 1 to 128, the mean of three launches with its range), the frontier table ($x$, $y$, time to first token and accepted length per arm and concurrency, with speedups over arm A and over the tuned speculative arm) and the run-to-run variance across three launches and five within-launch repeats are \pend{bench-frontier}. So are the before-and-after frontiers for the certified head in MTP drafting, verification and plain decoding, with output-equality checks at the same batch shape, which decide H4 \pend{bench-cert}, and the exact and lossy stacks \pend{moonshot-frontiers}.
\paragraph{Frontiers}\label{sec:serving-frontiers} The baseline frontier is the upper envelope over arms A, B and C, since no arm need be best at every concurrency: speculation saves weight traffic, which matters most at low concurrency, and adds per-request state traffic, which matters most at high concurrency (Appendix~\ref{app:spec-state}). Every arm carries an exactness class in \path{bench/arms.toml}: \emph{stock} when it sets only flags known to leave the target's arithmetic as in plain decoding with FlashInfer target attention and stock state handling, \emph{exact up to the floor} when its greedy outputs, classified against plain decoding, stay at the batch-shape noise floor of Appendix~\ref{app:divergence}, \emph{pending} until then, and \emph{lossy} otherwise. The envelope is drawn twice, over all arms and over the stock and exact-up-to-the-floor arms. The frontier plot ($y$ against $x$ for each arm, the mean of the three sessions with their range), the frontier table ($x$, $y$, time to first token and accepted length per arm and concurrency, with within-session speedups over arm A and over the tuned speculative arm) and the run-to-run variance across sessions are \pend{bench-frontier}. So are the before-and-after frontiers for the certified head in MTP drafting, verification and plain decoding, with output-equality checks at the same batch shape, which decide H4 \pend{bench-cert}, and the exact and lossy stacks \pend{moonshot-frontiers}.

\paragraph{Sensitivity to output length} With a closed-loop client and equal output lengths, plain requests start and finish in synchronized waves, while speculative arms advance requests at rates that vary with acceptance, so their completions spread out into more, smaller prefill passes and a drain at the end of a point. A sensitivity workload, declared while the first confirmation session was running and before any arm was timed on it, removes the equal lengths and nothing else: each confirmation prompt is sent with its own greedy completion length under plain decoding with natural stopping, capped at 2,048 tokens, so that every arm generates the same number of tokens per request. It runs at concurrency 32 and 128 for the best arm of each speculative family at each concurrency, by a rule over the three confirmation sessions fixed before any sensitivity run, with matched plain baselines, in three sessions. The fixed-length panel stays the primary result; where the sensitivity workload changes a ranking, both numbers are reported. Its results are \pend{bench-sensitivity}.

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 Include the near-best-arm selection rule

When a family's runner-up is within 2% of the best arm, the declared rule selects both (bench/sensitivity_arms.py, WITHIN = 0.02, lines 34 and 107), rather than only the best arm described here. This case adds another arm and matched baseline to all three sessions, so the paper should state the 2% rule to accurately preserve the preregistered selection protocol.

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 3f51575. The rule now reads: for each speculative family and concurrency, the arm with the highest mean y over the three confirmation sessions, with invalid points excluded and only arms valid in all three eligible, together with the family's runner-up if it is within 2% of that mean (bench/sensitivity_arms.py, WITHIN = 0.02). The rule was fixed before any sensitivity run.

@chatgpt-codex-connector

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-01T04:08:18.254786Z bc5488e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Re-reviewed head 9bf7af7. B1 is fixed: the text now says only the arm order alternates between sessions, each arm runs once per session over ascending concurrencies, and the harness alternates concurrency only between repeats within one launch, which the confirmation sweep does not use. No other sentence claims alternating concurrencies. I rebuilt from source: 72 pages, no warnings, the text matches the committed PDF, and the main text ends on page 10.

Codex left two P2 comments on bc5488e. Both are valid, and neither is addressed yet.

  1. The sensitivity prompts (app_stack.tex:293, "each confirmation prompt is sent with its own greedy completion length").
    • The campaign keeps the sweep's max(64, 8c) measured requests, so it sends the first 256 prompts of the confirmation split at c = 32 and the first 1,024 at c = 128, not all 1,152.
    • Fix: describe them as the ordered prefixes, each sent with its own greedy length, as the fixed-length protocol and bench/README.md do.
  2. The 2% rule (same paragraph, "the best arm of each speculative family at each concurrency").
    • The declared rule also selects the runner-up when it is within 2% of the best (bench/sensitivity_arms.py, WITHIN = 0.02), with its matched baseline.
    • Fix: state the 2% clause and that the means are over the three sessions with invalid points excluded, so that the paper records the pre-registered rule in full.

Merge note. The branch is behind main. Merge main and rebuild the PDF with the fix; I'll confirm the merge commit as usual.

Address the two Codex comments on #79. The sensitivity campaign sends
the ordered prefix of max(64, 8c) confirmation prompts: 256 at c=32
and 1,024 at c=128. Each arm is chosen by the mean y over the three
confirmation sessions, with invalid points excluded and only arms valid
in all three eligible. A runner-up within 2% also runs.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Approving head 3f51575 (0b57542 and 3f51575 on 9bf7af7).

  • 0b57542 merges main at d52070e (Appendix D: integrate the state-safety results (#59) #74). I re-did the merge locally. The only conflict is paper/paper.pdf, and every other path is identical to 0b57542.
  • 3f51575 fixes both Codex P2s on bc5488e.
    • The sensitivity runs use "max(64, 8c) measured requests, the ordered prefix of the confirmation split (256 and 1,024 prompts)". That matches bench/README.md's declaration.
    • The arm rule now states the three-session mean, the exclusion of invalid points, the requirement of a valid point in all three sessions, and the 2% runner-up clause, as bench/sensitivity_arms.py implements.
    • Both threads are answered on the PR. Codex's only review is on bc5488e, and there are no comments on later heads.
  • B1 (only the arm order alternates) was fixed in 9bf7af7.
  • Build. I rebuilt from source: 73 pages, no warnings, and the text matches the committed PDF. The main text ends on page 10, and check_paper_references.py passes.

@SamMausberg
SamMausberg merged commit 5ab27fa into main Oct 1, 2026
@SamMausberg

Copy link
Copy Markdown
Owner Author

Confirming the merged head 769d230. It is main (d0e3157, with #77 and #78) merged into the approved 3f51575. Re-doing that merge locally gives a tree identical to 769d230, with no conflicts, and 3f51575..769d230 changes nothing under paper/. Codex's only comments are the two on bc5488e, both fixed. The approval holds for 769d230, merged as 5ab27fa.

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