Skip to content

Head geometry: MTP-4B alignment, drift ratio and self-evidence - #62

Merged
SamMausberg merged 2 commits into
mainfrom
geometry/mtp4b-breadth
Oct 1, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
geometry/mtp4b-breadth

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

Commits the MTP-4B outputs of the geometry workstream's queued CPU analyses (the job finished at 03:05 UTC on 2026-10-01) and adds their results to evidence/head_geometry/README.md. No code changes: every file was produced by the committed scripts listed in the README's Files table.

  • Alignment (alignment_mtp4b.json): over 30,328 verify blocks and 121,312 draft rows, the FP64 argmax equals the engine's draft token at 99.08% and the target's at 99.33%. Every disagreement is within one BF16 spacing, R-bf16 reproduces the engine at 99.997% / 99.998%, and the accept lengths match on all blocks.
  • Drift ratio (rho_mtp4b.json, 40,000 held-out pairs): median 0.954 (p10 0.767, smallest 0.385), against the per-row int8 threshold of 0.0085. Certified l2 transport and the static screen skip 0.08% of rows.
  • Self-evidence (selfevidence_mtp4b.json): int8 per-row needs 1.51 candidates on average on the verify rows a greedy verifier needs (p99 7). There are 0 envelope violations and 0 missed winners. Under the R-stock gap rule, the stock kernel is needed for 4.04% (conservative) / 2.84% (Hopper model) of verify rows.
  • Correction: DFlash-4B transport covers 4,020 pairs, not 4,000 (outcome counts 968 + 243 + 2,809).

Checks run:

  • no Traceback in the four analysis logs;
  • checks reports 0 violations and 0 missing winners for both sets;
  • the pairs CSV is 763 KB.

The CPU analyses queued by the geometry workstream: the MTP-4B capture
reproduces the engine's draft and target decisions (all disagreements within
one BF16 spacing), its drift ratio has median 0.95 on 40,000 held-out pairs,
and int8 self-evidence certifies the verify rows a greedy verifier needs with
1.5 candidates on average, with no envelope violation. Also corrects the
DFlash-4B transport pair count to 4,020.
@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:26:26.576535Z ec1211f 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: ec1211f656

ℹ️ 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 on lines +305 to +308
| verify, needed | int8 per-row, row CS | 1.51 | 1 | 7 | 18 | 76.1% |
| verify, needed | int8 g128, blockwise | 1.33 | 1 | 5 | 12 | 80.9% |
| verify, after the first rejection | int8 per-row, row CS | 2.44 | 2 | 11 | 22 | 49.1% |
| draft, needed | int8 per-row, row CS | 2.44 | 1 | 15 | 38 | 57.4% |

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 Label the envelope that produced these candidate counts

For the three int8 per-row, row CS entries, the conditional values in selfevidence_mtp4b.json were actually generated only when env == 'min' in analyze_selfevidence.py; the CSV confirms that the int8-row minimum follows the block-L2 result and differs from row CS (for example, 1.767581 versus 1.793017 over all verify rows). These rows therefore attribute the stronger elementwise-minimum results to the row-CS envelope and do not substantiate the stated mechanism. Either label them as the minimum/blockwise envelope or export the conditional row-CS counts.

Useful? React with 👍 / 👎.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head ec1211f: one commit with evidence only, the MTP-4B CPU analyses plus README sections. Every number checks out. One sentence states an untraced mechanism, and my reproduction of three of the files is still queued.

Check 1: README numbers against the JSON (all correct)

  • alignment_mtp4b.json.
    • 30,328 blocks and 121,312 draft rows.
    • FP64 argmax agreement 99.08% (draft) and 99.33% (target), with 1,116 and 816 disagreements, all within one BF16 spacing.
    • R-bf16 99.997% / 99.998%, and the accept lengths match on all 30,328 blocks.
    • Draft agreement 99.31% at step 1 and 98.90% at step 4. Acceptance given reached: 84.5, 80.0, 79.5 and 80.6%.
    • Engine top-two tie 1.34%. Identical outputs 41.9%, with median first divergence 193.5 (written as 194).
  • rho_mtp4b.json.
    • Every cell of the five-row quantile table matches (for example, all: 0.385 / 0.767 / 0.954 / 1.174 / 1.481). Domain medians are 0.917-1.025.
    • Transport is narrower than int8 per row on 0.077% of rows in every group.
    • rho_head_centred median 0.879. rho_sub64 0.864, with sub64_share_of_delta 0.2305.
    • Realized tile ratio 81.08, and realized transport smaller on 0.84% of rows.
    • Certified transport and the static l2 screen skip 0.077%. Oracle radii skip 99.974% at the median and 98.6% at p10. int8 per-row self-evidence skips a median of 1.0.
  • selfevidence_mtp4b.json (by_reached, rstock_fallback_share).
    • The table's five rows match: needed verify rows for int8 per-row and g128, 1.51 and 1.33, with 76.1% and 80.9% at one candidate; verify rows after the first rejection, 2.44; needed draft rows for int8 per-row and g128, 2.44 and 1.80.
    • R-stock fallback on verify rows: tensor_core_model 4.04% and gamma_1.19e-4 2.84%. On draft rows: 6.44% and 4.20%.
    • 4,010 verify rows (2,901 needed) and 4,024 draft rows (2,997 needed). No violations and no missing winners.
  • The 4,020 correction. transport_dflash4b uses 4,020 pairs, because --max-rows 4000 rounds up to whole chunks, matching the paper.

Check 3: head-input norms (resolved)

The 176 / 160 medians are in stats_mtp4b.json: sets.draft.hidden.norm2.q50 = 176.1 and sets.verify.hidden.norm2.q50 = 160.2. Over its 20,000 rows these agree with the transport pairs. Cite that file and those fields, since this PR adds it.

Check 2: reproduction (partial so far)

  • Scripts. The Files table's commits are all on main, and the five scripts are identical at main and at the cited commits (18fdf95, 5c59ba3, 239c482, fa7aad8, 5831da1).
  • alignment_mtp4b.json reproduces byte for byte.
  • Still queued. stats, rho and selfevidence with the CCDF are queued under gpu_lock.sh -s, with a shadow data directory so that the raw selfevidence_mtp4b_rows.npz is not overwritten. I'll post the result when they finish.

Blocking

B1. "This is the batch-shape divergence" states a mechanism that the evidence does not show for MTP (README, MTP-4B alignment paragraph: "as for DFlash-4B, the per-row checks above use the engine's own decisions, so this is the batch-shape divergence, not a pairing error").

  • The traced mechanism for MTP against plain decoding (evidence/state_safety/mechanism_plain_c1_vs_mtp_s3_c1.json) is layer 0's GDN recurrence, which runs a different kernel in verify than in decode. It is not batch shape in general.
  • The paper's appendices were corrected the same way in Venue paper: MLSys-format main text on the certified head and transport's failure, with appendices #53 (B6).
  • Fix: write "so this is the engine's speculative-against-plain divergence, which for MTP traces to layer 0's GDN recurrence running different kernels in verify and decode (evidence/state_safety/), not a pairing error".

Suggestions (not blocking)

  • The Hopper radius. The Hopper model's radius in the replay is the rounded 1.19e-4, matching the DFlash-4B and plain-decode rows. The compounded radius in src/certified_head (Certified int8 LM head: exact stock-head decisions, seeded sampling, kernels and evidence #45) is 1.192216e-4. One clause saying the replays used the rounded value avoids a mismatch later.
  • Out of scope here. evidence/head_geometry/README.md:94 still says DFlash-4B draft agreement is 99.4% at block position 1. alignment_dflash4b.json gives 0.99346, so it should read 99.3%. The paper already uses 99.3.

Addresses review of #62: the MTP-versus-plain output divergence is traced to
layer 0's GDN recurrence (state workstream), not to batch shape; the MTP norms
come from stats_mtp4b.json; the Hopper radius is the rounded 1.19e-4 the replays
used; DFlash position-1 draft agreement is 99.3%.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Approving head 419b2bb (one commit on ec1211f, changing only evidence/head_geometry/README.md).

B1 and the suggestions (fixed).

  • The MTP-4B paragraph no longer calls the divergence a batch-shape effect. It says the per-row checks rule out a pairing error, and that the state workstream traces the first difference to layer 0's GDN recurrence running different kernels in verify and decode (evidence/state_safety/README.md).
  • The norms cite stats_mtp4b.json (176.1 and 160.2).
  • The Hopper row notes the rounded 1.19e-4 that the replays used.
  • DFlash-4B position 1 now reads 99.3% (0.99346).

What this approval rests on.

  • Numbers. Every README number was recomputed from alignment_mtp4b.json, rho_mtp4b.json, selfevidence_mtp4b.json and stats_mtp4b.json. See my first review: Head geometry: MTP-4B alignment, drift ratio and self-evidence #62 (comment).
  • Scripts. The five analysis scripts are identical at main and at the commits the Files table cites.
  • Reproduction so far. alignment_mtp4b.json reproduces byte for byte.

Post-merge check, agreed with the integrator. Reproducing stats_mtp4b.json, rho_mtp4b.json (with its pairs and quantiles CSVs) and selfevidence_mtp4b.{json,csv} with its CCDF is queued under gpu_lock.sh -s. It uses a shadow data directory, so the raw selfevidence_mtp4b_rows.npz is not overwritten. I'll report the result here when it runs. If any file differs, a follow-up PR will carry the regenerated file and a README note.

@SamMausberg
SamMausberg merged commit 76b8c2c into main Oct 1, 2026
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix C.5 reports the MTP-4B capture checks: 30,328 blocks, FP64
argmax agreement of 99.08% (draft) and 99.33% (target) with every
disagreement within one BF16 spacing, R-bf16 at 99.997% and 99.998%,
accepted lengths matching on every block, acceptance by step, and 42%
of outputs identical to plain decoding. It also lists the MTP drift
subset of 40,000 pairs, cited as rho-mtp (the #65 review note).

Appendix C.6 adds the MTP drift by outcome, domain, draft step and
context as a new table, with the head-metric, subspace and l1
variants. The verdict is unchanged: transport is narrower than int8
only on unused-token tiles, and even oracle radii lose to int8
self-evidence.

Appendix A.7 adds the MTP-4B candidate sets and gap-rule fallback
shares. New register entries stats-mtp and selfevidence-mtp; the H2
and H3 status rows cite them; geometry-drift leaves the pending list.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendices A and C: integrate the MTP-4B geometry breadth (#62)
@SamMausberg

Copy link
Copy Markdown
Owner Author

Post-merge reproduction check: all seven files reproduce. Nothing needs a follow-up.

I ran stats, rho and selfevidence (with the CCDF export) for MTP-4B on one shared-lock hold, 16:04 to 16:14 UTC.

  • Inputs. The scripts came from main at feba087, identical to the commits the Files table cites. The data came from a shadow copy of the captured rows, so the raw selfevidence_mtp4b_rows.npz was not touched.
  • Byte-identical to the files as merged here (76b8c2c): stats_mtp4b.json, rho_mtp4b_pairs.csv, rho_mtp4b_quantiles.csv, selfevidence_mtp4b.csv and selfevidence_mtp4b_ccdf.csv.
  • Equal apart from elapsed-time fields: rho_mtp4b.json and selfevidence_mtp4b.json. The second differs from 76b8c2c only in elapsed_s.
  • Later change on main. Main's current selfevidence_mtp4b.json also differs in rstock_gammas['gamma_1.19e-4'], which is 1.1921636e-4 there against 1.19e-4 here. That is Round the Hopper accumulation constant up and rerun its replays #139's intended regeneration with the rounded-up Hopper constant (e35258a). Its commit message says no share, count or class changed, and the CSV and CCDF files are byte-identical to this run.

Together with alignment_mtp4b.json, which reproduced earlier, every file this PR added reproduces from its committed scripts.

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