Repository navigation
Paper: fold the served certified head (#190), and lead with the contract and the served result - #214
Conversation
Approved by main as the first commit of the #190 fold. No claim or condition is lost: - Section 4.3: the engine-check paragraph's last sentence repeated the one before it (per-position fallback only in one plain run); cut. - Section 4.3: the derived independence-at-replay-rates sentence (30%/85%, clustering) moves to Appendix A ("Fallback by call size"), with its evidence marker; the main text keeps 36/84% and 27/77% and points to the appendix. - Section 4.4: the Hopper-model expected-times sentence moves to Appendix A ("Expected time under the Hopper model"), with its marker; the main-text claim already names the conservative model. - Section 4.5: "leave MTP, whose outputs were not compared, at 0.991 times its throughput" becomes "not for MTP"; Table 1 keeps 0.991 and "not compared". - Limitations: the restatement of Section 2.2's probe result is cut to the probes' limits (one exact operand, no subnormals, one GPU).
The certified head has been measured served (evidence/certified_head/served/): - Table 1 gains a "Certified head, per arm" group: geometric means of three session ratios with 95% t intervals, from ratios.csv. Footnote c records the DFlash pairs' 60,000-token attention-cache pin. The old "did not start at full capacity" row is removed. - Section 4.5 gets a paragraph on the served head; Section 4.4's derived bound points to the measured plain-decoding gain. - New Appendix E.5: design, every point with the pre-registered prediction (tab:cert-served), throughput, exactness, and the one large divergence (stock's BF16 decode path against FP32). - Appendix E's other subsections no longer call the served effect pending. The stock GEMM's bandwidth baseline moves from Section 4.4 to E.2, next to the stock head's isolated times. - Registers: evitem cert-served in both registers; the bench-cert pending items are removed. Notes: H3, H4, the levers-table cell and the serving paragraph cite the result.
Framing edits approved by main, plus fixes to the fold's wording: - Abstract (about 315 words, from about 400): the served result with its conditions (+2.5% plain, +4.6% MTP, +1.2% DFlash at c = 1 with identical tokens; the best arm loses 1.0-3.0% at c = 2-8, where certified batches reach 28-64 rows and most verify calls fall back, and 0.6% at 128, gated off); the stock BF16 decode-path finding; the host-work sentence scoped to the engine changes measured. The derived head-only estimate and the DFlash 90% sentence stay in Section 4. - Contributions: item 1 says why the reference is the engine, not exact arithmetic (configuration dependence; the 8.9-nat BF16 event). Item 3 states the served outcome. One clause points to the research notes. - Section 3.3 in one paragraph. Fixed-noise acceptance against the stock rejection sampler is stated as not measured, which removes the kernel-seeded-engine markers in Sections 3 and 7. - Section 4.5: the losses include MTP at c = 64 and the gated-off overhead; the c = 1 gains are 28-71% of the pre-registered prediction; the divergence rates are scoped to the three families with a rate. - Limitations: "Replay and serving" (one workload; why the served gains fall short is a hypothesis). The Conclusion ends on the design that carries beyond the head, and on the head's small share against the recurrent state's. - Appendix E intro lists E.5; E.2's bandwidth sentence merged; E.5's wave-control wording; notes H3 and H4. - Trims to hold ten pages: Related Work's pointer to Section 1.1, and shorter contribution, Limitations and Conclusion wording.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf0b880529
ℹ️ 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".
| \paragraph{Engine changes} At low concurrency the largest gain in Table~\ref{tab:levers} comes from host work, not a kernel: making FlashInfer's attention planning, the host work that leaves the MTP cycle idle (Figure~\ref{fig:breakdown}), cheaper and free of blocking GPU reads raises MTP's throughput by 9.4--9.6\% at $c=1$--8 \ev{hostgap}. Stock MTP with Triton attention, which plans nothing on the host, stays faster there (532 against about 500 tokens/s at $c=1$, derived) \ev{bench-frontier}; the patches do not move the MTP frontier. Faster backbone GEMM kernels gain 3.4--3.5\% for plain decoding at $c=1$ but leave MTP, whose outputs were not compared, at 0.991 times its throughput \ev{backbone}. Removing per-request state traffic pays as the batch grows: verifying DFlash blocks without per-position state snapshots (SGLang's fold-every-commit protocol) costs 3.2\% at $c=1$ and gains 6.1\% at $c=8$ \ev{drafter-fold}. Together, the fold, the routing table and the certified head lower 16-token DFlash's per-request rate at $c=1$ to 0.986 times stock (95\% interval 0.982--0.989, three sessions) and raise its throughput at $c=8$ 1.073 times, where most verify calls exceed the certified head's 64-position limit \ev{stack-composition} (Appendix~\ref{app:stack-composition}). Two declared approximations miss the quality budget fixed before measuring \ev{lossy}: FP16 recurrent state serves 1.16--1.17 times the best non-lossy arm's throughput at $c=64$--256 (three sessions) for 1.0--1.4 GSM8K points below plain decoding's reference runs, a loss this check cannot resolve, and an int4 target with its int4 drafter~\cite{nota2026} fails a logit probe and is slower above $c=1$. | ||
| \paragraph{Engine changes} At low concurrency the largest gain in Table~\ref{tab:levers} comes from host work, not a kernel: making FlashInfer's attention planning, the host work that leaves the MTP cycle idle (Figure~\ref{fig:breakdown}), cheaper and free of blocking GPU reads raises MTP's throughput by 9.4--9.6\% at $c=1$--8 \ev{hostgap}. Stock MTP with Triton attention, which plans nothing on the host, stays faster there (532 against about 500 tokens/s at $c=1$, derived) \ev{bench-frontier}; the patches do not move the MTP frontier. Faster backbone GEMM kernels gain 3.4--3.5\% for plain decoding at $c=1$ but not for MTP \ev{backbone}. Removing per-request state traffic pays as the batch grows: verifying DFlash blocks without per-position state snapshots (SGLang's fold-every-commit protocol) costs 3.2\% at $c=1$ and gains 6.1\% at $c=8$ \ev{drafter-fold}. Together, the fold, the routing table and the certified head lower 16-token DFlash's per-request rate at $c=1$ to 0.986 times stock (95\% interval 0.982--0.989, three sessions) and raise its throughput at $c=8$ 1.073 times, where most verify calls exceed the certified head's 64-position limit \ev{stack-composition} (Appendix~\ref{app:stack-composition}). Two declared approximations miss the quality budget fixed before measuring \ev{lossy}: FP16 recurrent state serves 1.16--1.17 times the best non-lossy arm's throughput at $c=64$--256 (three sessions) for 1.0--1.4 GSM8K points below plain decoding's reference runs, a loss this check cannot resolve, and an int4 target with its int4 drafter~\cite{nota2026} fails a logit probe and is slower above $c=1$. | ||
|
|
||
| \paragraph{The certified head, served} Served alone against each tuned arm in three sessions, the certified head raises throughput at $c=1$ by 2.5\% for plain decoding, 4.6\% for MTP and 1.2\% for 16-token DFlash, and keeps gaining up to $c=32$ for plain decoding and $c=8$ for MTP (Table~\ref{tab:levers}; Appendix~\ref{app:cert-served}) \ev{cert-served}. It loses 1.0--3.3\% wherever its certified calls reach 28--64 positions (DFlash above $c=1$, MTP at 64), where 55--83\% of verify calls need a fallback in check mode, and up to 1.2\% where it is gated off. So the best arm at each concurrency gains only at $c=1$ and loses 1.0--3.0\% at $c=2$--8 and 0.6\% at 128, and the gains at $c=1$ are 28--71\% of the saving predicted from the head-only times. Its tokens equal stock's at $c=1$, in check mode and, for MTP, under identical batch evolution; closed-loop runs of plain decoding, MTP and 8-token DFlash diverge from stock at 1.03--1.21 times the rate between stock runs, and the one large divergence is where stock's BF16 decode path errs against FP32. Batches that request log-probabilities, penalties or a grammar get the stock verify. |
There was a problem hiding this comment.
Trim the manuscript back to the ten-page limit
This added served-results paragraph leaves the conclusion spilling onto an eleventh main-text page—the commit's own build note reports an overflow of roughly six lines—while the repository defines the manuscript as a ten-page main paper. Shorten this paragraph or make equivalent cuts elsewhere before treating this revision as submission-ready.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c923ada: four short cuts in Sections 4.3 and 7, the abstract and the Conclusion (listed in the PR body). The main text now ends at the foot of p10R, and References start at the top of p11.
The fold and the framing ran about six lines onto p11. These cuts bring the Conclusion back to the foot of p10 without dropping a result or a condition: - Section 4.3: the sentence pointing to the FP32-output kernel's error as "the more direct test" (the Limitations already call that error indirect evidence, and Section 2.2 reports it). - Abstract: "depending on the error model" becomes "under two error models". - Limitations: the Figure 3b aside; the per-change session counts, which Table 1's caption and footnote d already give; tighter wording for the served runs and the fixed-noise acceptance, which is still stated here and in Section 3.3. - Conclusion: one sentence for the fallback design, and shorter wording.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c923adadff
ℹ️ 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".
| % Abstract: one paragraph, as the MLSys template asks. | ||
| \begin{abstract} | ||
| In speculative decoding a target model checks tokens that a cheaper drafter proposes. At each position a greedy verifier, like greedy decoding, needs one fact from the output head, the winning token, yet the engine scores the whole vocabulary. That token can be found more cheaply: approximate every score from an int8 copy of the head, bound each approximation's error, recompute exactly the few entries that could still win, and fall back to the engine's own head when the bounds cannot decide. Inside a production engine the token must be the one the engine's head returns for a batch of the same size, after BF16 rounding and its tie rule. We prove when bounds on the head's FP32 sums fix this token, given an assumed bound on its rounding error, and extend the method to seeded sampling. For Qwen3.5-4B in SGLang on a GH200, replaying 60,000 positions captured from greedy decoding, the GPU kernel recomputes about 1.8 entries per decision and leaves 0.28\% of positions to the engine's head under a published model of Hopper accumulation, or 1.46\% under a conservative model; with that fallback every token equals the engine's. In a 64-prompt check inside SGLang under the conservative model no certified token differed from the engine's head, but for one public drafter 90\% of verify batches still needed the fallback. Timed alone, with fallbacks costed at their measured rates, the certified head is expected to take about 0.7 times the engine head's time for calls of up to 16 positions, which would save at most about 3.4--3.5\% of a batch-1 decode step (derived). That estimate uses a per-position fallback that the engine check exercised only in plain decoding; from 128 positions the head is slower, and its effect on serving is not yet measured. At 1 to 8 concurrent requests the largest exact serving gain came from host work: making attention planning cheaper and free of blocking reads raised MTP drafting's throughput with FlashInfer attention by 9.4--9.6\% (one session, token-identical outputs). Bounds carried over from the drafter's own head computation are sound but too loose to skip more than 0.7\% of the vocabulary in any variant tested: the distance between draft and target head inputs, relative to the target's, has a median of 92\% and 95\% for the two public drafters, where about 1\% is needed. | ||
| A greedy verifier in speculative decoding, like greedy decoding itself, needs one fact from the output head, the winning token, yet the engine scores the whole vocabulary. We find that token from an int8 copy of the head: bound each approximate score's error, recompute exactly the few entries that could still win, and fall back to the engine's own head when the bounds cannot decide. The token must be the one the engine's head returns for a batch of the same size, after BF16 rounding and its tie rule. We prove when bounds on the FP32 sums fix it, given an assumed and tested bound on the closed-source kernel's rounding error, and extend the method to seeded sampling. For Qwen3.5-4B in SGLang on a GH200 the kernel recomputes about 1.8 entries per decision and leaves 0.28--1.46\% of 60,000 replayed positions to the fallback under two error models; every token equals the engine's, and none of 592,433 positions certified in the served engine differs. Served in three sessions, it raises throughput at one request by 2.5\% for plain decoding, 4.6\% for MTP and 1.2\% for DFlash, with identical tokens, but the best configuration loses 1.0--3.0\% at 2 to 8 requests, where certified head calls reach 28--64 positions and most verify calls fall back, and 0.6\% at 128, where the head is gated off. The stock engine is itself not FP32-exact: at one position its BF16 decode path commits a token FP32 places 8.9 nats below the top. Among the engine changes we measured, the largest gain at low concurrency came from host work: 9.4--9.6\% for MTP with FlashInfer attention (one session), still short of MTP with Triton attention. Bounds carried over from the drafters' own head computation skip under 0.7\% of the vocabulary in every variant tested: draft and target head inputs differ by a median 92--95\% of the target's norm, where about 1\% is needed. |
There was a problem hiding this comment.
Rebuild the committed manuscript PDFs
This rewrites the abstract and many other manuscript sections, but both paper/paper.pdf and paper/research_notes.pdf are byte-for-byte unchanged from the parent commit. Because the repository directs readers to paper/paper.pdf as the primary manuscript, they will receive the previous version without the new served-head results; rebuild and commit both generated PDFs from these updated sources.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changed, by repository practice: paper PRs change only the LaTeX sources and figure data, and the integrator rebuilds paper/paper.pdf and paper/research_notes.pdf on main in a separate rebuild-only PR after the paper PRs merge (as in #171, #176, #189 and #193). Committing PDFs in every paper PR made each one conflict with the others. This PR's build was checked locally (PR body, Build section).
|
Verdict: REQUEST CHANGES at c923ada The fold is careful, and almost every served number reproduces from Blocking
Optional
What I checked
On the next head I will re-check items 1-3, the page budget from a fresh build, the checker and Codex. |
…losses (review of #214) - Section 4.5 and Appendix E.5: fallback shares come from the complete check rerun (check2), not h1's partial launch: 54-82% of DFlash's verify calls and 76% of MTP's draft calls at c = 64; 76-82% at c = 4 for 16-token DFlash. - Section 4.5 and notes H3: the loss is stated for DFlash above c = 1 and MTP at 64, and plain decoding (c = 32, 64) and MTP (c = 8-32) are named as running calls of the same sizes without a detectable loss. The levers table adds the losses and the envelope. - Appendix E.5: the seeded control compared every token, and log-probabilities at position 439 only. - Abstract: 30-64 positions for the best configuration, and "(check mode)". Contribution 1 points to Appendix E.5 for the 8.9 nats. The Conclusion compares the head and the state kernel at one batch size. Section 4.5 says only MTP's divergence interval excludes 1. To keep the main text within ten pages (the fixes added about four lines), with two lines spare at the foot of p10, these trims drop no claim or condition: Section 4.5's subject becomes "it" under its own paragraph title and its loss sentence is restructured; Section 5.4 points to Table 12 without naming its appendix and says "DFlash-4B positions"; the Limitations drop two repeated pointers to Section 2.2 and the words "too", "the capture's" and "served". In the notes, the levers table's caption sentence on attention backends moves into the paragraph that defines the classes, so the table fits its page with the longer certified-head cell.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Verdict: REQUEST CHANGES at 276f3aa I re-reviewed the delta from c923ada: one commit, 13 lines in 8 files. My three blocking items and optional items 4-8 are fixed, and the build fits the page budget. One blocking item remains. It comes from the wording I suggested for item 3, which still overstates the comparison, so the error is mine. Blocking
Re-checked at 276f3aa
Optional
On the next head I will check only this sentence, plus the build if any line moves. |
…usion's loss scope (review 2 of #214) - Appendix E.5: the seeded control recorded the top-five and five tracked tokens' log-probabilities at position 439, not the full distribution; the sentence now says so. - Conclusion: the head loses on DFlash above one request and on MTP at 64, as Section 4.5 states, not "at larger batches".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Verdict: APPROVE at 8b58206 I re-reviewed the delta from 276f3aa: one commit, two sentences.
#215 (approved at 2f7f913) is based on 276f3aa. After a rebase onto this head, I will check only the diff of diffs. |
The abstract still said the certified head's served effect was "not yet measured", and five
\pend{bench-cert}markers sat in the main text. #190 measured that effect. This PR states the result with its conditions. It also applies the framing edits main approved (memo of 2 October): the paper now leads with what it shows (a contract against a closed-source production kernel, the measured served outcome and why it is small, the stock engine's own numerics, and transport's negative result) rather than with an inventory. No new evidence and no new claims beyond the committed READMEs.Commit 1: free main-text lines (approved cuts B1, B3, B4, B6, B9)
No claim or condition is lost; the commit message lists where each sentence went. In short: a duplicate engine-check sentence is cut, the derived clustering sentence and the Hopper expected-times sentence move to Appendix A, Section 4.5's backbone clause shortens (Table 1 keeps 0.991 and "not compared"), and the Limitations stop restating Section 2.2.
Commit 2: fold #190
tab:cert-served, with the pre-registered predictions), throughput, exactness and the one large divergence. Appendix E's other subsections no longer call the served effect pending. The stock-GEMM bandwidth baseline sentence moves from Section 4.4 to E.2, beside the stock head's other isolated numbers.\evitem{cert-served}goes into both registers, with the same files and producers, and thebench-certpending items are removed. In the notes, H3, H4, the levers-table cell and the serving paragraph now cite the result.Commit 3: framing (main's ruling on the memo)
\pend{kernel-seeded-engine}markers in Sections 3 and 7 go).Fidelity notes (checked against
evidence/certified_head/served/README.md,ratios.csv)check2rows ofcheck.csv): 54-82% of DFlash's verify calls at its loss points (16-token at c = 2 and 4: 64.2%, 81.5%; 8-token at 4 and 8: 53.7%, 70.9%) and 75.7% of MTP's draft calls at c = 64, whose verify runs certified only in the drain.Commit 4: hold the main text to ten pages
As first pushed (bf0b880), the commits ran about six lines onto p11. These cuts keep every result and condition:
Commit 5: review round 1 (issuecomment-5958238854, at c923ada)
Each blocking item was checked against the committed evidence before it was changed.
check2rows ofcheck.csv), not h1's partial launch. In Section 4.5, 54-82% of DFlash's verify calls fall back in check mode at its loss points, and 76% of MTP's draft calls at c = 64. Appendix E.5 gives 76-82% at c = 4 for 16-token DFlash (draft projection 75.9%, verify 81.5%).control_waves.py'ssmall_comparecompares.evidence/certified_head/served/README.md(line 64, and the sentence after reading (ii)) belongs to the benchcert evidence. It is flagged to main for a later evidence PR.These fixes added about four lines, so the same commit also trims, without dropping any claim or condition:
Commit 6: review round 2 (issuecomment-5958796777, at 276f3aa)
control_waves.py,seeded_logprobs). The sentence now reads "...and the top-five and five tracked tokens' log-probabilities at position 439 identical to the bit". The notes do not repeat the phrase.Build (8b58206; one core, niced, no exclusive hold running): paper 54 pp, 0 warnings, Conclusion ends on p10R with one line spare, References at the top of p11; notes 55 pp, 0 warnings;
check_paper_references.py --rev HEADclean; pre-commit passed.Build (276f3aa; one core, niced, no exclusive hold running)
scripts/check_paper_references.py --rev HEAD: every check clean (4 pending markers left in the paper, all in the appendices; Notes and appendices: fold #211 and #213, and state every unmeasured result as such #215 removes them).Codex
mainrebuilds both PDFs on main after the paper PRs merge (rebuild-only PRs such as Rebuild paper.pdf and research_notes.pdf from main c356cd6 #189 and Rebuild paper.pdf and research_notes.pdf from main 6490520 #193).