Skip to content

Appendix F: integrate the repair oracles (P3 refuted, P2 at its edge) - #61

Merged
SamMausberg merged 3 commits into
mainfrom
paper/appendix-repair
Oct 1, 2026
Merged

SamMausberg merged 3 commits into
mainfrom
paper/appendix-repair

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Integrates the repair results merged in #56 into the paper's Appendix F, the evidence register and the pending list. The main text does not discuss P2 or P3 and is unchanged.

What the appendix now says

  • Test 1, perfect continuations at width B (evidence/repair/stage_a_*, register entry repair-a). Verify-pass times with forced full acceptance on eight MATH-500 problems at concurrency 1: V(B) = 4.78, 7.30, 15.62, 28.10 and 44.82 ms at B = 16 to 256, with a 0.11-0.14 ms state commit. The DFlash-16 baseline is 7.457 ms and 7.675 tokens per cycle, with f = 2.28%, so 5x end to end needs 5.51x in decode. The derived oracle speedups give these verdicts:
    • P3's two-pass design is refuted for the current verifier by its pre-registered rule. Even the ceiling that charges the anchor pass one read of the weights reaches only 4.78x end to end at B = 256. The ceiling charges the audit the measured verify pass, which writes one FP32 state per position. An audit 2.3 ms (5.2% of V(256)) cheaper would reach 5x, and the byte bound on those writes is 4.3 ms. The no-state verify (repair-verifier, pending) therefore also decides P3 for such an audit. (Raised by the Codex review.)
    • P2 meets its target only at the edge. 5.01x end to end needs B = 256 with a free drafter; perfect blocks paying DFlash's own drafting cost reach 4.68x.
    • V(B) grows by about 0.167 ms per token past B = 16; its decomposition is pending.
  • Test 2, one-step form of the sliding variant (one_step_recycling.json, draft_source_accuracy.csv, entry repair-recycle). Recycling the target's suffix predictions accepts 0.52 drafts against 4.44 for fresh DFlash drafts. Keeping the old tail gives 1.11, and the best of the three in hindsight gives 4.55.
  • Method text. It now says that the replay protocol does not start with DFlash at the pin and that the state-write microbenchmark did not finish, so the writes are bounded by their bytes rather than timed.
  • Status table. The P2 and P3 rows now state these results. The section intro says which proposals have results; P6's screen was already integrated with Drafter: card gate, P6 support screen, panel-v2 baselines and output equality #51.
  • Pending list. repair-a becomes repair-verifier: the V(B) decomposition and the reference-continuation acceptance. repair-jacobi (full sweeps), repair-residual (the anchored evaluator, in Repair Stage B: the anchored residual evaluator fails at the operator level #58) and repair-verdict (narrowed) stay pending.

Every number was checked against stage_a_oracle.{json,csv}, stage_a_timing.json, one_step_recycling.json and the repair README.

Validation

  • latexmk -pdf builds 67 pages with no LaTeX or BibTeX warnings. The rebuilt paper.pdf is committed, and I looked at both 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.

Stage A's verify-pass times at block widths 16-256 with forced full
acceptance and the derived oracle speedups refute P3's two-pass design
(ceiling 4.78x end to end at B = 256, below the 5x target) and leave P2
at its edge (5.01x only at B = 256 with a free drafter, 4.68x with
DFlash's drafting cost). One-step recycling of the target's suffix
predictions accepts 0.52 drafts against 4.44 for fresh DFlash drafts.
Both become register entries; the status table and the pending list keep
the verifier decomposition, full Jacobi sweeps, the anchored evaluator
and the remaining verdicts. The PDF is rebuilt.
@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:22:35.069877Z 56e3f65 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.

@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: 56e3f65e94

ℹ️ 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_drafting.tex Outdated
\paragraph{Test 1: perfect continuations at width $B$}\label{sec:repair-stagea} $V(B)$ and $C_{\rm state}(B)$ are measured inside SGLang's DFlash worker in the serving configuration (FlashInfer attention and GDN kernels, CUDA graphs, overlap scheduling, concurrency 1) at block widths $B=16,32,64,128,256$, forcing every verify pass to accept the whole block; the committed tokens are then meaningless, but a pass's cost does not depend on token values. CUDA events around each phase of the cycle give GPU times without host synchronization. SGLang's GDN verify kernels write one FP32 state per verified position and the commit copies the accepted one back; the replay protocol, which keeps per-token inputs and folds the accepted prefix at commit, and a microbenchmark that separates the per-position state writes from the verify arithmetic are timed alongside. Feeding the reference continuation instead of forcing acceptance shows how often a verify pass at width $B$ rejects the plain-decoding continuation; such rejections are the stock noise floor of Appendix~\ref{app:divergence}, not drafting errors. The measurement~\ev{repair-a} ran eight MATH-500 problems of 2,048 tokens at concurrency 1, with verification forced to accept the whole block through the engine's simulated-acceptance setting, in the configuration of the drafter's acceptance runs; foreign CPU load stayed below 0.6 cores. On the same problems DFlash at block 16 takes $C_D=7.457$~ms per cycle and commits $A_D=7.675$ tokens, and prefill and scheduling take $f=2.28\%$ of a request, so a $5\times$ end-to-end gain needs $S_{\rm decode}=5.51$. The verify pass takes $V(B)=4.78$, 7.30, 15.62, 28.10 and 44.82~ms at $B=16$, 32, 64, 128 and 256, and the state commit 0.11--0.14~ms at every width (medians; the p10 and p90 cycle periods are within 1.3\% of the median). An ideal free drafter would reach $S_{\rm a}=3.17$, 4.19, 3.95, 4.41 and 5.53 in decode, and $5\times$ end to end only at $B=256$ (5.01); paying DFlash's own drafting cost at width $B$, perfect blocks reach 4.68 end to end there. For P3, a ceiling that charges the anchor pass a single read of the 8.41~GB of weights at the measured 3.83~TB/s plus writing the anchor cache, and the audit its measured $V(B)$ and commit, reaches 5.24 in decode and 4.78 end to end at $B=256$; an estimate that charges the anchor pass $V(B)$ less a byte bound on its per-position state writes, plus writing the anchor cache, gives 2.90 and 2.78. These are derived from the measured times.

\paragraph{Test 2: Jacobi repair from DFlash windows}\label{sec:repair-jacobi} The second test asks how close exact repair from real DFlash windows gets, with no reference tokens. Every DFlash block $y^{(0)}$ is verified, and then $k$ further full target passes run from the same committed prefix: \emph{recycle} sweeps apply the Jacobi map, and \emph{keep} sweeps replace only the first mismatching token by the target's token and keep the rest of the draft. The pass on the original draft is then re-run and committed, so the trajectory is plain DFlash and each sweep's accepted length is measured on real windows. Re-running a verify pass on the same prefix needs the committed GDN convolution window restored first, because the verify kernel shifts it in place, and the probe checks that the re-run reproduces the first pass's argmax exactly. A sliding variant drafts each new block from the previous pass's suffix predictions and fills the rest with DFlash. Accepted drafts against the number of sweeps, recycle and keep, per block width, are \pend{repair-jacobi}.
By its pre-registered rule, P3's two-pass design is refuted: even with free repair it misses the $5\times$ target at every width. P2 meets its target only at the edge of this test, at $B=256$ with a drafter that costs nothing and every block accepted, so better drafting alone does not give $5\times$ with this verifier. The verifier is the binding constraint: past $B=16$, $V(B)$ grows by about 0.167~ms per extra token, roughly five times what that token's GEMM work and its 48~MiB per-position FP32 state write account for. Its decomposition, by a verify pass without per-position states and Nsight traces at $B=64$ and 256, and the acceptance of the reference continuation per width are \pend{repair-verifier}.

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 Recompute P3's ceiling with an optimized audit

The claimed refutation does not follow from the reported ceiling because it lower-bounds only the anchor pass while charging the audit its measured SGLang cost, even though that cost includes per-position FP32 state writes and the no-state audit decomposition is explicitly still pending. At $B=256$, reducing the 44.82 ms audit by only about 2.33 ms (5.2%) would raise the reported ceiling from 4.78× to the 5× target, while the paper estimates the removable state-write traffic alone at roughly 4.29 ms. Thus a no-state or otherwise optimized audit can overturn this verdict; qualify it as conditional on the current verifier or wait for repair-verifier before declaring P3 refuted.

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, and fixed in 6064454. From stage_a_oracle.json at B = 256: the ceiling's denominator is 47.43 ms, and 5.51x in decode needs 45.10 ms. An audit 2.33 ms (5.2% of V(256)) cheaper would therefore reach the target. The byte bound on the per-position writes is 4.29 ms, and saving all of it gives 5.20x end to end. The evidence README's 50% figure covers only the estimate, which strips the writes from the anchor pass. The text now says the two-pass design misses the target with the measured verify pass as the audit, so by its pre-registered rule it is refuted for this verifier. It gives the 2.3 ms / 4.3 ms arithmetic and states that the no-state verify (repair-verifier, pending) also decides P3 for an audit without those writes. The P3 status row and the pending item say the same. I also corrected the method text: the replay protocol does not start with DFlash at the pin, and the state-write microbenchmark did not finish, so the writes are bounded by their bytes rather than timed.

Address the Codex review of #61. The S_b ceiling charges the audit the
measured verify pass, which writes one FP32 state per position. At
B = 256 an audit only 2.3 ms (5.2% of V(256)) cheaper would reach the
5x target, and the byte bound on those writes is 4.3 ms. So the
refutation holds for this verifier, and the no-state verify pending as
repair-verifier also decides P3 for an audit without those writes.

Also correct the method text. The replay protocol does not start with
DFlash at the pin, and the state-write microbenchmark did not finish,
so the writes are bounded by their bytes. They were not timed.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Reviewed head 6064454 (56e3f65 and 6064454 on main). This integrates the merged #56 repair results into Appendix F and the register. The main text is unchanged.

Numbers. Every number matches the evidence on main, which now includes #58's audit_saving_needed_for_target_us column:

  • The baseline: C_D 7.457 ms, A_D 7.675, f 2.28%, and the 5.51x decode target.
  • V(B): 4.78, 7.30, 15.62, 28.10 and 44.82 ms. The commit takes 0.11-0.14 ms. The p10-p90 spread is within 1.3%.
  • S_a: 3.17, 4.19, 3.95, 4.41 and 5.53. That is 5.01x end to end at B = 256, or 4.68x with DFlash's drafting cost.
  • The P3 ceiling: 5.24x in decode and 4.78x end to end at 3.83 TB/s.
  • An audit 2.3 ms (5.2% of V(256)) cheaper would reach the target. The byte bound on the per-position writes is 4.3 ms (9.6%), giving 5.20x (derived). The estimate needs about half of V(256).
  • 0.167 ms per extra token.
  • Recycling: 0.52, 1.11 and 4.55 against 4.44; 0.45, 1.15 and 3.30 against 3.21; 14% against 84%.

Wording.

  • "Refuted for this verifier", with the audit-without-state-writes case pending as repair-verifier, is the right statement. It matches the corrected evidence README.
  • "P2 meets its target only at the edge of this test" is scoped correctly: a free drafter with every block accepted, at B = 256.
  • The method text now says the replay protocol did not start and the state microbenchmark did not finish, rather than that both were timed.

Register.

Build. I rebuilt from source: 67 pages, no warnings, and the text matches the committed paper.pdf. Page 11 starts with References, so the main body is unchanged at 10 pages. check_paper_references.py passes against main.

Codex. The P1 comment on 56e3f65 (the ceiling with an optimized audit) is addressed in 6064454, with the arithmetic given in the reply.

Follow-up, not blocking. Now that #58 has merged, a later pass can add Stage B (operator-level failure) to the P3 status row and turn repair-residual from pending into evidence.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Approving head a7aefa0. It merges main (f643cc4, which includes #57, #58, #60 and #63) into the approved 6064454, and it is a pure merge plus a PDF rebuild:

  • Sources. Against f643cc4, the merge changes only app_drafting.tex and app_register.tex, and those changes are line for line the ones reviewed in 6064454. Against 6064454, the other 48 changed files are main's own changes.
  • PDF. paper/paper.pdf was the only conflict. I rebuilt it from a7aefa0's sources: 67 pages, no warnings, and the text is identical to the committed PDF. That PDF includes Align Figure 3's two panels on one title line and a shared vertical centre #63's realigned Figure 3, on page 9. Page 11 starts with References, so the main text ends on page 10.
  • References. check_paper_references.py passes.

My review of 6064454 (#61 (comment)) applies unchanged.

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