Add disagg_smoke: minimal-Qwen Modal test for pool claim/reset + cookbook consolidation - #8
Closed
jvmncs wants to merge 3 commits into
Closed
Conversation
…book consolidation Co-Authored-By: jason.mancuso@modal.com <jvmncs@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
Co-Authored-By: jason.mancuso@modal.com <jvmncs@gmail.com>
Co-Authored-By: jason.mancuso@modal.com <jvmncs@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A small Modal app (
cookbook/disagg_smoke/) that validates the pool-control work end to end on a minimal Qwen (Qwen/Qwen2.5-0.5B-Instruct) — no Kimi/large config, no Megatron trainer. It exercises both PR #5 (explicit pool claim/reset, fresh-run-id ownership, monotonic pointer, 1:1 trainer↔pool) and PR #6 (the consolidatedcookbook.sidecar/serving/trainer_helpers/rollout_controlspine + thin adapters + whole-cookbook image mount). Stacked on PR #6's branch.Instead of training, it synthesizes real slime disk-delta versions (
xor+zstd+xxh3-128) from the base checkpoint and publishes them through the real bulletin board, so the actual host-side delta-apply + reconcile path runs.delta.py— synthetic delta encoderWrites byte-for-byte valid
weight_v{N:06d}/dirs that slime's realapply_deltasaccepts.DeltaPublishertracks cumulative new bytes per tensor, soexpected_tensor(name)is exactly what the decoder must produce in the local checkpoint:Perturbs only the low (mantissa) byte of a few elements, so bf16 weights stay finite and the perturbed model still generates.
app.py::control_plane_test(GPU-free, primary)Drives the real
WeightSyncManager/build_manageragainst a fake SGLang upstream (an in-processhttp.serveransweringflush_cache/pause/continue/update_weights_from_disk). Asserts everything itself; raises on failure:claim(run_a)→ empty pointer<run_a>/weight_v000000,reset=True; startup converges to base.==pub.expected_tensor(...)(real slime decoder), engine reloaded atweight_version="2".advance(run_a, 1)and re-claim(run_a)both raisePointerRewind(fresh-run-id enforcement).run_bre-claims → engine resets to base → replays its own chain (1:1 epoch).include_source=False, the PR Consolidate cookbook trainers onto a shared sidecar/serving/launch spine #6 whole-cookbook mount regression wouldImportErrorhere.app.py::serving_smoke(1× GPU)Runs the real consolidated sidecar (
python3 -m cookbook.slime_disagg.sidecar) in front of a real SGLang server on tiny Qwen, claims the run, publishes one delta, triggers a reconcile, and asserts the engine reloaded to v1 (realupdate_weights_from_disk) and serves a completion pinned tomin_required_version: 1. Uses a vanilla single-GPU SGLang image (not the Blackwell fa4 fork build, which targets B200s) so it runs on a common 1×GPU; the whole-cookbook mount +--no-depsdecoder layers are identical.Run
Pin
SLIME_SMOKE_REPO/SLIME_SMOKE_REFto the same slime ref the trainer encodes with (encoder == decoder).Validation
Static only (per request — I don't have Modal creds; you run
modal run):py_compileclean on all four files.116 passed, 1 skipped.delta_test.py(encoder structural + xor/checksum self-consistency) passes (3 passed) once numpy/zstandard/xxhash are present; itimportorskips otherwise so the bare-env suite stays green.The byte-for-byte round-trip against slime's real decoder is asserted by
control_plane_teston Modal.Link to Devin session: https://modal.devinenterprise.com/sessions/b0d6110c71924c24943bcb5cea1eb5f4
Requested by: @jvmncs