Repository navigation
Conversation
zhihengy
force-pushed
the
dmd2/06b-h3-dmd2-e2e
branch
from
November 10, 2026 12:53
38a1383 to
adc83da
Compare
6 tasks done
The DMD2 recipe only knew its 2 x 8 topology. Give it the knobs an e2e needs: --num-nodes / --num-gpus-per-node (one node starts its own ray cluster), --critic-steps-per-rollout, --eval-interval 0 / --save-interval 0 to drop eval and checkpoints (0 used to reach should_run_periodic_action's modulo), --fsdp-cpu-offload and --master-dtype. The three 31B models do not fit two GPUs with their optimizers, so the proxy keeps parameters, gradients and optimizer states in host memory with a bf16 master and steps on the CPU. tests/e2e/short/test_h3_t2va_dmd2_2xGPU.py runs 2 rollouts of 4 prompts (2 critic steps of 2, 1 student step on the last 2) under --deterministic-mode and checks the critic loss and grad norm, the student grad norm and the DMD2 metrics against the recorded standard. The 16-GPU defaults are unchanged. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
…roxy The standard comes from record-e2e-standards.yml on the 3gpu runner (run 42809959116, sglang zhihengy/sglang:dmd2/h3-dmd2-e2e), not from a local run. The test is renamed to the 16xGPU_single_node_2xGPU_proxy form the wan22 and krea2 proxies use, since it runs the 16-GPU recipe shrunk to two GPUs. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
zhihengy
force-pushed
the
dmd2/06-h3-recipe
branch
from
November 11, 2026 08:18
3117376 to
37695a1
Compare
zhihengy
force-pushed
the
dmd2/06b-h3-dmd2-e2e
branch
from
November 11, 2026 08:18
adc83da to
350c1d8
Compare
This branch has not been deployed
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.
ci-sglang-pr: dmd2/h3-dmd2-e2e
ci-sglang-repo: zhihengy/sglang
On top of #343. The H3 DMD2 recipe gets the knobs a CI proxy needs, and a 2-GPU e2e runs it nightly against a recorded standard.
What
scripts/run_diffusion_dmd2_h3_t2va_16gpu_multinode.py:--num-nodes/--num-gpus-per-node(one node starts its own ray cluster, as the other recipes do),--critic-steps-per-rollout,--eval-interval 0and--save-interval 0to run without eval or checkpoints (0 used to reachshould_run_periodic_action's modulo),--fsdp-cpu-offload(also offloads the teacher). The 16-GPU defaults are unchanged.tests/e2e/short/test_h3_t2va_dmd2_16xGPU_single_node_2xGPU_proxy.pyinstage-c-3-gpu-h200, labele2e: 2 rollouts of 4 prompts (4 s, 16:9), 2 critic steps of 2 samples and 1 student step on the last 2,--deterministic-mode. Checkstrain/critic-loss,train/critic-grad_norm,train/grad_normand the DMD2 metrics (dmd2_grad_abs_mean,dmd2_score_gap_abs_mean,dmd2_teacher_dist_abs_mean,dmd2_x0_mean,dmd2_x0_std,x0_mean_abs_diff) bit for bit.docs/models/h3/h3.md: the single-node form and why it needs CPU offload.Stack fixes this run surfaced (on the branches below, not in this PR's diff)
dmd2/02-external-data([DMD2 3/10] feat(ray): hand earlier trainer groups' outputs to later groups as external_data #330):trainreturnsBox(ray.put(output)), but the driver discarded itsray.getand passed the task refs on, so the consumer'sbox.innerhit anObjectRef. The driver now keeps the boxes, asRolloutManager.generatekeeps the shard boxes.dmd2/05-dmd2-loss([DMD2 7/10] feat(dmd2): train the student with the distribution matching gradient from the critic group's scores #334): the DMD2 defaults still setcustom_train_input_function_pathafter [DMD2 4/10] feat(fsdp): add a train-input hook that preprocesses train pairs before micro-batching #338 renamed the hook, so--loss-type dmd2failed inparse_args.Why this shape
--loss-type dmd2trains the student and the critic in full, so student + critic + teacher only fit 2 GPUs with--fsdp-cpu-offload: parameters, gradients and optimizer states live in host memory (about 1.1 TB) and the optimizer steps on the CPU.proj_in/time_embedder/proj_outin fp32 (_keep_in_fp32_modules), and FSDP2 wants one original dtype across a group's trainable parameters; a bf16 master tripsFSDP expects uniform original parameter dtypefor full-parameter training (the H3 SFT e2e gets away with bf16 because LoRA freezes those modules).sglang-milesyet, so the PR body points CI atzhihengy/sglang:dmd2/h3-dmd2-e2e(#45230 + #46544 + #46545 onsglang-miles), the branch [DMD2 9/10] feat(dmd2): add the MiniMax H3 4-step DMD2 recipe with eval media and DMD2 metrics #343 names.Local run (2 x H200, this node)
The CI arg set, in the e2e tree (torch 2.13 with the ad-hoc param-dtype patch port, sglang
dmd2/h3-dmd2-e2e), on an otherwise idle pair of H200s. It passes end to end in 50 min; every registered metric is emitted at the expected steps (critic steps 1-4, student steps 1-2).The time is the two offloaded 31B optimizers, so
est_time=3300liftsrun_suite's per-file cap to 4125 s (max(timeout_per_file, 1.25 x est_time)); the nightly 3gpu job grows by about 50 min. Smaller is not available: sglang's H3 pins 1344x768 and >= 4 s, and the checkpoint materialization is 20 of the 50 minutes regardless of the rollout count.Standard
The standard is recorded on the CI runner with
record-e2e-standards.yml(runs_on: ["h200","3gpu"], the same sglang ref), not locally: the local tree runs torch 2.13 with an ad-hoc port of the FSDP param-dtype patch and would not match bit for bit.Record run: https://github.com/radixark/miles_diffusion/actions/runs/42809959116 (50 min on the 3gpu runner; the artifact is committed as
tests/ci/fixtures/e2e_standards/test_h3_t2va_dmd2_16xGPU_single_node_2xGPU_proxy.json). The test file is named..._16xGPU_single_node_2xGPU_proxy.pylike the wan22 and krea2 proxies.Reproducibility check: a second
record-e2e-standards.ymlrun on the same runner and engine, https://github.com/radixark/miles_diffusion/actions/runs/42875943793 (53 min), produced all 22 metric points bit for bit identical to the committed standard.Note on
run-ci-e2e: with theci-sglang-proverride the whole suite runs ondmd2/h3-dmd2-e2e, whose base is the 2026-10-13sglang-miles; the sd3 NFT and wan22 standards were recorded on the currentsglang-milesand drift at step 2+ (run 42819564862), and the suite stops at the first failure. Like #343, this test only goes green on nightly once sgl-project/sglang#45230, #45523, #46545 and #46544 land insglang-miles; the standard is then re-recorded there.Checklist
pre-commithooks pass on the changed filespython3 scripts/run_diffusion_dmd2_h3_t2va_16gpu_multinode.py --helpstill parses; the CI arg set and the 16-GPU defaults both go throughparse_args