Skip to content

Enable two-node Miles v0.2.0 captures and validate Qwen27B - #348

Merged
Fred Robinson (frrad) merged 5 commits into
mainfrom
reference-dapo-multinode
Nov 18, 2026
Merged

Fred Robinson (frrad) merged 5 commits into
mainfrom
reference-dapo-multinode

Conversation

@frrad

@frrad Fred Robinson (frrad) commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Enable Miles v0.2.0 trainers to save checkpoints and publish adapters across nodes. Its capture APIs bypass the cross-node checkpoint writer used by v0.1.1. Spindle now commits every node's capture writes and reloads the coordinator's Volume before materializing the adapter. Volume-backed captures, persistence and publication share the checkpoint I/O lock; local captures retain their existing concurrency. The generic capture changes were extracted from #252 with its author's agreement.

Move qwen38-27b-lora-256k to miles-v0.2.0-8c5de26 and add one short Qwen3.8-27B DAPO-Math reference definition. Existing checkpoints need their original trainer image. This targets main after #372 merged; generic launcher/indexing/tokenizer changes belong to that merged PR.

The shared DAPO script now validates restoration after its final measured checkpoint. It creates nonzero Adam momentum, saves, applies a zero-gradient momentum step, restores and repeats that step, then restores the measured checkpoint and publishes/samples again. These probe updates stay outside the measured learning curve. Plotting leaves missing timing intervals as gaps.

Validation

Both measurements completed 20 accepted updates, evaluations at 0/5/10/15/20 and checkpoints at 0/10/20 using stock Tinker SDK 0.26.0. Layout: two eight-H200 trainers, TP2/CP8, two four-H200 sampler replicas, one client. Responses are capped at 2,048 tokens; this does not validate 256K sequences.

Measurement v0.1.1 baseline v0.2.0
Final held-out accuracy 137/256 (53.5%) 152/256 (59.4%)
Median sampling + forward/backward + optimizer time 536.4 s 551.3 s
Median interval between accepted updates 559.4 s 567.8 s

Baseline metrics · v0.2.0 metrics. Both completed datasets and their observed provenance are indexed. No partial JSONLs are committed.

The full measurements ran on frozen server commits 8970cb1f69675e917db9baee9ad4b0abfbecdf61 (v0.1.1, image miles-v0.1.1-52a7a99) and 2b5cf4f13a6834bf680fbdaa3aa48329d961405b (v0.2.0, image miles-v0.2.0-8c5de26), both reporting server version 0.1.7. They did not run on the final PR head.

Interruption provenance: the v0.2.0 client disappeared after 12 updates; its termination cause is unknown. Fresh workers restored checkpoint 10 and completed updates 11–20. The committed trajectory uses original updates 1–10 and resumed updates 11–20, with no timing interval across the interruption. An initial recovery attempt stopped before any updates because of a local logging error. The corrected recovery client passed its offline loop smoke check before relaunch.

An earlier attempt encountered a generated TorchInductor module containing null bytes at its first backward pass. The downloaded committed file was valid, so the cause remains unconfirmed. The measured retry used local compiler caches, which are now also configured by the bundled recipe. Worker regions also differed across segments. These single-seed results are not a controlled speed or learning-parity comparison.

Restore evidence: checkpoint 10 loaded on fresh workers and resaved with all 1,249 state entries, including 833 optimizer entries, bitwise identical. Training then continued through update 20. The momentum replay also produced bitwise identical full checkpoints, exact restored/replayed scores, a nonzero score change (maximum 7.0116), and successful sampler publication/generation. A strict nonzero-gradient replay diverged despite exact restoration: backward results differed slightly and BF16 scores amplified those differences. The permanent probe isolates optimizer restoration with zero gradients rather than weakening score tolerances.

Shared-cache check: fresh workers on c8eb9e7257451b38c2eb9420b631c040f51f5be2 restored checkpoint 20 and published/sampled, then failed at the first forward operation while importing an Inductor module from the shared cache. Inspection found all 2,342 bytes of the generated file were null bytes. The recipe now uses local Triton/Inductor caches, matching the completed measurement. The shipped restore helper passed on merged head c345c473c1a8aaa65660c4ceeaef304a37035acd with local caches. Restored, replayed and final measured scores all matched exactly; the momentum step changed scores by up to 0.7491, and final sampling returned 16 tokens. Direct checkpoint comparisons found all 1,249 state entries, including 833 optimizer entries, bitwise identical both between expected/replayed momentum steps and between the original measured checkpoint 20 and its final-head resave. The helper probe took 280.4 s, excluding startup. Both fresh trainer nodes matched six checked runtime source files to this commit; all 16 rank processes had the intended local compiler-cache settings. The full measurements above used older frozen source.

Main is merged through d34e6c94. Local checks on exact head c345c473c1a8aaa65660c4ceeaef304a37035acd: Python 3.12 uv sync --locked --python 3.12, full pre-commit (including ty), and full CPU pytest: 1,607 passed, 10 skipped in 121.89 s. All three GitHub SDK jobs passed on this head (CI). Tests cover capture gathering/failure, checkpoint I/O serialization, failed optimizer restoration, nonfinite probe scores and reproducible timing gaps. The full GPU measurements remain on the frozen commits above; the final-head limited restore/replay and sampler probe passed. This is not a second full 20-update measurement on the final head.

Validation apps and worker pools are stopped; zero owned containers remain. Checkpoint Volumes are retained.

Comparison

The timing gap at update 11 excludes restart downtime. Scheduled evaluations/checkpoints contribute to interval spikes.

Completed Qwen3.8-27B DAPO comparison

Base automatically changed from reference-dapo-qwen38 to main November 17, 2026 23:02
@frrad
Fred Robinson (frrad) changed the base branch from main to fix/restore-frozen-miles-image-names November 17, 2026 23:19
Base automatically changed from fix/restore-frozen-miles-image-names to main November 17, 2026 23:44
@frrad Fred Robinson (frrad) changed the title Add a two-node Qwen3.8-27B DAPO-Math reference Add a two-node Qwen27B DAPO reference and safe run recording Nov 18, 2026
@frrad Fred Robinson (frrad) changed the title Add a two-node Qwen27B DAPO reference and safe run recording Add a two-node Qwen3.8-27B DAPO reference and automatic run indexing Nov 18, 2026
@frrad
Fred Robinson (frrad) marked this pull request as ready for review November 18, 2026 01:57
Comment thread reference_runs/run.py Resolved
Comment thread reference_runs/run.py Resolved
@micahtyong

Copy link
Copy Markdown
Collaborator

Could we split this into two PRs based on main? The runtime change ships to users and the reference-run tooling doesn't, so they'd be easier to review and validate separately.

  1. Multi-node v0.2.0 captures. This covers the commit-on-every-node and reload-before-materialize change, sharing the checkpoint I/O lock, removing the single-node v0.2.0 check, and moving qwen38-27b-lora-256k to miles-v0.2.0-8c5de26 with the local Triton/Inductor caches. Before merging I'd want a two-node run that gets through several training steps, sampler weight syncs and a checkpoint save, then restores from that checkpoint. Right now the v0.2.0 run only reaches its initial evaluation and checkpoint. The image move also stops existing checkpoints for this recipe from restoring, so I'd like the changelog entry to say that clearly.
  2. Reference-run indexing and launcher changes. This covers catalog.py, the typed tokenizer and overrides, the new DAPO definition, and the partial JSONL snapshots. I left notes inline.

@frrad Fred Robinson (frrad) changed the title Add a two-node Qwen3.8-27B DAPO reference and automatic run indexing Enable Miles v0.2.0 multi-node captures and upgrade Qwen27B Nov 18, 2026
@frrad
Fred Robinson (frrad) changed the base branch from main to reference-run-tooling November 18, 2026 03:41
@frrad Fred Robinson (frrad) changed the title Enable Miles v0.2.0 multi-node captures and upgrade Qwen27B Add the two-node Qwen27B reference and Miles v0.2.0 capture support Nov 18, 2026
@frrad
Fred Robinson (frrad) force-pushed the reference-dapo-multinode branch 2 times, most recently from 6a3479d to 3996abc Compare November 18, 2026 04:06
@frrad

Fred Robinson (frrad) commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Good call. I extracted the reference run machinery into #372 and stacked this PR onto that one.

The 0.2.0 validation run is still in-flight but otherwise both this PR and that one are ready for another look.

Base automatically changed from reference-run-tooling to main November 18, 2026 05:41
Micah Yong (micahtyong) added a commit that referenced this pull request Nov 18, 2026
Merge reference-dapo-multinode (#348) and keep only the Kimi K3 changes on
top of it: the recipe on the miles-v0.2.0-e814245 trainer image and the
default sglang-v0.5.23-c4182b2 sampler image, which both contain the K3
fork changes. The Beam and old-runtime changes from the previous base are
dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replay a zero-gradient Adam step from a saved probe checkpoint to isolate
optimizer restoration from backward numerical variation. A nonzero warmup
creates momentum, and the script returns to the measured state afterward.

Record the completed 20-update Qwen27B recovery with frozen server provenance
and the exact state checks. Preserve missing timing intervals as plot gaps.
@frrad Fred Robinson (frrad) changed the title Add the two-node Qwen27B reference and Miles v0.2.0 capture support Enable two-node Miles v0.2.0 captures and validate Qwen27B Nov 18, 2026
…ed corruption

A fresh-worker check on c8eb9e7 with shared compiler caches failed while importing a generated Inductor module. The inspected file contained 2342 null bytes. Keep the shared checkpoint Volume, but use local Triton and Inductor caches for this recipe, matching the completed measurement.
@frrad
Fred Robinson (frrad) merged commit 61316af into main Nov 18, 2026
3 checks passed
@frrad
Fred Robinson (frrad) deleted the reference-dapo-multinode branch November 18, 2026 20:03
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