Skip to content

Appendix E: integrate the moonshot phase-3 results (#60) - #71

Merged
SamMausberg merged 2 commits into
mainfrom
paper/appendix-moonshot
Oct 1, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
paper/appendix-moonshot

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

Integrates the moonshot results merged in #60 into Appendix E, the status table and the evidence register. The main text is unchanged.

What the appendix now says

  • P4 at kernel level (E.5; gdn_exact_replay_check_*.json, gdn_exact_replay_bench.json; new entry p4-replay):
    • Rounding-preserving replay is bit-exact against SGLang's packed decode on synthetic activations, one layer at a time. Over 48 steps at batch 8, 0 of 201,326,592 state words and 0 of 1,572,864 output words differ, at m = 4 and 16 on layer 0 and m = 4 on layer 20. SGLang's replay differs in 465,102 output words (30%).
    • The kernel is 1.215x faster at batch 128 and 1.227x at batch 256 with m = 4; m = 8 and 16 are no faster.
    • With f = 41.6%, that predicts about 1.08x end to end (less with 2,048-token prompts), below the pre-registered 1.10x.
    • moonshot-p4 now covers only the end-to-end bitwise check through the server and the pre-registered paired timing. The scope ("one layer at a time on synthetic activations") is stated, as the moonshot workstream asked.
  • Host-gap lever (E.6; host_levers.csv; entry host-levers). Triton attention for target and draft removes FlashInfer's host planning. MTP gains 1.18x in per-request rate at c=1 and 1.14x in throughput at c=4, with unchanged acceptance; draft-only Triton gains 1.08x and 1.06x (single runs). Draft-only is exact; target Triton is pending (bench-equality, following the Moonshot: P4 strict replay is bit-exact (1.22x kernel), host-gap flag 1.18x, P7 rejection tests #60 ruling). The plan stream fails on this hybrid model.
  • Block-parallel GDN verification (E.4; p7_*.json; entry fast-verify). SGLang's chunked kernel differs from the packed decode in 52-55% of BF16 output words and is slower than the recurrent verify at every width up to 256 at one request (815-990 µs against 75-378 µs). The text gives no P-number, because TASKS.md uses "P7" for two different items.
  • Hot-map coverage (E.6; token_map_coverage.csv; entry token-map): 97.5% of held-out output tokens with 22,936 rows, 96.4% with 16,384 and 89.1% with 4,096.
  • MTP cycle at c=128 (E.4; README 2b and the tuning points; entry spec-cycle). The implied cycles of 43.5 and 35.0 ms against derived parts of 21.7 and 13.2 ms are a factor of 2.0-2.7 apart. Replay's 8.5 ms saving matches the 252 MB per request it removes.
  • Status table and levers table. P4 reads "Bit-exact at kernel level; kernel 1.22x; derived about 1.08x, below the target; served test pending". The system-overheads row carries the Triton result. The strict-replay ceiling stays 1.18x (traffic only, f = 0.4157), as agreed with the moonshot workstream.

Every number was checked against the committed JSON and CSV files and the moonshot README.

Validation

  • latexmk -pdf builds 71 pages with no LaTeX or BibTeX warnings. The main text ends on page 10. The rebuilt paper.pdf is committed, and I looked at every changed page.
  • 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.

P4 now reports its kernel-level result. The replay is bit-exact against
the packed decode on synthetic activations, one layer at a time: 0 of
201,326,592 state words and 0 of 1,572,864 output words differ, at
m = 4 and 16. SGLang's replay differs in 30% of output words. The
kernel is 1.22x faster at batch 128 and 256 with m = 4, which predicts
about 1.08x end to end, below the pre-registered 1.10x. moonshot-p4
narrows to the server bitwise check and the paired timing.

Appendix E also gains:
- the host-gap lever: Triton attention, MTP 1.18x at c=1 and 1.14x at
  c=4; draft-only 1.08x, which is exact; target Triton pending;
- the negative result for SGLang's chunked GDN kernel as a
  block-parallel verify path;
- the hot-map coverage of held-out outputs;
- the derived decomposition of the MTP cycle at c=128, whose measured
  time is 2.0-2.7x its byte-and-FLOP parts.

The register gets five entries (p4-replay, host-levers, fast-verify,
token-map, spec-cycle), and the P4 status row and the levers table are
updated.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Reviewed head c40bb74: one commit on f6c690f that integrates #60 into Appendix E and the register. The main text is unchanged.

Numbers. All of them match main's evidence/moonshot/ and evidence/bench/tuning/points.csv:

  • P4 at kernel level.
    • 0 of 201,326,592 state words and 0 of 1,572,864 output words differ, at m = 4 and 16 on layer 0 and m = 4 on layer 20, on synthetic activations.
    • ReplaySSM differs in 465,102 words (29.6%).
    • The kernel is 1.215x and 1.227x faster at B = 128 and 256 with m = 4, and m = 8 and 16 are no faster.
    • Derived about 1.08x at f = 0.416, below the 1.10x target. The served bitwise check and the paired timing stay pending.
  • Host gap. 1.18x per-request rate at c = 1 and 1.14x throughput at c = 4 with Triton for target and draft; 1.08x and 1.06x for the draft alone. The draft-only change is exact, and target Triton is pending bench-equality, matching Moonshot: P4 strict replay is bit-exact (1.22x kernel), host-gap flag 1.18x, P7 rejection tests #60's classes.
  • The chunked GDN kernel. 52-55% of BF16 words differ. 815-990 us against 75-378 us. Scoped to one layer, synthetic inputs and one request, with a purpose-built kernel untested.
  • Hot maps. 97.5 / 96.4 / 89.1% for 22,936, 16,384 and 4,096 rows (token_map_coverage.csv; 0.9635 rounds to 96.4). The maps are built on the tune split and measured on confirmation outputs.
  • MTP cycle at c = 128. 43.5 and 35.0 ms against 9.5 ms. The derived parts sum to 21.7 and 13.2 ms (6.6 + 1.7 + 1.5 + 11.9 or 3.4), replay saves 8.5 ms, and the measured cycle is 2.0-2.7x the sum. Each step is labelled derived where it is one.

Register. The new entries (p4-replay, host-levers, fast-verify, token-map, spec-cycle) cite files and scripts that exist on main. The P4 status row and moonshot-p4's narrowed pending text are right.

Build. I rebuilt from source: 71 pages, no warnings, and the text matches the committed PDF. The main text ends on page 10, check_paper_references.py passes, and Codex had no comments.

Merge note. The branch is behind main, which now has #69 and its register edits. Merge main and rebuild the PDF; I'll confirm the merge commit contains only the merge and the rebuild.

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

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

\evitem{p4-replay}{Rounding-preserving replay (P4) against the packed decode, per word, and its kernel time by ring length (Appendix~\ref{app:minimal-state})}{\nolinkurl{evidence/moonshot/gdn_exact_replay_check_L4.json}, \nolinkurl{gdn_exact_replay_check_L16.json}, \nolinkurl{gdn_exact_replay_check_L4_layer20.json}, \nolinkurl{gdn_exact_replay_bench.json}}{\nolinkurl{experiments/moonshot/gdn_exact_replay_check.py}}
\evitem{host-levers}{Triton attention for the MTP cycle's target and draft at concurrency 1 and 4, single runs}{\nolinkurl{evidence/moonshot/host_levers.csv}, \nolinkurl{README.md}}{\nolinkurl{experiments/moonshot/lever_sweep.py}, \nolinkurl{levers.py}, \nolinkurl{summarise.py}}
\evitem{fast-verify}{SGLang's chunked GDN kernel as a block-parallel verify path: BF16 disagreement and time by block width}{\nolinkurl{evidence/moonshot/p7_fast_verify_check.json}, \nolinkurl{p7_verify_width_bench.json}}{\nolinkurl{experiments/moonshot/gdn_fast_verify_check.py}}
\evitem{token-map}{Coverage of hot draft-vocabulary maps on held-out outputs}{\nolinkurl{evidence/moonshot/token_map_coverage.csv}}{\nolinkurl{experiments/moonshot/build_token_map.py}}

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 Register the actual token-map generator

The registered script cannot reproduce the cited coverage evidence: build_token_map.py randomly holds out part of its own calibration outputs, pads maps to the fixed MAP_SIZES (including 32,768), and writes token_map_report.json, whereas token_map_coverage.csv evaluates pre-existing tune maps on the confirmation sweep and includes an unpadded 22,936-row map. A reader following this evidence entry therefore cannot regenerate either the CSV or the 97.5% result; register the bench map-building/evaluation command or add a generator that consumes the confirmation outputs and emits this CSV.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

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:54:26.695019Z c40bb74 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.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Approving head be18f97. It merges main at 43ec1d7 (#69, #70) into the approved c40bb74.

  • Pure merge. I re-did the merge locally. The only conflict is paper/paper.pdf, and every other path is identical to be18f97. app_register.tex keeps both PRs' entries.
  • PDF rebuild. I rebuilt the PDF from be18f97: 72 pages, no warnings, and the text matches the committed PDF. The main text ends on page 10, and check_paper_references.py passes.

My review of c40bb74 applies unchanged. The moonshot agent's three precision edits will come as a separate PR.

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