Skip to content

Appendix E: integrate the baseline tuning (#57) - #64

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

SamMausberg merged 4 commits into
mainfrom
paper/appendix-bench

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Integrates the baseline tuning merged in #57 into Appendix E (serving protocol and speculation state), the evidence register and the glossary. The main text is unchanged.

What the appendix now says

  • Configuration search (evidence/bench/tuning/, new register entry tuning). A new table gives y at concurrency 1, 8, 32 and 128 and the accepted length at 32 for all 23 tuning-split configurations, one launch each. The paper labels it selection evidence, not results. It marks the three host-contention exclusions and the one KV-limited point (MTP s5 with the prefix cache at c=128), and notes that DFlash block 16 runs at capacity 64. The text says what the search covered. It also says what it did not cover: a one-step chain failed a launch check, replayed verification was refused for DFlash and with FlashInfer GDN decode, and trees, the verify attention mode, chunk size and graph backend were not searched.
  • Why the arms were chosen. Three regularities decide the arms:
    • Speculation leads at low concurrency and every speculative configuration trails plain decoding at c=128.
    • Replayed verification recovers 24% at c=128 for three steps, at a 3% cost at c=1, and depth 3 beats depths 4 and 5 at c=128.
    • Triton attention helps speculation at low concurrency and hurts it at high.
  • Chosen arms (bench/arms.toml). Arms that replay the GDN state or run the target's attention under Triton are pending classification of their greedy outputs against plain decoding (new pending item bench-equality). MTP with snapshot verification under FlashInfer is the exact-stack fallback.
  • Classes (review B1). Replayed verification's class is now pending in the levers table, with the mechanism suggesting lossy: its verify outputs come from a chunked transform on TF32 tensor cores (moonshot lever 5, Moonshot: P4 strict replay is bit-exact (1.22x kernel), host-gap flag 1.18x, P7 rejection tests #60). Triton attention for the target is pending as well, per the Moonshot: P4 strict replay is bit-exact (1.22x kernel), host-gap flag 1.18x, P7 rejection tests #60 ruling.
  • E.4. The served turn of MTP against plain decoding on the tuning split, and the derived snapshot write rate (about 0.59 TB/s for MTP s3 at c=128, against 1.35 TB/s of state traffic for plain decoding). Where the two cross on the confirmation split stays pending (bench-mtp, narrowed).
  • Levers table. Measured tuning-split ratios for replayed verification (1.24x at c=128, 0.97x at c=1) and replayed decoding (1.08x and 0.87x). The drafting row names the chosen depths and blocks.
  • Glossary. New entries for "Replayed and snapshot verification" and "Tuning and confirmation splits".

Every number was typed from evidence/bench/tuning/points.csv and checked against the bench README.

Corrections relative to the evidence README

These are flagged to the bench workstream:

  • MTP s3 with replayed verification at c=1 is 446.50 tok/s in points.csv. The README rounds it to 447. The table uses 446.
  • DFlash b16 (FlashInfer) at c=32 is 5,386.49 in points.csv, which the README gives as 5,387.
  • The README says depth 3 was "within ~4% at low concurrency". That holds at c=1, but at c=8 the deeper chains lead by up to 6.5% (MTP s5 without the prefix cache: 2,699 against 2,534). The paper says "at most 4% at concurrency 1 and 7% at 8".

Validation

  • latexmk -pdf builds 69 pages with no LaTeX or BibTeX warnings. The main text ends on page 10. The rebuilt paper.pdf is committed, and I looked at every changed page.
  • 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 reports the configuration search on the tuning
split in a new table: 23 configurations at concurrency 1, 8, 32 and
128, one launch each, labelled as selection evidence rather than
results. The text gives the three regularities behind the choices and
the chosen arms from bench/arms.toml. The arms that replay the GDN state
wait on classification of their outputs against plain decoding (new
pending item bench-equality).

Appendix E.4 cites the served turn of MTP against plain decoding on the
tuning split and the derived snapshot traffic. The crossover on the
confirmation split stays pending (bench-mtp). The levers table gets the
measured replay speedups. A new register entry covers the tuning
evidence, bench-tuning leaves the pending list, and two glossary
entries define replayed and snapshot verification and the tuning and
confirmation splits.
@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-01T03:42:55.620462Z 0201cf6 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

Reviewed head 0201cf6: one commit on main (76b8c2c) that changes the appendix, the register and the glossary. The main text is unchanged. The tuning table and every derived figure are correct. One class statement conflicts with merged evidence.

Checked and correct

  • Table tab:tuning. I recomputed all 23 rows from main's evidence/bench/tuning/points.csv: y at c = 1, 8, 32 and 128 (64 for block 16), the three excluded points, and the accepted length at c = 32. Every cell matches, including 446 (446.50) and 5,386 (5,386.49).
  • The prose.
    • 1.64x at c = 1.
    • With snapshot verification MTP trails from c = 32 (5,839 against 6,087). With RV and no prefix cache it leads at c = 32 (6,925) and trails at c = 128 (13,011 against 13,844). Every speculative configuration trails plain decoding at c = 128.
    • Depth 3 trails depths 4 and 5 by at most 3.5% at c = 1 and 6.1% at c = 8. "At most 4% and 7%" holds, and the README's "within ~4% at low concurrency" is indeed wrong at c = 8, as your PR body notes.
    • Block 16 under Triton is the best valid configuration at c = 1 and 8. 3.35x in x against the matched Triton baseline. Block 4 is 8% above block 8 with FA4 at c = 128.
    • In the levers table, RV gives 1.24x at c = 128 and 0.97x at c = 1, and replayed decoding gives 1.08x and 0.87x.
    • The E.4 snapshot traffic, 0.59 against 1.35 TB/s, matches the derivation in the bench README.
  • Caption notes. The "excl." note, the false-positive caveat, the KV-limited dagger (54K tokens, at most 123 running, retractions) and the capacity-64 double dagger all match the bench README.
  • Register. The new tuning entry cites files that are on main (points.csv, frontier.csv, launches.csv, the README, arms.toml, the three tuning campaigns, pareto.py). bench-tuning is replaced. bench-equality and bench-mtp are worded correctly as pending.
  • Build. I rebuilt from source: 69 pages, no warnings, and the text matches the committed PDF. The main text still ends on page 10, and check_paper_references.py passes.

Blocking

B1. The class given for replayed verification conflicts with merged evidence (app_stack.tex: the new arms paragraph, "Replayed verification is exact only up to the batch-shape noise floor until differential tests confirm more"; the levers table class exact$^\ast$ and its footnote).

  • The footnote and class predate this PR. This PR repeats them as a claim in the arms paragraph, so it should bring them in line with what has since merged:
  • A TF32 transform rounds to 10-bit mantissas, which is more than a reassociation, so "exact up to the batch-shape noise floor" is not established.
  • Fix:
    • Make the levers table's class "pending" (or "pending; mechanism suggests lossy").
    • Rewrite the footnote to say the verify outputs come from a chunked transform on TF32 tensor cores, so the class waits on bench-equality.
    • In the arms paragraph, write "Replayed verification's class is pending (\pend{bench-equality}); its verify outputs come from a TF32 chunked transform."
    • Keep the snapshot-verification fallback sentence as it is.

Codex

Codex is still running on 0201cf6. I'll check its comments before approving.

@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: 0201cf632f

ℹ️ 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
Every arm streams every fourth token (\code{stream-interval = 4} in \code{bench/arms.toml}). The server still sends the first token at once and the last at finish, so the times that Equation~\eqref{eq:frontier} uses do not depend on the interval, and the choice takes load off the single-threaded streaming path (below). Each point sends $\max(64,8c)$ measured requests, the first prompts of the confirmation split in order, after one wave of warm-up requests at the same concurrency, and the prefix cache is flushed before every point so that no measured prompt is served from cache. Repeats launch the server afresh and alternate the order of concurrencies, ascending then descending, so that drift does not align with concurrency. Timed runs hold the GPU exclusively, and because the scheduler, tokenizer manager and client are single-threaded CPU loops, each point also waits until other processes use fewer than two cores and records the foreign load it saw.

The speedup denominator is the strongest existing configuration, not a default. Arm~A is ordinary autoregressive decoding. Arm~B is native MTP speculation, whose draft steps reuse the target's tied head. Arm~C is the public DFlash drafter (Appendix~\ref{app:drafting}). On the tuning split the search covers chain depth (one to five steps, and seven without the prefix cache), draft trees (top-$k$ 2 and 4, which run on this hybrid model, with accepted lengths of 3.45 and 3.56 at concurrency 1 in the feasibility probes~\ev{probes}), attention and GDN kernel backends, the verify attention mode, SGLang's replayed GDN verification, its batch-adaptive depth, the prefill chunk size and graph backend, the prefix cache and the streaming frontend. The chosen MTP and DFlash configurations, with the tuning evidence, are \pend{bench-tuning}.
The speedup denominator is the strongest existing configuration, not a default. Arm~A is ordinary autoregressive decoding. Arm~B is native MTP speculation, whose draft steps reuse the target's tied head. Arm~C is the public DFlash drafter (Appendix~\ref{app:drafting}). The search ran on the tuning split~\ev{tuning}: 23 configurations, each launched once and measured at client concurrency 1, 8, 32 and 128 with $\max(32,4c)$ requests per point and 512 output tokens. It covered MTP chain depth (two to five steps with the prefix cache, three, five and seven without it), the prefix cache, SGLang's replayed GDN verification and replayed decoding, its batch-adaptive depth, Triton against FlashInfer attention, DFlash blocks of 4, 8 and 16 tokens and FA4 attention for the DFlash drafter. A one-step chain failed a launch check that required a draft-decode graph such a chain does not capture, and was not rerun; replayed verification was refused at launch for DFlash and with FlashInfer's GDN decode kernel. Draft trees (top-$k$ 2 and 4, which run on this hybrid model, with accepted lengths of 3.45 and 3.56 at concurrency 1 in the feasibility probes~\ev{probes}), the verify attention mode, the prefill chunk size and graph backend were not searched. With one launch per configuration, Table~\ref{tab:tuning} is selection evidence, not a result.

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 Exempt the capacity-64 configurations from the stated sweep

This says all 23 configurations were measured at concurrency 128, but both DFlash block-16 configurations were capped at 64 and the tuning campaign runs them only at 1, 8, 32, and 64 (bench/campaigns/tuning_backend_dflash.sh:20-24), as the later table footnote also acknowledges. Qualify these two configurations here so the reported search coverage does not imply nonexistent c=128 measurements.

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 71cd149: the sweep sentence now reads "(64 instead of 128 for the two block-16 configurations)". 07067a6 then merges origin/main (9ad5344, which includes #65 and #59). The only conflict was paper.pdf, rebuilt from the merged sources: 69 pages, 0 warnings, main text ends on page 10, and the checker passes.

Address review B1 on #64. Merged evidence does not support the "exact
up to the noise floor" class for replayed verification. Moonshot lever
5 (#60) calls it pending, with a mechanism that suggests lossy, because
its verify outputs come from a chunked transform on TF32 tensor cores.
bench/arms.toml (#57) also marks those arms lossy = "pending". The
levers table's class and footnote and the chosen-arms sentence now say
this.

Triton attention for the target changes the target's arithmetic, as
ruled in #60, so the Triton arms and the attention-backend lever are
pending too, and bench-equality covers them.
@SamMausberg

Copy link
Copy Markdown
Owner Author

B1 is fixed in 536899e. Replayed verification's class is now pending in the levers table. Its footnote cites the chunked transform on TF32 tensor cores and says the mechanism suggests lossy, with the class waiting on bench-equality (moonshot lever 5, #60; arms.toml lossy = pending, #57). The chosen-arms sentence says the same. Following the #60 ruling, Triton attention for the target changes the target's arithmetic, so the Triton arms and the attention-backend lever are now pending as well, and bench-equality covers them. Build: 69 pages, 0 warnings, main text ends on page 10; the checker passes.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Re-reviewed head 536899e (one commit on 0201cf6). B1 is fixed. Codex's P2 on 0201cf6 is valid and not yet addressed. It is a one-clause fix.

B1 (fixed).

  • Replayed verification is now pending in the levers table.
  • The footnote cites the TF32 chunked transform, says the mechanism suggests lossy, and says the class waits on bench-equality. That matches evidence/moonshot/README.md, lever 5, and arms.toml.
  • Following Moonshot: P4 strict replay is bit-exact (1.22x kernel), host-gap flag 1.18x, P7 rejection tests #60's ruling, Triton target attention is also pending: in the arms paragraph, in the system-overheads row ("exact; target backend pending"), in the caption, and in bench-equality's description.
  • I rebuilt from source: 69 pages, no warnings, and the text matches the committed PDF. The main text ends on page 10, and check_paper_references.py passes.

Blocking, from Codex P2 (app_stack.tex:242).

  • "23 configurations, each launched once and measured at client concurrency 1, 8, 32 and 128" is not true for the two DFlash block-16 configurations.
  • They were capped at 64 and run at 1, 8, 32 and 64 (bench/campaigns/tuning_backend_dflash.sh:20-24), as the table's double dagger already says.
  • Fix: add "(64 instead of 128 for the two block-16 configurations)".

Merge note. The branch is behind main, which now includes #65's change to Figure 3. When you merge main, rebuild the PDF; I'll confirm the merge commit contains only the merge and the rebuild.

Address the Codex review of #64: the DFlash block-16 configurations
run at capacity 64 and were measured at concurrency 1, 8, 32 and 64.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Approving head 07067a6. It has two commits on 536899e:

B1 (the replayed-verification and Triton-target classes) was fixed in 536899e, and the tuning table and numbers were verified in my first review.

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