Skip to content

Drafter: the per-position acceptance a block drafter needs for 5x (derived from committed evidence) - #134

Merged
SamMausberg merged 4 commits into
mainfrom
drafter/drafting-requirement
Oct 1, 2026
Merged

SamMausberg merged 4 commits into
mainfrom
drafter/drafting-requirement

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

The repair workstream's Stage A says that, with SGLang's Triton GDN verify kernel, perfect blocks of 64 or more tokens would reach a 5x end-to-end gain over DFlash, so the binding constraint is drafting. This PR puts a number on "almost entirely accepted" and compares it with what the public DFlash drafter, and any selector over its candidates, actually achieves. It adds no runs: experiments/drafter/drafting_requirement.py reads committed evidence only.

Method. For each width B, Stage A's cycle period C(B) for perfect blocks with DFlash drafting (evidence/repair/stage_a_oracle{,_triton}.json) and each verifier's block-16 baseline give the tokens per cycle a 5x gain needs, C(B) x decode speedup needed / baseline time per token, out of at most B. For a constant per-position conditional acceptance alpha a cycle commits (1 - alpha^B) / (1 - alpha) tokens, which gives the alpha each width needs. The measured side is the block-16 panel-v1 survival table already on main: the engine's accepted length and the top-16 support bound U_16 (P6's zero-training screen).

Result (evidence/drafter/drafting_requirement.json, README section "What drafting must reach for a 5x gain").

verifier B tokens per cycle needed constant alpha needed
FlashInfer 16-256 43-276, above B at every width unreachable
Triton 16 42.1 of 16 unreachable
Triton 64 61.1 of 64 0.9985
Triton 256 132.2 of 256 0.9941

DFlash's measured conditional acceptance is 0.80-0.91 by position (mean 0.889 over positions 5-15), so for a constant rate the per-position miss rate would have to fall from about 11% to 0.15-0.6%.

For selection over the drafter's candidates (P6) the reading is narrower. At the anchors the stock block-16 trajectory visited, U_16 is 0.91-0.92 from position 4 on: the target's token is outside the drafter's top 16 at about 8.6% of those positions, whatever picks among them. That is not a bound for a selector's own anchors (greedy verification keeps the text, but cycle boundaries move, and U_16 was not measured there) or for wide blocks (no wide-block candidates exist). The README keeps the projection of the 0.914 tail rate to B = 64 and 256 (11.6 and 11.7 tokens per cycle against 61 and 132 needed) as an illustration only.

Scope. Constant alpha is a simplification: real acceptance varies by position, and the table gives the constant rate that would suffice. The cycle periods are perfect-block periods from one Stage A session at c = 1 on eight MATH-500 problems; the Triton figures keep the repair README's pending-exactness label for the Triton verify kernel. The measured acceptance is from panel-v1 at block 16 only.

Review comments. Codex (fe2a8d0): two comments on generalizing U_16 beyond the stock trajectory and to wide blocks, both fixed by scoping the README (3e316c4); one on repo_commit (the recorded aa773bc is the evidence commit's parent, so it was reachable; the JSON now also records the SHA-256 of the generator and its inputs, which a rerun reproduces exactly).

Testing. pre-commit on the changed files; the script reproduces the JSON from the committed inputs (python experiments/drafter/drafting_requirement.py --out evidence/drafter/drafting_requirement.json). This PR and #133 both edit the Files table in experiments/drafter/README.md; whichever merges second needs a one-row merge.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T15:18:26.698524Z 3e316c4 Manual request
ℹ️ About Codex in GitHub

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

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

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe2a8d0741

ℹ️ 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 evidence/drafter/README.md Outdated
Comment on lines +156 to +159
positions once the first few are past, so no selector over them (P6) comes close: a hypothetical
drafter holding U_16's tail rate of 0.914 at every position would commit 11.6 tokens per cycle
at B = 64 and 11.7 at B = 256, against 61 and 132 needed. The gap is in what the drafter
proposes, not in which of its candidates is picked.

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 Do not generalize U_16 beyond the measured trajectory

The categorical conclusion that no selector over these candidates can come close does not follow from this measurement. U_16 was computed only at anchors visited by the stock block-16 trajectory; selecting a different candidate can change the committed sequence and therefore all subsequent anchors and candidate sets, as the existing P6 description explicitly notes. Its positions 5–15 mean is also merely extrapolated to widths 64 and 256. The calculation supports a hypothetical projection on the stock trajectory, but it cannot establish that candidate selection is incapable of closing the gap.

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 3e316c4. The README now limits U_16 to the anchors the stock block-16 trajectory visited and drops the categorical conclusion. It also states the narrower reason the trajectory matters here: greedy verification commits the target's own tokens, so another selector changes where cycles start rather than the text, but those anchors are a different sample of positions on which U_16 was not measured. The 0.914 projection to B = 64 and 256 is labelled an illustration of a hypothetical drafter, not a bound.

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

ℹ️ 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 evidence/drafter/README.md Outdated
Comment on lines +156 to +159
positions once the first few are past, so no selector over them (P6) comes close: a hypothetical
drafter holding U_16's tail rate of 0.914 at every position would commit 11.6 tokens per cycle
at B = 64 and 11.7 at B = 256, against 61 and 132 needed. The gap is in what the drafter
proposes, not in which of its candidates is picked.

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 Do not treat block-16 support as a wide-block selector bound

When this result is used to rule out P6 at B=64 or B=256, the categorical conclusion is unsupported: the script reads only the block-16 trace, which contains candidate support through position 15, and the same README explicitly notes at lines 88-89 that U_16 bounds only the stock trajectory because another selector visits different anchors. Extending the observed 0.914 tail rate is a hypothetical projection, not an upper bound on candidate support for those wider, on-policy blocks, so either retain only the illustrative projection or collect the relevant wide-block selector traces before concluding that candidate selection cannot close the gap.

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 3e316c4 together with the previous thread. The section no longer uses block-16 support to rule out selection at B = 64 or 256: it says a selector over a wide-block drafter's candidates has no measured support, keeps the tail-rate extension only as an illustration, and states that whether the candidate shortfall holds on a selector's own anchors or for wide blocks is not established. The requirement side (the per-position rate a 5x gain needs, against DFlash's measured 0.80-0.91) is unchanged.

@@ -0,0 +1,144 @@
{
"kind": "derived from committed measurements (no new runs)",
"repo_commit": "aa773bc9b20e01974b30422194164a5bc256f78d",

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 Record an ancestry-valid source commit

Checking out the reviewed commit and running the documented generation command rewrites this field from aa773bc... to 2881d6e...; moreover, aa773bc is a sibling of this commit rather than an ancestor. Consequently the committed result attributes itself to a source state that cannot be recovered from this commit's history and the README command does not reproduce the artifact as committed; record a reachable source commit containing the generator and inputs, or remove/redefine this self-varying field.

AGENTS.md reference: AGENTS.md:L15-L18

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.

Partly a misreading and partly fair; addressed in 5c664e8/3e316c4. aa773bc is the parent of fe2a8d0 (git merge-base --is-ancestor aa773bc fe2a8d0 succeeds), so the recorded commit contained the generator and was reachable. The fair part is that repo_commit records the commit the generator runs at, so a rerun from a later commit changes that one field. The JSON now also records the SHA-256 of the generator and of its three committed inputs, which a rerun reproduces exactly, and the README says that repo_commit is the only field a later rerun changes. The current file was generated at 5c664e8, the parent of the evidence commit.

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

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

Review of the exact head 3e316c4. I checked the arithmetic by hand and by rerunning the generator.

Verified

  • The derivation.
    • The tokens per cycle needed are T*(B) = C(B) · s / baseline, with s the decode speedup a 5x end-to-end gain needs (5.51 FlashInfer, 5.54 Triton) and the block-16 baselines of 0.972 and 0.960 ms per token. All of these come from evidence/repair/stage_a_oracle{,_triton}.json.
    • With constant conditional acceptance α, a B-wide cycle commits Σ_{k<B} α^k = (1 − α^B)/(1 − α): the B − 1 drafted tokens plus the bonus token, at most B. required_alpha bisects that function, which is monotone in α.
    • Spot checks: α = 0.9985 at B = 64 gives 61.07 tokens, and α = 0.9941 at B = 256 gives 132.2. The projection's 11.6 and 11.7 come from the measured tail rate 0.9142 (1/0.0858 = 11.65 at B = 256).
  • Reproduction. python experiments/drafter/drafting_requirement.py on one core reproduces drafting_requirement.json exactly except repo_commit, as stated. The sha256 block pins the generator and its three inputs.
  • The measured side. It matches support/zlab_b16_panel_v1_survival.csv:
    • L_engine's conditional acceptance is 0.7975-0.9142 (mean 0.889 over positions 5-15), and its tokens per cycle, 6.204, agree with the engine's figure in Appendix F.
    • U_16 is 0.99 at position 1 and 0.91-0.92 from position 4 (mean 0.914), so about 8.6% of positions fall outside the top 16.
  • The table and the conclusion hold. FlashInfer needs 43-276 tokens per cycle, above B at every width. Triton needs 42.1 of 16, 61.1 of 64 (α 0.9985) and 132.2 of 256 (α 0.9941). The miss rate falls from about 11% to 0.15% or 0.6%.
  • Codex. All three threads on fe2a8d0 are answered: U_16 is scoped to the stock trajectory's anchors and to block 16, and the commit ancestry and input hashes are recorded. Codex found no major issues on 3e316c4.
  • Checks. Pre-commit passes on the changed files. The commits are by Samuel Mausberg. The hostname check is clean.

Suggestion (non-blocking). The script's docstring calls α*(B) "a lower bound on the per-position acceptance any drafter needs, under that verifier, at that width". Two qualifications belong there.

  • The cycle period is DFlash's perfect-block period, so the bound is for a drafter with DFlash's drafting cost at width B. A cheaper drafter needs less.
  • Perfect blocks maximise the state-commit phase (0.11-0.14 ms at every width, evidence/repair/README.md), so the bound is approximate to within about that share of a cycle.

The README does not make the "lower bound" claim, so this concerns only the docstring.

@SamMausberg
SamMausberg merged commit cecdaf3 into main Oct 1, 2026
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…need for 5x (#134, derived)

From evidence/drafter/drafting_requirement.json (no new runs), folded into
the existing Stage A paragraph as two sentences: with the Triton verify
kernel a cycle must commit 61.1 of 64 tokens at B = 64 or 132.2 of 256 at
B = 256, a constant per-position acceptance of at least 0.9985 or 0.9941,
against 0.80-0.91 measured at block 16; with FlashInfer no width suffices
even fully accepted. The top-16 support rate (0.91-0.92 from position 4)
is stated as measured only at the stock block-16 trajectory's cycle
starts, so it bounds neither a selector nor a wide-block drafter. New
register entry drafting-req; the P2 status row gains the requirement.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix F: the per-position acceptance a block drafter would need for 5x (#134, derived)
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