Skip to content

Paper: the DFlash cycle split (Figure 1 bar, Appendix E.2, head ceiling; fold #192) - #205

Merged
SamMausberg merged 1 commit into
mainfrom
paper/profile-fold
Oct 2, 2026
Merged

SamMausberg merged 1 commit into
mainfrom
paper/profile-fold

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

#192 committed the profile of the DFlash speculative cycle on the two tuned DFlash arms (evidence/profiles/, README section "DFlash speculation on the bench's tuned arms"). The paper profiled only plain decoding and MTP. This PR folds the DFlash split in. Its main-text cost is one bar in Figure 1 and one caption clause; the details go to Appendix E.2.

What changes

  • Figure 1 (figures/breakdown.tex). A third group gets one bar: the tuned DFlash arm with 16-token blocks at B = 1. The bar is read from the first row of evidence/profiles/dflash_breakdown.csv (config dflash-tuned-b16-1): target head 4.83%, draft heads 4.68%, target GEMMs 33.65%, other kernels 53.47% (drafter layers, GDN, attention, small kernels) and idle 3.37%. The right-hand column prints "4.8 + 4.7%", computed from the microseconds in step_share.csv like the other rows. F1's style is unchanged. The plot is 0.48 cm taller, which keeps its scale. The bar's idle segment is not hatched, because that arm is GPU-bound and tracing does not inflate its idle. Two technical points:

    • The config name contains hyphens, which \vpsplitconfig cannot split, so the bar's arm and batch for the lookup and its tick label are set explicitly.
    • The DFlash file's other rows are read but not plotted (skip coords between index={8}{100}).
  • Figure 1 caption. "DFlash: the tuned arm with 16-token blocks, which is GPU-bound." The idle sentence now says "the MTP heads' shares", because tracing inflates only MTP's idle.

  • Appendix E.2, new paragraph "DFlash speculation" (all from the README):

    • The cycle structure: the head is streamed twice per cycle.
    • The heads take 4.8% and 4.7% of the traced cycle at B = 1. Over the untraced cycle, itself an estimate, that is 9.3% (derived), so removing both heads is worth at most 1.10x and a half-byte head at most 1.05x (derived; 1.08-1.10x at B = 4-64).
    • The verify forward takes 66-73% of the cycle. Triton extend attention takes 30% of the traced cycle at B = 1 and 14% at 64; the GDN verify kernel takes 36% at 64, 40% with the commit.
    • The block-16 arm has no host gap: launches run 0.75-1.06 of a cycle ahead, and the GPU is busy 96.6-98.8%. The block-8 arm keeps one: 1.0-1.9 ms traced, at most about 0.66 ms untraced at B = 1 (derived, an overestimate).
    • The workload caveat: the profile's prompts accept 2.5-3.8 tokens per cycle, against 6.2 and 5.0 on the drafter's panel, so the cycle's composition carries over but its per-token rates do not.

    "What the attribution decides" adds the DFlash ceiling, 1.10x at B = 1, derived from an estimated untraced cycle.

  • Register. A new evidence entry, profile-dflash, lists the README, dflash_cycle.json, dflash_cycle.csv, dflash_breakdown.csv, step_share.csv, attribution/ and windows/, produced by dflash_cycle.py and attribute.py.

  • Research notes: reviewer 1's optional items on Research notes: P4's served test rejects the 1.10x claim (fold #191) #202. The P4 probe's sentence now adds that SGLang's replay path, FP16 state and BF16 state "all three changed the top-20 log-probabilities" (p4_output_probe.csv, gen_kl_mean above 0), and summarise.py joins the producers of moonshot-p4.

Wording kept from the review of #192

The untraced head share (9.3%) is labelled derived, because the untraced cycle is an estimate. The block-16 host runs 0.75-1.06 of a cycle ahead. The block-8 untraced gap is an overestimate. No sentence claims a host gap on block 16 or compares this cycle's per-token rates with the frontier's.

Build

Built locally at f728b50, on main 60cf549 (PDFs not committed):

Check Result
LaTeX warnings, paper / notes 0 / 0
Pages, paper / notes 50 / 54
Main text the Conclusion and the References heading on p10
Combined with #199 (P2, open) the Conclusion still ends on p10 (at its foot) and References start on p11, as with #199 alone
scripts/check_paper_references.py --rev HEAD clean
numdiff against origin/main 0 numbers lost. numdiff lists 30 added or increased kinds (0.66 0.75 1.0 1.05 1.06 1.08 1.10 1.9 132 14 15 16 2.5 3.8 30 36 360 4 4.7 4.8 40 5.0 6.2 64 66 73 8 9.3 96.6 98.8), all from the DFlash section of evidence/profiles/README.md
Figure 1 checked at 200 dpi: the DFlash bar sits in its own group below MTP; "4.8 + 4.7%" at the right; no hatching; legend and axis unchanged
pre-commit, host-identity check passed

#204 (F2) adds a trailing % to the last line of breakdown.tex and to the \input{figures/breakdown} line next to the caption this PR edits. Whichever merges second keeps both.

Ledger rows
id where change source
PF-1 Fig 1 DFlash-16 B = 1 bar and "4.8 + 4.7%" dflash_breakdown.csv row 0, step_share.csv (dflash-tuned-b16, 1)
PF-2 Fig 1 caption DFlash clause; "MTP heads' shares" README DFlash section, "Profiler perturbation"
PF-3 App E.2 DFlash paragraph README DFlash section tables and text
PF-4 App E.2 "What the attribution decides" DFlash ceiling 1.10x (derived) README, "Ceiling 1 / (1 - f)" row
PF-5 register profile-dflash evitem files above
PF-6 notes P4 probe controls changed top-20 log-probabilities; summarise.py producer p4_output_probe.csv; README section 4

… ceiling (fold #192)

Figure 1 gains a bar for the tuned DFlash arm with 16-token blocks at B = 1, read from the
first row of evidence/profiles/dflash_breakdown.csv, with its head shares (4.8% verify, 4.7%
draft) from step_share.csv. Its idle is not hatched: that arm is GPU-bound. Appendix E.2
gets a DFlash paragraph from the profiles README: the head chains take 9.3% of the
untraced cycle at B = 1 (derived from an estimated cycle), so removing them is worth at most
1.10x; Triton extend attention takes 30% of the traced cycle at B = 1; the GDN verify kernel
36% at B = 64; the block-16 arm has no host gap and the block-8 arm keeps one; the profile's
prompts accept 2.5-3.8 tokens per cycle, so per-token rates are not the frontier's. New
register entry profile-dflash.

Also reviewer 1's optional items on #202 (research notes): the P4 probe's controls all
changed the top-20 log-probabilities, and summarise.py joins moonshot-p4's producers.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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-02T11:04:11.461110Z f728b50 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.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: f728b5060c

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

I checked every number and label against evidence/profiles as merged in #192 (31e056e, with the derived-share, cycle-lead and estimate corrections), and built both documents from a fresh worktree.

  1. Figure 1, DFlash bar. It plots row 0 of dflash_breakdown.csv (dflash-tuned-b16-1):
    • The segments are head 4.83, draft head 4.68, target GEMMs 33.65, other kernels 53.47 (19.36 + 10.87 + 18.70 + 4.54) and idle 3.37, summing to 100.
    • The annotation "4.8 + 4.7%" comes from step_share.csv: 385.5 and 373.2 us of a 7,975.9 us cycle.
    • The plot is 2.35 -> 2.83 cm tall over 7.8 -> 9.4 axis units, so 0.301 cm per unit before and after: the same scale.
    • The idle segment is not hatched, which is right. This arm is GPU-bound: busy 96.6%, and its traced cycle is 2.2% shorter than the untraced one.
    • skip coords between index={8}{100} keeps the file's other DFlash rows out. I rendered page 2: the bar, its tick label and the annotation read correctly.
  2. The caption clause ("DFlash: the tuned arm with 16-token blocks, which is GPU-bound") and the narrowing to "the MTP heads' shares" are both accurate.
  3. App E.2, "DFlash speculation", against dflash_cycle.csv and the attributions:
    • Heads: 4.8% and 4.7% traced, each a 360 us GEMM.
    • 9.3% of the untraced cycle, "itself an estimate", with ceilings 1.10x and 1.05x and 1.08-1.10x at B = 4-64 (1.095, 1.079, 1.091), all under "(derived; ...)".
    • Verify forward 66% / 73%.
    • Triton _fwd_kernel: 16 and 32 CTAs at B = 1, 30% at B = 1 (1,447 + 955 us) and 14% at 64 (3,157 + 4,226 us).
    • GDN verify 36% at B = 64, 40% with the commit.
    • No host gap on b16: the lead is 0.75-1.06 of a cycle and busy 96.6-98.8%.
    • b8 idles 1.0-1.9 ms per traced cycle (0.999-1.852) and at most about 0.66 ms per untraced cycle, "(derived, an overestimate)".
    • Acceptance 2.5-3.8 against 6.2 / 5.0 (6.18, 5.04 pooled).
      "What the attribution decides" adds 1.10x for DFlash at B = 1, "derived from an estimated untraced cycle". All of these match.
  4. The profile-dflash entry lists the README, dflash_cycle.{json,csv}, dflash_breakdown.csv, step_share.csv, attribution/ and windows/, all at origin/main. Both of my optional Research notes: P4's served test rejects the 1.10x claim (fold #191) #202 items are in: "all three changed the top-20 log-probabilities" and summarise.py.
  5. Build, from paper/: latexmk -pdf paper.tex, then latexmk -pdf notes/research_notes.tex.
    • The paper is 50 pages and the notes 54, each with 0 LaTeX, package or class warnings and 0 overfull, underfull or undefined.
    • The main text ends with 8 Conclusion on page 10. Limitations precedes it on the same page, and References start lower on page 10.
    • scripts/check_paper_references.py is clean, with and without --rev f728b50.

Optional:

  • In "DFlash speculation", "(derived)" right after "9.3%" would match the evidence README, where the label sits on the share itself. The present sentence-final "(derived; ...)" does cover it.
  • "So the cycle's composition carries over" is a little stronger than the evidence, which says the composition "depends little on acceptance; only the GDN commit and the drafter's KV projection grow with the accepted tokens". "Largely carries over" would match.
  • The profile-dflash producers could add summarize.py, which writes dflash_breakdown.csv and step_share.csv, and run_profiles.py / collect_run.py, which write windows/.

Codex found no major issues at f728b50. The diff contains no host identity, and the commit has no attribution lines.

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