Skip to content

Upstream PR: Drama 3 pruned-checkpoint guide and checkpoint checker - #4992

Open
plotarmordev wants to merge 20 commits into
ashhart:mainfrom
plotarmordev:feat/102-upstream-pr-drama-3-pruned-checkpoint-gu
Open

plotarmordev wants to merge 20 commits into
ashhart:mainfrom
plotarmordev:feat/102-upstream-pr-drama-3-pruned-checkpoint-gu

Conversation

@plotarmordev

@plotarmordev plotarmordev commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Both published pruned Drama 3 checkpoints (plotarmordev/drama-3-NVFP4-Pruned, 7,369 of 10,240 routed experts kept, and plotarmordev/drama-3-NVFP4-Pruned-5900, 5,900 kept) run on main on Metal and CUDA, but main had no page saying how to serve or check them. This adds docs/drama-3-nvfp4.md, the measured receipt under docs/receipts/drama3-pruned-main/ (Mac and GB10 results, server logs, the two scripts the Spark run used), and tools/zig/drama3_checkpoints_check.py, the checker those numbers come from: it serves each checkpoint it is given and fails unless the held-expert count matches and every fixed-seed reply equals its repeat and its concurrent lane. docs/supported-models.md links the guide.

How to check

  • Base: 94e0f2dc274f1cbd63bde7cc343e47babb87cff3 (main under this branch). Head: 55e2f2d.
  • Machine: Apple M5 Ultra Mac Studio, 256 GiB, macOS 27.0, Zig 0.17.0. No extra env vars or flags.
  • zig build test test-golden at 55e2f2d8e: 4,956 passed, 4 failed, 63 skipped (1,045/1,058 steps). The failures are on upstream main too and in code this diff does not touch: two compile steps under test-cuda-host/qwen27/tensorfold (this machine has no CUDA toolchain), net.test.stage's unknown-host case (this resolver answers .invalid with a fake 198.18.x address), health_test's manifest rank count, benchmark_server_test's Ctrl-C startup case, and benchmark_server_log_test's timing bound. The same command at the base 94e0f2dc2 shows the identical failure set (17,561/17,700 tests passed, 135 skipped, 4 failed, 6 failed steps; totals differ because some test steps don't run when a sibling step fails).
  • python3 -m unittest discover -s tools/zig -p 'test_drama*.py': 30 passed, 0 failed, 0 skipped (the new checker's eleven tests included).
  • python3 tools/zig/lean_check.py on the base and on this head: 165 and 165, 0 new.
  • No GPU run on this head: the numbers below were measured on the same code the fork shipped, on an M5 Ultra Mac and a DGX Spark, and their receipts, logs and run scripts are the ones this PR adds. Reproduce with python3 tools/zig/drama3_checkpoints_check.py --bin zig-out/native/bin/tensorfold-native --voices voices --voice VOICE --out out --fp8 CKPT --pruned CKPT --pruned-5900 CKPT (each checkpoint optional).

Checks on this head

  • Head commit: 55e2f2d
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 165 and 165, 0 new.
  • Tests run, with the command and pass, fail and skip counts: see How to check above.
  • CI: pending on this head when I wrote this.
  • Not run, and why: no new GPU run; the receipt's measured figures stand and the run script that makes them is in the PR.

Receipt

This change cannot reach inference: it adds a guide, its measured receipts, a linking table row and a no-GPU-tested checker script. The figures it publishes, from docs/receipts/drama3-pruned-main/ (two-lane servers, guidance on, fixed seed 7, PCM replies):

Machine Checkpoint Load Peak memory First audio RTF
M5 Ultra, 256 GB 7,369 experts 8.9 s 10.2 GiB footprint + 13.0 GB experts read in place 0.94 s 0.73
M5 Ultra, 256 GB 5,900 experts 8.5 s 10.2 GiB footprint + 10.4 GB experts read in place 0.94 s 0.74
DGX Spark (GB10) FP8, 10,240 experts 27.6 s 39.6 GiB device 6.07 s 2.36
DGX Spark (GB10) 7,369 experts 24.5 s 21.7 GiB device 5.69 s 2.16
DGX Spark (GB10) 5,900 experts 26.0 s 19.3 GiB device 5.65 s 2.23

Every checkpoint held its experts and every fixed-seed reply equalled its repeat and its concurrent lane (results.json: pass). The Mac run predates the checker's read1() fix, so its first-audio figures are upper bounds; the Spark figures are first-byte.

  • Main against branch: no behavior change to compare; the table is the receipt the PR adds.
  • Boxes it reaches: none at runtime; readers serving the published pruned checkpoints on Metal or CUDA.
  • New switch? None. The checker adds no flags to the engine; it calls serve with the documented --cfg-gamma 1.5 --cfg-batched.
  • Environment: receipts were made at fork d1696b497 (Mac) and 132bd1238 (GB10), Zig 0.17.0, Metal / CUDA 13.0 driver 580.173.02; checkpoints plotarmordev/drama-3-NVFP4-Pruned and -Pruned-5900, sha256s in the receipt.
  • Paths and platforms the change reaches, which I ran and which I could not: the checker's unit tests run on the host (11/11 pass); its serving path was run on Metal and CUDA per the receipt.
  • Exactness: the checker's gate is byte equality of PCM replies (whole, streamed, repeat, concurrent); the receipt logs it passing on both machines.
  • Decode speed before and after, prompt speed before and after: n/a, no engine change.
  • Licence of any new weights or drafter: n/a; no weights are added, the guide links the already-published checkpoints.
Kernel contract, only when a GPU kernel is new or changed

n/a — no kernel changes.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (The checker's tests cover its verdict, peak-source and first-audio timing; the checker itself is new.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

The evidence page's before/after shots: review/102-upstream-pr-drama-3-pruned-checkpoint-gu on my fork.

…s, fixed-seed repeats and lanes, timings

(cherry picked from commit c4a2090)
…ide name the door command

(cherry picked from commit 9e71dd2)
…M, as the job image has no C++ compiler

(cherry picked from commit a8d5d5e)
(cherry picked from commit 054d0cd)
…; guide and changelog record its limits

(cherry picked from commit b7c6fef)
… of crashing

An empty or timed-out streamed reply left first_audio_s and rtf None, and
table() raised TypeError while the recorded failure waited unprinted; the
row now prints no reply for each missing value.
@AIFlowML

Copy link
Copy Markdown
Contributor

On d7f8a5d8f4ad9a6b821b1e70d91649f4742207bc, python3 -m unittest discover -s tools/zig -p 'test_drama*.py' passed all 30 tests on macOS ARM64. The head also test-merges cleanly into main 4c79cfe346d3c239ff7dfd7aa694df799755bafa.

I found one gap in the retry test. Both attempts share the same open log, and run_checkpoint searches the entire file after the second attempt. In a host-only probe, attempt one logged routed experts held 7369 of 10240 and then failed readiness. Attempt two became ready and returned matching PCM fixtures, without logging a count. The checker carried over 7369 and returned an empty problem list.

Could the checker read the expert count from the successful attempt's log only? In a scratch copy, resetting the log before each child launch made that same probe return held=None and fail the verdict as expected. A separate file per attempt would also preserve the first attempt's diagnostics. The probe used mocked processes and replies, with no model run.

Igor Lessio - AIFLOW LABS

This branch has not been deployed

No deployments
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.

2 participants