Skip to content

Research notes: narrow value tiles for the fold's verify (#167) and the GDN kernel's DRAM rate (#173) - #187

Merged
SamMausberg merged 2 commits into
mainfrom
paper/fold-tiles
Oct 2, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
paper/fold-tiles

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

Folds two merged results into the research notes: the served timing of patch 0005 (#167) and a correction from the Nsight Compute evidence (#173). Only the notes change; the paper is unchanged.

1. Narrow value tiles for the fold's verify (#167, merged at 7cc3135; drafter's text, verbatim).

  • notes/drafting.tex, paragraph "Exact verification without per-position snapshots". The untested "likely cause" of the fold's small-batch loss is replaced by the measured result of engine patch drafter/0005, which gives the ring-writing verify the snapshot verify's tiles of 4. The fold stays bitwise equal to stock in the kernel check and the matched-pool served checks.
  • Second session at c = 1-8, with the patch:
    • At c = 1 the fold is 1.020 times stock's throughput on block 16 (887 against 870 tokens/s; all four run pairs 1.019-1.020) and 1.012 times on block 8.
    • At c = 8 it is 1.018 and 1.032, against 1.061 and 1.058 without the patch.
    • Between the sessions stock moved by at most 0.8%; the fold fell 3.7% at c = 8 on block 16 (unpaired).
    • The patch also changes the tiles up to 64 sequences, which is untimed. So it is a trade-off by batch size, and the notes' c = 8-32 gains are for the fold without it.
  • notes/stack.tex, levers table (tab:axes), fold row: one clause with the trade-off and the new marker.
  • notes/register.tex: new entry drafter-fold-tiles.

Every number is from evidence/drafter/fold_narrow_tiles/timing/check.json, rounded once, which avoids the double rounding the reviewer flagged on #167. Scope: one session with two runs per arm, so the ranges are within-session spreads; the cross-session changes are unpaired. Nothing is claimed at c >= 16 under the patch.

2. The GDN recurrent kernel's DRAM rate (#173, merged at bab281c).
notes/stack.tex, paragraph "The plain step beyond the head", said the recurrent kernel "streams the state once each way at 92% of the read peak". That figure is modelled bytes (a full read and write of the state) over kernel time: 3.47-3.48 TB/s at B = 32 and 128. Nsight Compute at B = 32 shows that about 27 of the 67 MB the kernel writes are still in L2 when it ends, and DRAM runs at 67% of peak (ncu_key_kernels.json). The sentence now uses the #173 reviewer's replacement, plus its optional bound: about 82% at B = 128 becomes 77-87%, for anywhere from 0 to 60 MB of writes still in L2 (derived). The next clause no longer says the state kernel "runs near" the peak; it says its time matches near-peak traffic for its modelled bytes. New register entry: profile-ncu.

Build. One core, latexmk -g, at 12e04cb (an untimed exclusive hold was running, so niced per the brief).

  • Notes: 53 pages, 0 warnings.
  • Paper: 48 pages, 0 warnings, unchanged.
  • scripts/check_paper_references.py --rev HEAD: clean. The first build caught a register path written as timing/check.json; the checker treats a path containing / as full, so the path is now given in full.

pre-commit: the host-identity guard passed; codespell, run by hand, was clean.

…he GDN kernel's DRAM rate (#173)

drafting.tex: the untested 'likely cause' of the fold's small-batch loss becomes the measured
result of patch drafter/0005 (one session): +2.0% at c = 1 on block 16, but the c = 8 gain
falls from 1.061 to 1.018; a trade-off by batch size, untimed above c = 8. stack.tex: the
recurrent kernel's 3.47-3.48 TB/s is modelled bytes over kernel time, not its DRAM rate;
Nsight Compute shows 67% of DRAM peak at B = 32 with writes still in L2, and a derived 77-87%
at B = 128. New register entries drafter-fold-tiles and profile-ncu.
@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-02T03:59:28.356175Z 12e04cb 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. Breezy!

Reviewed commit: 12e04cb57b

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

Reviewer 2 (paper fidelity). Only the notes change, every number traces to committed evidence with one rounding step, and the scope statements are in place.

Checked

  • Narrow tiles, against evidence/drafter/fold_narrow_tiles/timing/check.json, one session (c = 1-8, order stock, fold, fold, stock):
    • b16 c = 1: ratio 1.0195 -> 1.020, 887.46 against 870.48 tokens/s, pairs 1.0187-1.0203 -> "1.019-1.020".
    • b8 c = 1: 1.0123 -> 1.012.
    • c = 8: b16 1.0180 and b8 1.0320 -> 1.018 and 1.032. The values without the patch, 1.061 and 1.058, come from fold_timing/summary.json.
    • Stock's change between sessions is at most 0.74% (b8 c = 4), so "at most 0.8%" holds. The fold fell 3.7% at c = 8 on b16 (fold_change 0.9627).
    • All 8 ratios exceed 1, with ratio_min > 1 at every point, so "faster than stock at every point" holds for c = 1-8.
    • Foreign CPU mean at most 0.52 cores.
    • "Untimed above c = 8" and "the gains at concurrency 8 to 32 are for the fold without it" carry the scope.
  • GDN DRAM rate, against evidence/profiles/kernel_bandwidth.csv and ncu_key_kernels.json:
    • Served model: 3.468 and 3.481 TB/s at B = 32 and 128.
    • ncu at B = 32: DRAM reads 67.7 MB (the full state) and writes 40.1 MB of the 67.1 MB written, so 27.0 MB of writes never reach DRAM, matching "about 27 of the 67 MB". DRAM runs at 66.6% of the 4.02 TB/s peak, matching "67%".
    • B = 128 (derived): 3.481/4.02 = 87% with nothing held in L2, and (536.9 - 60)/536.9 x 87% = 77% with the whole 60 MB L2 holding writes. So "77-87%", with "about 82%" as the midpoint, holds. 60 MB matches the L2 size in App F.4.
    • The 92% figure is gone, and "runs near it" now reads "time matches near-peak traffic for its modelled bytes".
  • The register entries drafter-fold-tiles and profile-ncu list files and producers that exist at this head.
  • Codex is clean on 12e04cb. Commits are by Samuel Mausberg with no trailers, and the host-identity check is clean.

Optional

Build (CPU window, one core each): at 12e04cb, notes 53 pages and paper 48 pages, with 0 LaTeX warnings and 0 overfull or underfull boxes in both. check_paper_references.py --rev HEAD is clean. I built a trial merge with main 8b49f58, which already contains #182's register edits, and it merges without conflict and builds identically: 53 and 48 pages, 0 warnings, checker clean.

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