Skip to content

feat(model): add model support verification cards#4909

Draft
yaoyu-33 wants to merge 53 commits into
yuya/qwen3-verification-prerequisitesfrom
yuya/mb-575-model-support-cards
Draft

feat(model): add model support verification cards#4909
yaoyu-33 wants to merge 53 commits into
yuya/qwen3-verification-prerequisitesfrom
yuya/mb-575-model-support-cards

Conversation

@yaoyu-33

@yaoyu-33 yaoyu-33 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds concise, agent-readable model support cards for three variants:

  • Qwen/Qwen3-8B
  • Qwen/Qwen3-30B-A3B
  • moonshotai/Moonlight-16B-A3B

It also adds the repo-local create-model-verification-card skill, its deterministic validator, and a helper for exact-length, byte-stable HF inference verification.

This PR is stacked on #4946, which contains the Qwen3 runtime prerequisites discovered during verification. Moonlight bring-up additionally exposed and fixes checkpoint-semantic preservation in the shared DeepSeekV3 bridge, Moonlight SFT/PEFT recipe drift, assistant-span inference for chat templates without generation markers, and distributed parity comparison when model and tokenizer vocabularies differ. Focused unit and conversion coverage is recorded in the internal Moonlight issue.

Every card uses the same twelve-item core inventory for conversion, parity, inference, training, post-SFT export/inference, long context, and resume. pretrain_performance is added only when the exact model variant has a canonical public performance recipe. Detailed cluster commands, storage mappings, job records, and raw logs remain in internal per-variant Linear issues; repository cards contain only portable commands, status, last verification date, expected results, and tracking metrics.

Card contract

  • Keep all twelve core items; include pretrain_performance only when the exact variant has a canonical public performance recipe.
  • Use scripts/conversion/convert.sh --executor slurm for conversion and scripts/training/train.sh for training.
  • Use short logical work/... paths; exclude accounts, partitions, physical paths, mounts, environment wiring, job IDs, and logs.
  • Keep recipe GBS/MBS unchanged.
  • Record precision per item and only highlight sequence packing, CUDA graphs, CP greater than one, and DeepEP/HybridEP dispatch.
  • Record initial/final loss plus final-ten mean step time and model TFLOP/s/GPU for every training item.
  • Require exact-length, byte-stable inference output from two executions.
  • Represent post-SFT export and HF inference as exactly two ordered commands.
  • Resume directly from the uninterrupted pretrain step-200 checkpoint into a distinct output root.
  • Treat a completed workload and its expected result as verification; submission alone is insufficient.

Verification status

Variant Verified Remaining unverified
Qwen3-8B 12/12 None
Qwen3-30B-A3B 12/13 Manual BF16 logit parity
Moonlight-16B-A3B 12/12 None

Moonlight has no exact canonical performance recipe, so its card intentionally omits pretrain_performance.

Validation

  • The bundled validator passes all three card shapes.
  • All cards pass caller-supplied privacy deny terms.
  • Isolated pre-commit and git diff --check pass. The standard project-sync invocation is blocked before hooks on macOS ARM by the Linux-only nvidia-resiliency-ext wheel.
  • Existing review threads are resolved.

Related to MB-575. Internal per-variant records: Qwen3 8B, Qwen3 30B A3B, and Moonlight 16B A3B.

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33 yaoyu-33 added docs-only With great power comes great responsibility. docs Documentation-only updates or documentation debt area:model Model implementations and HF bridge logic labels Jul 16, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33 yaoyu-33 changed the title docs(model): draft model support card with Qwen3 example docs(model): add minimal Qwen3 support card draft Jul 16, 2026
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Comment thread model_cards/qwen3-8b/card.yaml
Comment thread model_cards/qwen3-8b/card.yaml
Comment thread model_cards/qwen3-8b/card.yaml
yaoyu-33 added 8 commits July 16, 2026 15:51
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33 yaoyu-33 changed the title docs(model): add minimal Qwen3 support card draft docs(model): add verified Qwen3 support card Jul 17, 2026
yaoyu-33 added 4 commits July 16, 2026 18:29
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
…port-cards

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33 yaoyu-33 changed the title docs(model): add verified Qwen3 support card docs(model): add Qwen3 support card Jul 17, 2026
yaoyu-33 added 5 commits July 16, 2026 22:29
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33 yaoyu-33 changed the title docs(model): add Qwen3 support card docs(model): add Qwen3 support card and verification skill Jul 17, 2026
Comment thread model_cards/qwen3-8b/card.yaml Outdated
yaoyu-33 added 2 commits July 18, 2026 14:30
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
…-model-support-cards

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33
yaoyu-33 changed the base branch from main to yuya/qwen3-verification-prerequisites July 19, 2026 00:20
yaoyu-33 added 2 commits July 18, 2026 17:21
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
…-model-support-cards

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33
yaoyu-33 force-pushed the yuya/qwen3-verification-prerequisites branch from c2e3aed to 70061bc Compare July 19, 2026 00:41
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33

yaoyu-33 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

Updated the Qwen3-30B-A3B card through 0cbd7185a with the exact performance-recipe topology and batch for functional RP2 pretraining. SFT, long-context SFT, and LoRA are unchanged.

  • Pretrain now uses qwen3_30b_a3b_pretrain_16gpu_h100_bf16_config on 16×H100. The recipe supplies TP/PP/CP/EP = 1/1/1/16 and MBS/GBS = 1/1024; the card does not override any of them.
  • The real-data run keeps natural routing while retaining HybridEP and Transformer Engine CUDA graphs for moe_router and moe_preprocess. It completed 400/400 steps with zero skipped/NaN iterations, loss 12.41145 -> 3.917895, last-10 28211.570 ms / 213.780 TFLOPS/GPU, and complete step-200/400 checkpoints.
  • LR remains 3e-4, minimum LR 3e-5, with 40 warmup steps and cosine decay through step 400. GBS increased 32×, but scaling LR linearly (9.6e-3) or by square root (~1.70e-3) was rejected as unsupported and too aggressive; a 100-step probe crossed peak LR stably before the full run.
  • Direct resume restores optimizer/RNG from the reference step-200 checkpoint and executes steps 201–400 in a distinct output root. Step 201 matches exactly; step 400 is 3.912371 vs 3.917895, a 0.1410% relative difference, so it passes the accepted 1% gate. train.empty_unused_memory_level=2 is resume-only allocator hygiene needed to preserve NCCL allocation headroom after checkpoint loading; it does not change training math or the recipe batch/topology.
  • Functional pretrain throughput is now 3.00× the previous card result and reaches 89.0% of the separate mock-data performance result (240.110 TFLOPS/GPU). The remaining gap is consistent with real RP2 plus natural expert imbalance and correctness/checkpoint overhead; it is not a TFLOPS accounting mismatch.

Checks: bundled card validator, git diff --check, a 30-test training-launcher target, independent full-diff/privacy review, and all six isolated pre-commit hooks pass. The standard project-sync pre-commit invocation remains blocked before hooks on macOS ARM by the Linux-only nvidia-resiliency-ext wheel.

yaoyu-33 added 7 commits July 18, 2026 20:07
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33 yaoyu-33 changed the title docs(model): add Qwen3 model support cards feat(model): add model support verification cards Jul 19, 2026
yaoyu-33 added 7 commits July 19, 2026 12:07
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33

Copy link
Copy Markdown
Contributor Author

Superseding the earlier Qwen3-30B-A3B 400/200 functional-pretrain update with the shorter default-recipe verification at Bridge 04eb4f8d6045526331113ba3f0d39b7a4d22bb85.

  • The generic library qwen3_30b_a3b_pretrain_config now owns TP/PP/CP/EP/ETP = 1/1/1/16/1, MBS/GBS = 1/1024, HybridEP, and Transformer Engine CUDA graphs for moe_router and moe_preprocess. The H100 BF16 performance wrapper calls this default and keeps only benchmark-specific behavior.
  • The bounded real-RP2 reference completed 100/100 steps with peak LR 3e-4, minimum LR 3e-5, 40 warmup steps, decay through step 100, and checkpoints at steps 50 and 100. Loss was 12.41145 -> 6.099745; steps 91–100 averaged 31425.900 ms and 191.930 TFLOPS/GPU. The expected early pre-clip spike peaked at 124.847 on step 4 with clip_grad=1.0; the run crossed peak LR stably and had zero skipped/NaN iterations.
  • Direct resume restored optimizer and RNG state from the reference step-50 checkpoint, began at step 51, and completed step 100 in a distinct output root. Step 51 matched exactly at loss 6.749319; resumed step 100 was 6.075993 versus reference 6.099745, a 0.389393% relative difference within the 1% gate. Steps 91–100 averaged 30598.310 ms and 197.110 TFLOPS/GPU, again with zero skipped/NaN iterations.
  • The reference step-50/100 checkpoints and resumed step-100 checkpoint each finalized with all 16 distributed shards plus metadata, optimizer/RNG train state, and tokenizer artifacts.
  • The separate 50-step mock-data pretrain_performance evidence remains unchanged; it continues to validate the exact performance wrapper rather than the functional RP2 workload.

Validation: 75 targeted Qwen recipe tests, 677 exhaustive recipe/setup factory tests, 9 resume-provenance validator tests, all three card validators with privacy deny terms, git diff --check, and full pre-commit pass.

yaoyu-33 added 2 commits July 19, 2026 14:19
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
@yaoyu-33

Copy link
Copy Markdown
Contributor Author

Moonlight-16B-A3B is now 12/12 verified in cc7fcfc04.

  • CPU and GPU HF↔Megatron conversion artifacts reload and pass the recorded exact configuration/tensor gates.
  • Clean-checkout HF/Megatron parity selects token ID 17374 (" Paris") on both paths with cosine 0.999893; max/mean absolute logit differences are 0.472656 / 0.074414.
  • Two independent Megatron generations produce the same exact 32-token completion recorded in the card.
  • Full SFT, post-SFT export/HF inference, long-context SFT with CP2+offline packing, and LoRA all complete with finite losses, zero skipped/NaN iterations, and final-ten metrics.
  • Uninterrupted RP2 pretraining completes 400 steps at 12.41085 -> 3.413953, with final-ten 25,895.91 ms / 86.84 TFLOPS/GPU and complete step-200/400 checkpoints.
  • Direct resume restores optimizer/RNG from step 200 and executes exactly steps 201–400. Step 201 matches exactly; step 400 is 3.413714 vs 3.413953 (0.007001% relative difference), well inside the 1% gate. Resumed final-ten is 25,707.45 ms / 87.47 TFLOPS/GPU.

Moonlight has no exact canonical performance recipe, so the card intentionally has no pretrain_performance item. Public commands retain recipe-owned GBS/MBS and contain no private runtime wiring.

Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model Model implementations and HF bridge logic docs Documentation-only updates or documentation debt docs-only With great power comes great responsibility.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants