Skip to content

Pins and contract text: FlashAttention 4 runs here; the start-up self-test re-checks only gathered entries - #172

Merged
SamMausberg merged 2 commits into
mainfrom
paper/pins-fa4
Oct 2, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
paper/pins-fa4

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

Two committed statements disagreed with the evidence. This PR corrects them in the paper, the research notes and one evidence README.

1. FlashAttention 4 does run on this host. The pins table (Appendix F.4), the notes' drafter section and evidence/drafter/README.md said that FA3 and FA4 are both unavailable on this aarch64 machine. FA3 is unavailable (SETUP.md: the aarch64 sglang-kernel wheel has no flash_ops). FA4 is not:

  • Bench's dflash-tuned arm (bench/arms.toml:186) passes --speculative-draft-attention-backend fa4. With that flag it launched, passed its launch checks (CUDA graphs including the draft verify graph, overlap scheduler) and served valid points in the tuning slot T3 and in all three confirmation sessions. See evidence/bench/tuning/launches.csv, evidence/bench/confirm/launches.csv, evidence/bench/README.md (T3 table: block 8 with FA4 draft attention 769 tok/s at c=1, against 686 for FlashInfer draft attention), evidence/drafter/fold_timing/launch/b8-*.json, and evidence/hostgap/README.md and evidence/stack/README.md, which already say so.
  • At the pinned SGLang commit, _resolve_dflash_draft_attention_backend keeps fa4 on CUDA, because it is in DRAFT_ATTENTION_BACKEND_CHOICES. It falls back only for out-of-tree platforms or a backend outside the list. The fa4 backend is FlashAttentionBackend(fa_impl_ver=4). flash-attn-4 4.0.0b19 is in SETUP.md's package list. None of the committed launch records stores the resolved draft backend; the conclusion rests on the flag, the successful launches and the code.

What changed:

  • paper/sections/app_register.tex, the Engine row: FlashAttention 4 (flash-attn-4 4.0.0b19) is listed as the DFlash drafter's attention in one tuned serving configuration; only FlashAttention 3 is unavailable.
  • paper/notes/drafting.tex: the DFlash model card's TRT-LLM target attention is Blackwell-only, and its piecewise prefill graph fails here. Its FA4 draft attention does run here, and one tuned configuration uses it. The acceptance runs use FlashInfer.
  • evidence/drafter/README.md:15: the same correction at the source. The card's TRT-LLM attention does not run here. The acceptance runs replace FA4 with FlashInfer, but FA4 itself runs (bench's dflash-tuned).

2. The start-up self-test checks only the entry-subset case. Section 2.3, Table 1 and Table A.1 said that a start-up self-test re-checks the per-position invariance measured at 20 batch sizes. CertifiedHead.column_invariance_self_test compares the stock logits of the gathered candidate rows with the same columns of the full head, at the same batch shape (M x 64M). It does not compare rows across batch sizes. Those are measured once, in stock_invariance.json (rows_equal_to_m1_*; the gathered shape is gathered_candidates_equal). The paper text now says which part is re-checked. This is the same correction Codex and the reviewer asked for on #169 (head_geometry README).

Build (CPU window, core 63, latexmk -g, at 134e55e):

  • paper: 48 pages, 0 LaTeX warnings, 0 overfull or underfull boxes; the main text ends on p10 and References start in p10's right column, unchanged from main.
  • notes: 52 pages, 0 warnings.
  • scripts/check_paper_references.py --rev HEAD: clean, with no register path missing and no marker without an entry.
  • Rendered and checked: p4 (§2.3), p5 (Table 1, row still fits its column) and p46 (pins table).

pre-commit was run on the changed files (only the host-identity guard applies under paper/ and evidence/), and it passed.

…hAttention 3 is unavailable

The pins table (Appendix F.4), the research notes' drafter section and the drafter
evidence README said FA4 does not run on this aarch64 host. Bench's dflash-tuned arm
runs DFlash draft attention with --speculative-draft-attention-backend fa4 on it: the
tuning (slot T3) and the three confirmation sessions launched and served with that flag
(evidence/bench/tuning/launches.csv, evidence/bench/confirm/launches.csv,
evidence/bench/README.md), and SGLang at the pin passes fa4 to its FlashAttention v4
backend on CUDA without a fallback. FA3 stays unavailable (SETUP.md).
… the entry-subset property

column_invariance_self_test compares the stock logits of gathered head rows with the same
columns of the full head at the same batch shape. The 20-batch-size row invariance is a
one-off measurement (evidence/certified_head/stock_invariance.json). Section 2.3, Table 1
and Table A.1 said the start-up test re-checks both.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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-02T01:28:46.248649Z 134e55e 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

Copy link
Copy Markdown

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

Reviewed commit: 134e55e55f

ℹ️ 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 added a commit that referenced this pull request Oct 2, 2026
Review of 84ffb44. H4's derived 3.4-3.5% uses the W8A16 pass at
0.66-0.67 of the stock head at M = 1 (setup.tex), not the best-mode
column in H3, which includes W8A8 timed on the earlier TMA tiles; both
cells now say which mode they use. P3's 33-44% is scoped to replay 1
(24-35% on replay 2), the frontier's 1.9% is called a coefficient of
variation, and hostgap's token-identical outputs say logprobs were not
compared. The in-flight section and the agent-dependent rows move to
01:30 UTC: s1 and s2 done, #167's timing running, the first served
certified-head hold queued after s3, #169 merged, #171 and #172 open,
and the paper, state, profile and redteam work active.

The commit skips the hook because a timed hold is running; pre-commit
on this staged file is queued in the CPU window.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE at 134e55e

FlashAttention 4 runs here. I checked this against the committed launch evidence and the pinned engine.

  • bench/arms.toml:186 gives dflash-tuned --speculative-draft-attention-backend fa4.
  • evidence/bench/tuning/launches.csv (T3, tune-dflash-b8-noradix-fa4) and the three dflash-tuned rows of evidence/bench/confirm/launches.csv record that flag, with checks_failed empty and engine bd66ce34. The T3 table in evidence/bench/README.md:538 has valid FA4 points at c = 1, 32 and 128.
  • At bd66ce34, _resolve_dflash_draft_attention_backend (speculative_hook.py:790) and _resolve_draft_attention_backend_fallback (draft_worker_common.py:47) keep fa4 on CUDA, because it is in DRAFT_ATTENTION_BACKEND_CHOICES. fa4 constructs FlashAttentionBackend(runner, fa_impl_ver=4) (attention_registry.py:254-260).
  • flash-attn-4 4.0.0b19 is installed in the SGLang venv (dist-info dated 2026-09-30 17:34 UTC, before T3 ran at 00:51 on 10-01).
  • No other committed file still says FA4 is unavailable. The notes' serving table already lists the FA4 configuration (serving.tex:53), and evidence/hostgap/README.md already said dflash-tuned runs its draft with FA4.

Self-test wording. contract.tex:52, the contract.tex:69 row and app_proofs.tex:24 now match what the code and evidence show. stock_invariance.json measures both properties at 20 batch sizes (rows_equal_to_m1_*, column_subset_equal, gathered_candidates_equal). column_invariance_self_test re-checks only the gathered shape, at the batch sizes passed to enable_column_fallback.

Build. I built 134e55e myself in a CPU-window hold (01:48 UTC):

  • paper 48 pages, notes 52 pages;
  • 0 warnings, 0 overfull or underfull boxes, no undefined references;
  • the Conclusion and the References heading are both on p10, so the main text is within 10 pages;
  • check_paper_references.py --rev 134e55e is clean.

A word-level diff of the extracted text against my fresh build of main (2367122) shows exactly this PR's wording changes in both documents; every other difference is reflow (column and page-header positions). Codex found no major issues on 134e55e. Host identity is clean. Both commits are authored and committed by Samuel Mausberg.

Optional (not blocking)

  1. contract.tex:52 (text this PR edits) describes the per-position fallback as "finishes one undecided position with a stock matmul over its gathered candidate entries" and says it is "exact only if a position's BF16 logits stay the same when the rest of the batch, or the set of entries computed, changes". The code runs one GEMM over the whole batch: _column_fallback multiplies all M rows by every row's gathered entries (M x 64M) at the same M and keeps each row's own block. So the rest of the batch never changes, and only the entry-subset property is needed. evidence/head_geometry/README.md (head_geometry README: cite the committed evidence for the Hopper model and row invariance #169) now says the column fallback "relies on column-subset invariance". The paper's condition is stronger than needed, so it is safe, and the evidence covers both properties. Aligning the description and the "only if" with the code in a later paper PR would remove the mismatch. The same applies to "do not depend on the other positions of the batch" in app_proofs.tex:24 and contract.tex:69.
  2. PR body only: the 686 tok/s comparison is slot T2's FlashInfer block-8 row (evidence/bench/README.md:520), not the T3 table. The committed text does not cite it.

@SamMausberg
SamMausberg merged commit 42714f5 into main Oct 2, 2026
SamMausberg added a commit that referenced this pull request Oct 2, 2026
…ble 1 pointer closes the contract paragraph

Title (Sam's choice): "The Work a Verifier Needs: Certified Int8 Output
Heads That Match a Production Kernel's Rounding" in \mlsystitle and the PDF
metadata; the running head is unchanged.

Limitations, "The error model is an assumption": says that the Hopper
model comes from measurements of the warp-level mma path and that the stock
kernel's instructions are unchecked against it; the two "Agreement"
openings become one; the FP32-output variant is named briefly (Section 4.3
introduces it in the next pass).

Section 2.3: the Table 1 sentence becomes the last sentence of the
contract paragraph (after #172's merge).
SamMausberg added a commit that referenced this pull request Oct 2, 2026
…ble 1 pointer closes the contract paragraph

Title (Sam's choice): "The Work a Verifier Needs: Certified Int8 Output
Heads That Match a Production Kernel's Rounding" in \mlsystitle and the PDF
metadata; the running head is unchanged.

Limitations, "The error model is an assumption": says that the Hopper
model comes from measurements of the warp-level mma path and that the stock
kernel's instructions are unchecked against it; the two "Agreement"
openings become one; the FP32-output variant is named briefly (Section 4.3
introduces it in the next pass).

Section 2.3: the Table 1 sentence becomes the last sentence of the
contract paragraph (after #172's merge).
SamMausberg added a commit that referenced this pull request Oct 2, 2026
…ble 1 pointer closes the contract paragraph

Title (Sam's choice): "The Work a Verifier Needs: Certified Int8 Output
Heads That Match a Production Kernel's Rounding" in \mlsystitle and the PDF
metadata; the running head is unchanged.

Limitations, "The error model is an assumption": says that the Hopper
model comes from measurements of the warp-level mma path and that the stock
kernel's instructions are unchecked against it; the two "Agreement"
openings become one; the FP32-output variant is named briefly (Section 4.3
introduces it in the next pass).

Section 2.3: the Table 1 sentence becomes the last sentence of the
contract paragraph (after #172's merge).
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