Skip to content

Moonshot P4b: void-run record; rerun with 655,360 KV tokens and a 128-admission preflight - #103

Merged
SamMausberg merged 2 commits into
mainfrom
moonshot/p4-rerun
Oct 1, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
moonshot/p4-rerun

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

The P4b rerun amendment and the void-run record, committed before the rerun (a5422af,
10:11:27 UTC). The validator is unchanged.

Void first run (20261001T082738Z)

The validator ran once, from e37eed1 (identical to main), and stopped at
"plain+no_radix+p4_pools_r1: at most 127 requests running". No ratio was computed and no
verdict exists.

  • In all eight arms the pools resolved as pinned (128 running, 360,448 KV tokens, 128 mamba
    slots), and the batch peaked at 127 running with one request queued.
  • The likely limit is SGLang's admission budget. With ignore_eos it reserves the full 512 output
    tokens per request and charges a shared-mamba cost per request in token units.
  • README 2c records this without throughput numbers.

Rerun

  • p4_pools pins --max-total-tokens 655360 in both arms. Running requests and mamba slots
    stay at 128.
  • A new required admission preflight runs lever_sweep.py on each A/B arm with the pinned
    pools: 128 long prompts at OSL 512, so the reservation matches the A/B. check_admission.py
    then requires #running-req: 128 in each arm's log before the A/B runs.
  • Reused from the void run (repo e67feb1, engine c29a91692b): the kernel checks at tiles 32 and
    16, the tile-16 kernel bench and the FlashInfer verify timing. They are kernel-level on
    synthetic inputs, so a server's pools cannot affect them. The rerun stops unless the engine
    is still at c29a91692b, and it records the reuse in p4b_<run id>.reused.json.
  • The server output probe and the A/B are rerun.

Testing

  • check_admission.py was tested on synthetic logs: peak 128 passes, 127 fails.
  • pre-commit run passes, and the lever, validator and probe tests pass (32 passed, 3 skipped).

…e the kernel steps

The first run (20261001T082738Z) is void: every arm peaked at 127 running with one request
queued under the pinned 360,448-token KV pool; README 2c records it without throughput
numbers. For the rerun, p4_pools pins --max-total-tokens 655360 in both arms; run_p4b.sh
adds a required admission preflight (each A/B arm's server takes 128 long prompts at OSL
512 and check_admission.py requires #running-req: 128), reuses the kernel checks, the
tile-16 kernel bench and the FlashInfer timing from the void run (kernel-level, independent
of server pools; the run stops unless the engine is still c29a91692b, and the reuse is
recorded in p4b_<run id>.reused.json), and reruns the output probe and the A/B. The
validator is unchanged.
@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-01T10:45:02.059968Z 40064ea 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

Verdict: APPROVE (provisional: Codex is running on a5422af, and I'll re-check it before merge), with one wording change to make before merge

Reviewed head a5422af, committed 10:11:27 UTC, before the rerun was queued. The rerun is third in the GPU queue and has not started.

What checks out

  • The validator is unchanged. validate_p4_ab.py is not in the diff.
  • The pool change is identical in both arms. The p4_pools lever's KV pin moves from 360,448 to 655,360. Running requests and mamba slots stay at 128, and the validator still requires identical pools across arms with at least 327,680 tokens.
  • The preflight is required and tests the right thing. It starts both A/B configurations (plain+no_radix+p4_pools and …+exact_replay) with the pinned pools and 128 long prompts at the A/B's own output length. 512 is right, since a 16-token preflight would pass under the old pin and catch nothing. check_admission.py stops the job unless every arm's log shows #running-req: 128.
  • The kernel-step reuse is justified. The reused steps (BV32 and BV16 checks, the BV16 bench, the FlashInfer verify timing) run one layer on synthetic inputs, so the server pools cannot affect them. The scripts that produce them (gdn_exact_replay_check.py, gdn_fast_verify_check.py) are unchanged between e67feb1 and a5422af; I checked with git diff. The rerun stops unless the engine is still at c29a91692b, and the reuse is recorded in p4b_<run id>.reused.json.
  • The probe and the A/B are rerun in full.
  • The void-run record matches the artifacts. I checked the pools exactly as pinned, the peak of 127 running with one queued, mamba usage 0.99 and KV usage about 0.73. The cause is correctly marked "likely". A radix-off server with 128 mamba slots reaches 128 running elsewhere today (bench quality, 09:54), which supports the admission-budget explanation over a slot limit.
  • Checks. pre-commit passes, and the commit is Sam's with no AI attribution.

Change before merge (does not need to precede the rerun)

The void-run record lists the void run's output probe as "no difference". The declaration says a void run's numbers are not reported, and the probe is rerun. Keep the statement that the kernel steps passed, since they are reused and that is their evidence. For the probe, say only that it completed and that its outcome is not reported because it is rerun. Otherwise a reader sees a result from a void run next to the rerun's.

Suggestion

Make "kernel scripts unchanged since e67feb1" a required check, next to the engine-commit gate (git diff --quiet e67feb1 -- experiments/moonshot/gdn_exact_replay_check.py experiments/moonshot/gdn_fast_verify_check.py). Then the recorded reuse reason can verify itself.

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

ℹ️ 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 thread experiments/moonshot/check_admission.py Outdated
Comment on lines +34 to +36
peak = max(
(int(n) for n in RUNNING.findall(logs[0].read_text(errors='replace'))), default=0
)

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 Restrict the admission check to the 512-token point

When a server can admit 128 requests with short outputs but only 127 with the A/B's 512-token outputs, this whole-log peak still passes: bench.sweep first runs server_warmup() at concurrency 128 using the default --warmup-osl 128, before running the requested point at OSL 512. This is precisely the capacity-sensitive scenario the preflight is intended to catch, so inspect the concurrency-128 point's recorded log segment (or otherwise exclude the server warm-up) rather than scanning the complete server log.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 40064ea, before the rerun started. I cancelled the queued job, then pushed the fix and requeued at the same arrival. check_admission.py now takes the peak running count only over decode lines inside the measured point's AIPerf profiling phase (first request start to last request end, from profile_export_raw). Bench's server warm-up at --warmup-osl 128 no longer counts. tests/test_check_admission.py covers a warm-up at 128 with the phase at 127 (fails), the phase at 128 (passes) and a missing arm (fails). The README record no longer cites the void run's probe outcome.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (this withdraws my provisional approval at a5422af)

Codex finished on a5422af with a P2 on check_admission.py:36, and it is valid and blocking. check_admission.py takes the peak #running-req over the whole server log. That log includes bench's server_warmup() at concurrency 128 with the default --warmup-osl 128, which runs before the measured point. With a short output length the scheduler reserves only 128 tokens per request, so the warm-up can reach 128 running under a pool that admits only 127 at the A/B's 512 tokens. That is exactly the failure this preflight exists to catch.

B1. Count only decode lines inside the measured point. Use the point's own log segment, or the AIPerf profiling phase as validate_p4_ab.py does, and require #running-req: 128 there. Add a test in which the warm-up reaches 128 and the point peaks at 127, which must fail.

This has to land before the rerun starts; it is queued. My other points stand: the void-run probe wording, and the optional script-unchanged check.

The whole-log peak included bench's server warm-up at a short output length, which a pool
can admit at 128 while admitting only 127 long requests. check_admission.py now takes the
peak over decode lines inside the measured point's AIPerf profiling phase; a test with a
warm-up at 128 and a phase at 127 fails. README 2c drops the void run's probe outcome
(only its kernel-level steps are reused) and dates this revision.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional until Codex runs on 40064ea; I'll re-check before merge)

Re-reviewed 40064ea, committed 10:16:29 UTC. The rerun has not started (p4b.log is empty) and is requeued on this head.

  • B1 is fixed. check_admission.py now counts only decode lines inside the measured point's AIPerf profiling phase (first request start to last request end, from profile_export_raw). It uses the same timestamp handling as the validator, with a 1 s margin for the log's resolution. Bench's short-OSL server warm-up no longer counts. tests/test_check_admission.py covers a warm-up at 128 with the phase at 127 (fails), the phase at 128 (passes) and a missing arm (fails).
  • The wording change is made. The void-run record now cites only the reused kernel-level steps as passed, and says its other results are not reported. The amendment is dated 10:11 and 10:16 UTC, before the rerun.
  • Checks.
    • The tests pass (33 across admission, validator and probe), and pre-commit passes.
    • The commit is Sam's, with no AI attribution.
    • The job's checkout (~/vp-wt/moonshot-decl) is at 40064ea with a clean tree.

My earlier points on the pool change, the kernel-step reuse (scripts unchanged since e67feb1, engine gated) and the unchanged validator still hold.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 40064ea50b

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

Codex finished on 40064ea with no comments (+1), so my provisional approval at 40064ea (#103 (comment)) now stands without conditions. The rerun started at 10:43:11 UTC on exactly this head: p4b.log shows repo 40064ea and engine c29a91692b, both clean, with the engine gate for the reused steps passed and the admission preflight running.

@SamMausberg
SamMausberg merged commit 5d6adec into main Oct 1, 2026
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix E.5: P4's two void attempts and the pre-declared amendments (#103, #106)
@SamMausberg
SamMausberg deleted the moonshot/p4-rerun branch October 1, 2026 14:35
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