[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7881M8F0JCPC19HZB3VFCY3":3,"skill-same:01M7881M8F0JCPC19HZB3VFCY3":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7881M8F0JCPC19HZB3VFCY3","nemo-mbridge-recipe-recommender",null,"Recommend and customize Megatron Bridge recipes for a user's model, GPU count, and training goal. Indexes library recipes (pretrain\u002FSFT\u002FPEFT) and performance recipes.","Solizardking\u002Ftrain2earn","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786KDC5C3NPE4W44C5641EZ",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nemo-mbridge-recipe-recommender\nlicense: Apache-2.0\ndescription: Recommend and customize Megatron Bridge recipes for a user's model, GPU count, and training goal. Indexes library recipes (pretrain\u002FSFT\u002FPEFT) and performance recipes.\nwhen_to_use: User wants a starting recipe or training config; 'which recipe', 'recommend recipe', 'how to train Llama', 'starting config for X GPUs', 'what recipe for SFT'.\n---\n\n# Auto Recipe — Recipe Index & Recommendation\n\nThis skill indexes every shipped recipe and helps users pick the right starting\nconfig, adjust parallelism, and avoid common pitfalls.\n\n## How to Use This Skill\n\n1. Ask the user for: **model name\u002Fsize**, **GPU count & type**, **training goal**\n   (pretrain \u002F SFT \u002F PEFT), and **sequence length** (if non-default).\n2. Look up the best-match recipe in the index below.\n3. Recommend the recipe function name + entry-point command.\n4. Provide adjustment advice (parallelism resizing, batch tuning, pitfalls).\n\n## First Answer Checklist\n\nWhen recommending recipes, always include these distinctions before the long\nindex details:\n\n1. **Library recipes** under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` are for functional\n   training and use `scripts\u002Ftraining\u002Frun_recipe.py`.\n2. **Performance recipes** under `scripts\u002Fperformance\u002F` are for upper-bound\n   throughput benchmarks. They use mock data and should not be presented as\n   production training recipes.\n3. For a first-time Bridge smoke test, recommend `llama3_8b_sft_config` with\n   mock data via `--dataset llm-pretrain-mock`. Do not use `llm-finetune` for\n   the setup-only tryout unless the user specifically asks for an SFT data path.\n4. For normal SFT recommendations, use `--dataset llm-finetune`; for pretrain\n   and mock validation recommendations, use `--dataset llm-pretrain-mock`.\n5. After the recipe and dataset, give the required resizing rules: TP must\n   divide `num_key_value_heads`, keep TP within one node unless using\n   NVL72-class interconnect, enable SP when TP > 1, configure CP for long\n   context, DP is implicit, and reduce `micro_batch_size` first on OOM.\n\n---\n\n## Entry Points\n\n### Library recipes (functional training)\n\n```bash\n# Pretrain with mock data\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-pretrain-mock\n\n# SFT with SQuAD\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-finetune\n\n# Override any field via CLI\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.tensor_model_parallel_size=2' \\\n    'training.global_batch_size=64'\n```\n\n### Performance recipes (throughput benchmarks)\n\n```bash\npython scripts\u002Fperformance\u002Frun_script.py \\\n    --recipe \u003Cmodel_family> \\\n    --gpu_type h100 \\\n    --num_gpus 64 \\\n    --data mock\n```\n\nSee the Performance Recipe Index for important caveats before using these for anything beyond throughput benchmarking.\n\n---\n\n## Perf Recipe Layout\n\nPerformance recipes use the same **Python function** format as library recipes,\nbut live in a dedicated namespace for throughput benchmarking:\n\n- Perf recipes live in `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F\u003Cfamily>\u002F\u003Chardware>\u002F\u003Cmodel>.py`\n- Each perf recipe is a **self-contained Python function** (e.g. `llama3_8b_pretrain_8gpu_h100_bf16_config()`)\n- Recipe names encode model, task, GPU count, hardware, precision, and optional variant\n- `scripts\u002Fperformance\u002Futils\u002Futils.py` derives compatibility `WorkloadBaseConfig` views from the flat recipe itself\n- Shared helpers: `_benchmark_common()` (50 iters, timing, TE RNG), `_perf_precision()` (bf16 \u002F fp8_cs \u002F fp8_mx \u002F nvfp4)\n\n**Why Python, not YAML?** Previous YAML-based approaches had problems:\nrecipe logic was split across multiple indirection layers, configs were not\nself-contained, and the two-level pipeline made maintenance and debugging\ndifficult. Python functions are explicit, greppable, and composable.\n\nThe training launcher can invoke both library recipes and perf recipes without\nthe removed legacy config package.\n\n---\n\n## Library Recipe Index\n\nAll recipes live under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F`. Each function returns a\n`ConfigContainer` with model, training, optimizer, and data settings.\n\n### Llama\n\n| Recipe | Mode | TP | PP | CP | SP | GPUs (min) | Seq Len |\n|--------|------|----|----|----|----|------------|---------|\n| `llama2_7b_pretrain_config` | Pretrain | 2 | 1 | — | — | 2 | 4K |\n| `llama3_8b_pretrain_config` | Pretrain | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_8b_16k_pretrain_config` | Pretrain | 2 | 1 | 2 | ✓ | 4 | 16K |\n| `llama3_8b_64k_pretrain_config` | Pretrain | 2 | 1 | 4 | ✓ | 8 | 64K |\n| `llama3_8b_128k_pretrain_config` | Pretrain | 2 | 1 | 8 | ✓ | 16 | 128K |\n| `llama3_70b_pretrain_config` | Pretrain | 8 | 4 | — | ✓ | 32 | 8K |\n| `llama3_70b_16k_pretrain_config` | Pretrain | 8 | 4 | 2 | ✓ | 64 | 16K |\n| `llama3_70b_64k_pretrain_config` | Pretrain | 8 | 4 | 4 | ✓ | 128 | 64K |\n| `llama31_405b_pretrain_config` | Pretrain | 8 | 16 | — | ✓ | 128 | 8K |\n| `llama3_8b_sft_config` | SFT | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_70b_sft_config` | SFT | 4 | 4 | — | ✓ | 16 | 8K |\n| `llama31_405b_sft_config` | SFT | 8 | 8 | — | ✓ | 64 | 8K |\n| `llama3_8b_peft_config` | PEFT | 1 | 1 | — | — | 1 | 8K |\n| `llama3_70b_peft_config` | PEFT | 2 | 4 | — | ✓ | 8 | 8K |\n| `llama31_405b_peft_config` | PEFT | 4 | 8 | — | ✓ | 32 | 8K |\n\n### Qwen2 \u002F Qwen2.5\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `qwen2_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 7B, 14B, 32B, 72B |\n| `qwen25_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 3B, 7B, 14B, 32B, 72B |\n\n### Qwen3 (Dense)\n\n| Recipe | Mode | TP | PP | CP | Sizes |\n|--------|------|----|----|-----|-------|\n| `qwen3_*_pretrain_config` | Pretrain | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_*_sft_config` | SFT | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_600m_sft_128k_config` | SFT | 1 | 1 | 8 | 600M (128K seq) |\n| `qwen3_*_peft_config` | PEFT | 1 | 1 | — | 600M–32B |\n\n### Qwen3 MoE\n\n| Recipe | Mode | TP | PP | EP | CP | GPUs |\n|--------|------|----|----|----|----|------|\n| `qwen3_30b_a3b_pretrain_config` | Pretrain | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_sft_config` | SFT | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_peft_config` | PEFT | 1 | 1 | 1 | — | 1 |\n| `qwen3_235b_a22b_pretrain_config` | Pretrain | 4 | 16 | 8 | 2 | 512+ |\n| `qwen3_235b_a22b_sft_config` | SFT | 4 | 8 | 8 | — | 256 |\n| `qwen3_235b_a22b_peft_config` | PEFT | 1 | 4 | 4 | — | 16 |\n\n### Qwen3-Next\n\n| Recipe | Mode | TP | PP | EP |\n|--------|------|----|----|-----|\n| `qwen3_next_80b_a3b_pretrain_config` | Pretrain | 1 | 4 | 8 |\n| `qwen3_next_80b_a3b_sft_config` | SFT | 1 | 2 | 8 |\n| `qwen3_next_80b_a3b_peft_config` | PEFT | 1 | 1 | 4 |\n\n### DeepSeek\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `deepseek_v2_lite_pretrain_config` | Pretrain | 1 | 1 | 8 | 8 |\n| `deepseek_v2_pretrain_config` | Pretrain | 1 | 4 | 32 | 128 |\n| `deepseek_v3_pretrain_config` | Pretrain | 2 | 16 | 64 | 2048 |\n| `deepseek_v3_pretrain_config_32nodes` | Pretrain | 2 | 8 | 32 | 256 |\n\n### GLM-4.5\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `glm45_355b_pretrain_config` | Pretrain | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_pretrain_config` | Pretrain | 1 | 4 | 8 | 32 |\n| `glm45_355b_sft_config` | SFT | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_sft_config` | SFT | 1 | 4 | 8 | 32 |\n| `glm45_355b_peft_config` | PEFT | 2 | 4 | 4 | 32 |\n| `glm45_air_106b_peft_config` | PEFT | 1 | 2 | 4 | 8 |\n\n### Gemma\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `gemma2_*_{pretrain,sft,peft}_config` | All | 2–8 | 1–2 | 2B, 9B, 27B |\n| `gemma3_1b_{pretrain,sft,peft}_config` | All | 1 | 1 | 1B (32K seq) |\n\n### NemotronH \u002F Nemotron\n\n| Recipe | Mode | TP | PP | EP | Notes |\n|--------|------|----|----|-----|-------|\n| `nemotronh_{4b,8b,47b,56b}_*_config` | P\u002FS\u002FPEFT | 1–8 | 1–4 | — | Dense SSM-hybrid |\n| `nemotron_3_nano_*_config` | P\u002FS\u002FPEFT | varies | 1 | 8 | MoE + Mamba |\n| `nemotron_3_super_*_config` | P\u002FS\u002FPEFT | 4 | 1 | 8 | MoE + Mamba, ~40% CUDA graph gain |\n| `nemotron_nano_{9b,12b}_v2_*_config` | P\u002FS\u002FPEFT | varies | 1 | — | Dense |\n\n### Other Models\n\n| Recipe | Mode | Notes |\n|--------|------|-------|\n| `moonlight_16b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `olmoe_7b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `ministral3_{3b,8b,14b}_{sft,peft}_config` | SFT\u002FPEFT | Dense |\n| `gpt_oss_20b_*_config` | All | MoE + FP8\u002FMXFP8 variants |\n| `gpt_oss_120b_*_config` | All | MoE |\n| `vanilla_gpt_pretrain_config` | Pretrain | MLM\u002FBridge parity baseline |\n| `gpt3_175b_pretrain_config` | Pretrain | TP=4, PP=8, VP=6 |\n| `kimi_k2_pretrain_config` | Pretrain | 1T MoE, TP=2 PP=16 EP=32 |\n\n### VLM Recipes\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `gemma3_vl_{4b,12b,27b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–2 | — | 1–16 |\n| `qwen25_vl_{3b,7b,32b,72b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–4 | — | 1–32 |\n| `qwen3_vl_{8b,30b_a3b,235b_a22b}_{sft,peft}_config` | SFT\u002FPEFT | 1–4 | 1–8 | 1–32 | 1–512 |\n| `qwen35_vl_*_{sft,peft}_config` | SFT\u002FPEFT | varies | varies | varies | varies |\n| `glm_45v_{sft,peft}_config` | SFT\u002FPEFT | 1 | 8 | 4–16 | 64–512 |\n| `nemotron_nano_v2_vl_12b_{sft,peft}_config` | SFT\u002FPEFT | 2–4 | 1 | — | 8 |\n\n### Diffusion Recipes\n\n| Recipe | Mode | TP | CP |\n|--------|------|----|----|\n| `wan_1_3B_{pretrain,sft}_config` | P\u002FSFT | 1 | 8 |\n| `wan_14B_{pretrain,sft}_config` | P\u002FSFT | 2 | 4 |\n| `flux_12b_{pretrain,sft}_config` | P\u002FSFT | 2 | 1 |\n\n---\n\n## Performance Recipe Index\n\nPerf recipe source lives under `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F`. The\nperformance launcher in `scripts\u002Fperformance\u002F` resolves those flat recipe names\nand derives compatibility workload views from the selected flat recipe when\nlegacy helper paths still need them.\n\n> **Important:** Perf recipes are designed for **upper-bound throughput\n> benchmarks**, not production training. They run **50 iterations** on **mock\n> data** by default. Throughput numbers are aspirational targets, not validated\n> convergence configs.\n\n### Llama 3 \u002F 3.1\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Llama 3 8B | 8 | H100, B200, B300, GB200, GB300, R100 | CUDA graphs (local), FSDP on GB variants |\n| Llama 3 70B | 64 | H100, B200, B300, GB200, GB300 | TP comm overlap (userbuffers), FSDP, CUDA graphs |\n| Llama 3.1 405B | 128–1024 | H100, B200, B300, GB200, GB300 | TP+CP comm overlap (userbuffers), FSDP, heavy PP\u002FVP |\n\nSFT\u002FLoRA variants also exist (e.g. 8B SFT with packed sequences, 70B SFT on 32 GPUs).\n\n### DeepSeek V3\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| DeepSeek V3 (671B MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | HybridEP dispatcher, MLA recompute, CUDA graphs (TE scoped) |\n\n### Qwen3 MoE\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | MoE alltoall\u002Fflex dispatcher |\n| Qwen3 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | TP comm overlap, CUDA graphs, MoE a2a overlap |\n| Qwen3-Next 80B-A3B | 64–128 | H100, B200, B300, GB200, GB300 | EP 64–128 |\n\n### Qwen3-VL\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3-VL 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | VLM + MoE |\n| Qwen3-VL 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | VLM + MoE, TP comm overlap |\n\n### Kimi K2\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Kimi K2 (1T MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | Muon\u002FAdam optimizer, HybridEP, pipeline layout helpers |\n\n### NemotronH\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Nemotron 3 Nano (30B MoE+Mamba) | 8–16 | H100, B200, B300, GB200, GB300 | TE CUDA graphs (attn+mamba+moe), HybridEP |\n| Nemotron 3 Super | 64 | H100, B200, B300, GB200, GB300 | TE CUDA graphs, EP=64 |\n| NemotronH 56B | 64 | H100, B200, B300 | TP=2–8, TE graphs (mamba+attn) |\n\n### GPT-OSS\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| GPT-OSS 120B | 64 | H100, B200, GB200 | EP=64, HybridEP on GB200 |\n\n---\n\n## Recommendation Decision Tree\n\n```text\nUser wants to train a model\n│\n├─ Know the model name?\n│   ├─ Yes → Look up in Library Recipe Index above\n│   │   ├─ Has a recipe for their size + mode? → Use it directly\n│   │   └─ No exact match? → Use closest size, adjust parallelism\n│   └─ No → Ask for model name, size, and HF model ID\n│\n├─ What's the training goal?\n│   ├─ Pretrain → Use *_pretrain_config\n│   ├─ SFT (full fine-tune) → Use *_sft_config\n│   └─ PEFT (LoRA\u002FDoRA) → Use *_peft_config (lowest GPU requirement)\n│\n├─ How many GPUs?\n│   ├─ 1 GPU → Only PEFT recipes work (TP=1, PP=1)\n│   ├─ 8 GPUs (1 node) → Most 8B–16B models, small MoE (EP=8)\n│   ├─ 16–64 GPUs → 70B dense, medium MoE\n│   └─ 128+ GPUs → 405B+, large MoE (DeepSeek V3, Kimi K2)\n│\n├─ Want throughput benchmarks?\n│   ├─ Yes → Use perf recipes (scripts\u002Fperformance\u002F)\n│   │   └─ ⚠️ These run on mock data for upper-bound perf only\n│   └─ No → Use library recipes (scripts\u002Ftraining\u002Frun_recipe.py)\n│\n└─ Long context?\n    ├─ > 8K → Need CP (context parallelism), check *_16k \u002F *_64k \u002F *_128k variants\n    └─ ≤ 8K → Default recipes work\n```\n\n---\n\n## Adjustment Advice (When Recommending)\n\n### Parallelism Resizing Rules\n\nWhen the user's GPU count differs from the recipe default:\n\n1. **TP must divide `num_key_value_heads`** (GQA constraint). E.g. if\n   `num_key_value_heads=8`, valid TP = {1, 2, 4, 8}.\n2. **TP should stay within a single node** (NVLink). TP > 8 requires\n   inter-node NVLink (e.g., GB200 NVL72).\n3. **PP adds pipeline bubbles.** Minimize PP; only increase when TP alone can't\n   fit the model. Use VP (virtual pipeline) to mitigate bubble overhead.\n4. **EP doesn't reduce dense-layer memory.** Only expert parameters shard with\n   EP. Shared attention\u002Fembeddings are replicated. For \"OOM with MoE\", increase\n   EP first, not TP.\n5. **SP should be True whenever TP > 1.** It eliminates redundant activation\n   copies and is essentially free.\n6. **CP requires all-to-all or ring attention.** Check `cp_comm_type`. For\n   GQA models, `a2a+p2p` hierarchical CP allows CP > num_kv_heads.\n7. **world_size = DP × TP × PP × CP × EP.** DP is implicit. Make sure the\n   product of explicit parallelisms divides your total GPU count.\n\n### Batch Size Tuning\n\n- Start with the recipe's `micro_batch_size`. If OOM, reduce to 1.\n- `global_batch_size` determines learning dynamics. Scale with DP:\n  `GBS = micro_batch_size × DP × gradient_accumulation_steps`.\n- For MoE, `micro_batch_size=1` is typical at scale.\n\n### Common Pitfalls to Warn About\n\n| Pitfall | Symptom | Fix |\n|---------|---------|-----|\n| TP > num_kv_heads | Crash: \"TP must divide num_query_groups\" | Reduce TP to a divisor of num_kv_heads |\n| PP without VP | Poor throughput (large bubble) | Set `virtual_pipeline_model_parallel_size` |\n| EP too low for large MoE | OOM on expert params | Increase EP; each expert lives on EP\u002Fnum_experts ranks |\n| CUDA graphs + packed sequences | Assert: \"CUDA graph accepts only Tensor inputs\" | Disable packing or use `local` full-iteration graphs |\n| CUDA graphs + full recompute | Assert: \"full recompute only with full iteration CUDA graph\" | Disable recompute or switch to `local` impl |\n| `use_te_rng_tracker` not set | Assert on provider init when CUDA graphs enabled | Set `cfg.model.use_te_rng_tracker = True` and `cfg.rng.te_rng_tracker = True` |\n| FSDP + TP > 1 on H100 | Possible comm bottleneck | Prefer FSDP with TP=1 or TP=2 on H100; FSDP shines on GB\u002FB-series |\n| Long context without CP | OOM on activations | Add CP=2\u002F4\u002F8; use `*_16k`, `*_64k`, or `*_128k` recipe variants |\n| MoE `overlap_grad_reduce` on H100 | May hurt perf (False in many H100 presets) | Set `overlap_grad_reduce=False` for MoE on H100 |\n| VLM SFT missing image data | Runs but produces garbage | Provide actual multimodal dataset or use mock VLM data |\n| Qwen35-VL MoE FSDP | Tested on Blackwell only | May not work on H100; validate first |\n\n### Recipe Override Examples\n\n```bash\n# Scale Llama3 8B from 2 GPUs to 8 GPUs (increase DP)\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock\n\n# Reduce parallelism for Qwen3-MoE 30B to fit on 4 GPUs\nuv run python -m torch.distributed.run --nproc_per_node=4 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_sft_config \\\n    --dataset llm-finetune \\\n    'model.expert_model_parallel_size=4'\n\n# Add long context to an existing recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.seq_length=32768' \\\n    'model.context_parallel_size=4'\n\n# Enable CUDA graphs on any recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.cuda_graph_impl=transformer_engine' \\\n    'model.cuda_graph_scope=[attn,moe_router,moe_preprocess]' \\\n    'model.use_te_rng_tracker=True' \\\n    'rng.te_rng_tracker=True'\n```\n\n---\n\n## Quick Reference: Which Recipe for My Situation?\n\n| I want to... | Start with | GPUs needed |\n|---|---|---|\n| Try Bridge for the first time | `llama3_8b_sft_config` + mock data | 2 |\n| Fine-tune a 7-8B model | `llama3_8b_sft_config` or `qwen3_8b_sft_config` | 2–8 |\n| LoRA on 1 GPU | `llama3_8b_peft_config` or `qwen3_8b_peft_config` | 1 |\n| Pretrain a dense 70B | `llama3_70b_pretrain_config` | 32–64 |\n| Train a small MoE | `qwen3_30b_a3b_pretrain_config` | 8 |\n| Train a large MoE (235B+) | `qwen3_235b_a22b_pretrain_config` | 256–512 |\n| Benchmark throughput | Perf recipes via `run_script.py` | Varies |\n| Long-context training | `llama3_8b_128k_pretrain_config` or add CP override | 16+ |\n| VLM fine-tuning | `qwen3_vl_8b_sft_config` or `gemma3_vl_*_sft_config` | 4–8 |\n| Diffusion training | `wan_1_3B_pretrain_config` or `flux_12b_pretrain_config` | 8 |\n\n---\n\n## Code Anchors\n\n| What | Path |\n|------|------|\n| Library recipes root | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` |\n| Recipe `__init__.py` (all exports) | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F__init__.py` |\n| Common recipe helpers | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Fcommon.py` |\n| Training entry point | `scripts\u002Ftraining\u002Frun_recipe.py` |\n| Perf recipes root | `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F` |\n| Perf entry point | `scripts\u002Fperformance\u002Frun_script.py` |\n| Perf recipe helpers | `scripts\u002Fperformance\u002Futils\u002Futils.py` |\n| Perf overrides (benchmark defaults) | `scripts\u002Fperformance\u002Futils\u002Foverrides.py` |\n","# Auto Recipe — Recipe Index & Recommendation\n\nThis skill indexes every shipped recipe and helps users pick the right starting\nconfig, adjust parallelism, and avoid common pitfalls.\n\n## How to Use This Skill\n\n1. Ask the user for: **model name\u002Fsize**, **GPU count & type**, **training goal**\n   (pretrain \u002F SFT \u002F PEFT), and **sequence length** (if non-default).\n2. Look up the best-match recipe in the index below.\n3. Recommend the recipe function name + entry-point command.\n4. Provide adjustment advice (parallelism resizing, batch tuning, pitfalls).\n\n## First Answer Checklist\n\nWhen recommending recipes, always include these distinctions before the long\nindex details:\n\n1. **Library recipes** under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` are for functional\n   training and use `scripts\u002Ftraining\u002Frun_recipe.py`.\n2. **Performance recipes** under `scripts\u002Fperformance\u002F` are for upper-bound\n   throughput benchmarks. They use mock data and should not be presented as\n   production training recipes.\n3. For a first-time Bridge smoke test, recommend `llama3_8b_sft_config` with\n   mock data via `--dataset llm-pretrain-mock`. Do not use `llm-finetune` for\n   the setup-only tryout unless the user specifically asks for an SFT data path.\n4. For normal SFT recommendations, use `--dataset llm-finetune`; for pretrain\n   and mock validation recommendations, use `--dataset llm-pretrain-mock`.\n5. After the recipe and dataset, give the required resizing rules: TP must\n   divide `num_key_value_heads`, keep TP within one node unless using\n   NVL72-class interconnect, enable SP when TP > 1, configure CP for long\n   context, DP is implicit, and reduce `micro_batch_size` first on OOM.\n\n---\n\n## Entry Points\n\n### Library recipes (functional training)\n\n```bash\n# Pretrain with mock data\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-pretrain-mock\n\n# SFT with SQuAD\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-finetune\n\n# Override any field via CLI\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.tensor_model_parallel_size=2' \\\n    'training.global_batch_size=64'\n```\n\n### Performance recipes (throughput benchmarks)\n\n```bash\npython scripts\u002Fperformance\u002Frun_script.py \\\n    --recipe \u003Cmodel_family> \\\n    --gpu_type h100 \\\n    --num_gpus 64 \\\n    --data mock\n```\n\nSee the Performance Recipe Index for important caveats before using these for anything beyond throughput benchmarking.\n\n---\n\n## Perf Recipe Layout\n\nPerformance recipes use the same **Python function** format as library recipes,\nbut live in a dedicated namespace for throughput benchmarking:\n\n- Perf recipes live in `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F\u003Cfamily>\u002F\u003Chardware>\u002F\u003Cmodel>.py`\n- Each perf recipe is a **self-contained Python function** (e.g. `llama3_8b_pretrain_8gpu_h100_bf16_config()`)\n- Recipe names encode model, task, GPU count, hardware, precision, and optional variant\n- `scripts\u002Fperformance\u002Futils\u002Futils.py` derives compatibility `WorkloadBaseConfig` views from the flat recipe itself\n- Shared helpers: `_benchmark_common()` (50 iters, timing, TE RNG), `_perf_precision()` (bf16 \u002F fp8_cs \u002F fp8_mx \u002F nvfp4)\n\n**Why Python, not YAML?** Previous YAML-based approaches had problems:\nrecipe logic was split across multiple indirection layers, configs were not\nself-contained, and the two-level pipeline made maintenance and debugging\ndifficult. Python functions are explicit, greppable, and composable.\n\nThe training launcher can invoke both library recipes and perf recipes without\nthe removed legacy config package.\n\n---\n\n## Library Recipe Index\n\nAll recipes live under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F`. Each function returns a\n`ConfigContainer` with model, training, optimizer, and data settings.\n\n### Llama\n\n| Recipe | Mode | TP | PP | CP | SP | GPUs (min) | Seq Len |\n|--------|------|----|----|----|----|------------|---------|\n| `llama2_7b_pretrain_config` | Pretrain | 2 | 1 | — | — | 2 | 4K |\n| `llama3_8b_pretrain_config` | Pretrain | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_8b_16k_pretrain_config` | Pretrain | 2 | 1 | 2 | ✓ | 4 | 16K |\n| `llama3_8b_64k_pretrain_config` | Pretrain | 2 | 1 | 4 | ✓ | 8 | 64K |\n| `llama3_8b_128k_pretrain_config` | Pretrain | 2 | 1 | 8 | ✓ | 16 | 128K |\n| `llama3_70b_pretrain_config` | Pretrain | 8 | 4 | — | ✓ | 32 | 8K |\n| `llama3_70b_16k_pretrain_config` | Pretrain | 8 | 4 | 2 | ✓ | 64 | 16K |\n| `llama3_70b_64k_pretrain_config` | Pretrain | 8 | 4 | 4 | ✓ | 128 | 64K |\n| `llama31_405b_pretrain_config` | Pretrain | 8 | 16 | — | ✓ | 128 | 8K |\n| `llama3_8b_sft_config` | SFT | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_70b_sft_config` | SFT | 4 | 4 | — | ✓ | 16 | 8K |\n| `llama31_405b_sft_config` | SFT | 8 | 8 | — | ✓ | 64 | 8K |\n| `llama3_8b_peft_config` | PEFT | 1 | 1 | — | — | 1 | 8K |\n| `llama3_70b_peft_config` | PEFT | 2 | 4 | — | ✓ | 8 | 8K |\n| `llama31_405b_peft_config` | PEFT | 4 | 8 | — | ✓ | 32 | 8K |\n\n### Qwen2 \u002F Qwen2.5\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `qwen2_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 7B, 14B, 32B, 72B |\n| `qwen25_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 3B, 7B, 14B, 32B, 72B |\n\n### Qwen3 (Dense)\n\n| Recipe | Mode | TP | PP | CP | Sizes |\n|--------|------|----|----|-----|-------|\n| `qwen3_*_pretrain_config` | Pretrain | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_*_sft_config` | SFT | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_600m_sft_128k_config` | SFT | 1 | 1 | 8 | 600M (128K seq) |\n| `qwen3_*_peft_config` | PEFT | 1 | 1 | — | 600M–32B |\n\n### Qwen3 MoE\n\n| Recipe | Mode | TP | PP | EP | CP | GPUs |\n|--------|------|----|----|----|----|------|\n| `qwen3_30b_a3b_pretrain_config` | Pretrain | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_sft_config` | SFT | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_peft_config` | PEFT | 1 | 1 | 1 | — | 1 |\n| `qwen3_235b_a22b_pretrain_config` | Pretrain | 4 | 16 | 8 | 2 | 512+ |\n| `qwen3_235b_a22b_sft_config` | SFT | 4 | 8 | 8 | — | 256 |\n| `qwen3_235b_a22b_peft_config` | PEFT | 1 | 4 | 4 | — | 16 |\n\n### Qwen3-Next\n\n| Recipe | Mode | TP | PP | EP |\n|--------|------|----|----|-----|\n| `qwen3_next_80b_a3b_pretrain_config` | Pretrain | 1 | 4 | 8 |\n| `qwen3_next_80b_a3b_sft_config` | SFT | 1 | 2 | 8 |\n| `qwen3_next_80b_a3b_peft_config` | PEFT | 1 | 1 | 4 |\n\n### DeepSeek\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `deepseek_v2_lite_pretrain_config` | Pretrain | 1 | 1 | 8 | 8 |\n| `deepseek_v2_pretrain_config` | Pretrain | 1 | 4 | 32 | 128 |\n| `deepseek_v3_pretrain_config` | Pretrain | 2 | 16 | 64 | 2048 |\n| `deepseek_v3_pretrain_config_32nodes` | Pretrain | 2 | 8 | 32 | 256 |\n\n### GLM-4.5\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `glm45_355b_pretrain_config` | Pretrain | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_pretrain_config` | Pretrain | 1 | 4 | 8 | 32 |\n| `glm45_355b_sft_config` | SFT | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_sft_config` | SFT | 1 | 4 | 8 | 32 |\n| `glm45_355b_peft_config` | PEFT | 2 | 4 | 4 | 32 |\n| `glm45_air_106b_peft_config` | PEFT | 1 | 2 | 4 | 8 |\n\n### Gemma\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `gemma2_*_{pretrain,sft,peft}_config` | All | 2–8 | 1–2 | 2B, 9B, 27B |\n| `gemma3_1b_{pretrain,sft,peft}_config` | All | 1 | 1 | 1B (32K seq) |\n\n### NemotronH \u002F Nemotron\n\n| Recipe | Mode | TP | PP | EP | Notes |\n|--------|------|----|----|-----|-------|\n| `nemotronh_{4b,8b,47b,56b}_*_config` | P\u002FS\u002FPEFT | 1–8 | 1–4 | — | Dense SSM-hybrid |\n| `nemotron_3_nano_*_config` | P\u002FS\u002FPEFT | varies | 1 | 8 | MoE + Mamba |\n| `nemotron_3_super_*_config` | P\u002FS\u002FPEFT | 4 | 1 | 8 | MoE + Mamba, ~40% CUDA graph gain |\n| `nemotron_nano_{9b,12b}_v2_*_config` | P\u002FS\u002FPEFT | varies | 1 | — | Dense |\n\n### Other Models\n\n| Recipe | Mode | Notes |\n|--------|------|-------|\n| `moonlight_16b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `olmoe_7b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `ministral3_{3b,8b,14b}_{sft,peft}_config` | SFT\u002FPEFT | Dense |\n| `gpt_oss_20b_*_config` | All | MoE + FP8\u002FMXFP8 variants |\n| `gpt_oss_120b_*_config` | All | MoE |\n| `vanilla_gpt_pretrain_config` | Pretrain | MLM\u002FBridge parity baseline |\n| `gpt3_175b_pretrain_config` | Pretrain | TP=4, PP=8, VP=6 |\n| `kimi_k2_pretrain_config` | Pretrain | 1T MoE, TP=2 PP=16 EP=32 |\n\n### VLM Recipes\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `gemma3_vl_{4b,12b,27b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–2 | — | 1–16 |\n| `qwen25_vl_{3b,7b,32b,72b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–4 | — | 1–32 |\n| `qwen3_vl_{8b,30b_a3b,235b_a22b}_{sft,peft}_config` | SFT\u002FPEFT | 1–4 | 1–8 | 1–32 | 1–512 |\n| `qwen35_vl_*_{sft,peft}_config` | SFT\u002FPEFT | varies | varies | varies | varies |\n| `glm_45v_{sft,peft}_config` | SFT\u002FPEFT | 1 | 8 | 4–16 | 64–512 |\n| `nemotron_nano_v2_vl_12b_{sft,peft}_config` | SFT\u002FPEFT | 2–4 | 1 | — | 8 |\n\n### Diffusion Recipes\n\n| Recipe | Mode | TP | CP |\n|--------|------|----|----|\n| `wan_1_3B_{pretrain,sft}_config` | P\u002FSFT | 1 | 8 |\n| `wan_14B_{pretrain,sft}_config` | P\u002FSFT | 2 | 4 |\n| `flux_12b_{pretrain,sft}_config` | P\u002FSFT | 2 | 1 |\n\n---\n\n## Performance Recipe Index\n\nPerf recipe source lives under `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F`. The\nperformance launcher in `scripts\u002Fperformance\u002F` resolves those flat recipe names\nand derives compatibility workload views from the selected flat recipe when\nlegacy helper paths still need them.\n\n> **Important:** Perf recipes are designed for **upper-bound throughput\n> benchmarks**, not production training. They run **50 iterations** on **mock\n> data** by default. Throughput numbers are aspirational targets, not validated\n> convergence configs.\n\n### Llama 3 \u002F 3.1\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Llama 3 8B | 8 | H100, B200, B300, GB200, GB300, R100 | CUDA graphs (local), FSDP on GB variants |\n| Llama 3 70B | 64 | H100, B200, B300, GB200, GB300 | TP comm overlap (userbuffers), FSDP, CUDA graphs |\n| Llama 3.1 405B | 128–1024 | H100, B200, B300, GB200, GB300 | TP+CP comm overlap (userbuffers), FSDP, heavy PP\u002FVP |\n\nSFT\u002FLoRA variants also exist (e.g. 8B SFT with packed sequences, 70B SFT on 32 GPUs).\n\n### DeepSeek V3\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| DeepSeek V3 (671B MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | HybridEP dispatcher, MLA recompute, CUDA graphs (TE scoped) |\n\n### Qwen3 MoE\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | MoE alltoall\u002Fflex dispatcher |\n| Qwen3 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | TP comm overlap, CUDA graphs, MoE a2a overlap |\n| Qwen3-Next 80B-A3B | 64–128 | H100, B200, B300, GB200, GB300 | EP 64–128 |\n\n### Qwen3-VL\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3-VL 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | VLM + MoE |\n| Qwen3-VL 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | VLM + MoE, TP comm overlap |\n\n### Kimi K2\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Kimi K2 (1T MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | Muon\u002FAdam optimizer, HybridEP, pipeline layout helpers |\n\n### NemotronH\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Nemotron 3 Nano (30B MoE+Mamba) | 8–16 | H100, B200, B300, GB200, GB300 | TE CUDA graphs (attn+mamba+moe), HybridEP |\n| Nemotron 3 Super | 64 | H100, B200, B300, GB200, GB300 | TE CUDA graphs, EP=64 |\n| NemotronH 56B | 64 | H100, B200, B300 | TP=2–8, TE graphs (mamba+attn) |\n\n### GPT-OSS\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| GPT-OSS 120B | 64 | H100, B200, GB200 | EP=64, HybridEP on GB200 |\n\n---\n\n## Recommendation Decision Tree\n\n```text\nUser wants to train a model\n│\n├─ Know the model name?\n│   ├─ Yes → Look up in Library Recipe Index above\n│   │   ├─ Has a recipe for their size + mode? → Use it directly\n│   │   └─ No exact match? → Use closest size, adjust parallelism\n│   └─ No → Ask for model name, size, and HF model ID\n│\n├─ What's the training goal?\n│   ├─ Pretrain → Use *_pretrain_config\n│   ├─ SFT (full fine-tune) → Use *_sft_config\n│   └─ PEFT (LoRA\u002FDoRA) → Use *_peft_config (lowest GPU requirement)\n│\n├─ How many GPUs?\n│   ├─ 1 GPU → Only PEFT recipes work (TP=1, PP=1)\n│   ├─ 8 GPUs (1 node) → Most 8B–16B models, small MoE (EP=8)\n│   ├─ 16–64 GPUs → 70B dense, medium MoE\n│   └─ 128+ GPUs → 405B+, large MoE (DeepSeek V3, Kimi K2)\n│\n├─ Want throughput benchmarks?\n│   ├─ Yes → Use perf recipes (scripts\u002Fperformance\u002F)\n│   │   └─ ⚠️ These run on mock data for upper-bound perf only\n│   └─ No → Use library recipes (scripts\u002Ftraining\u002Frun_recipe.py)\n│\n└─ Long context?\n    ├─ > 8K → Need CP (context parallelism), check *_16k \u002F *_64k \u002F *_128k variants\n    └─ ≤ 8K → Default recipes work\n```\n\n---\n\n## Adjustment Advice (When Recommending)\n\n### Parallelism Resizing Rules\n\nWhen the user's GPU count differs from the recipe default:\n\n1. **TP must divide `num_key_value_heads`** (GQA constraint). E.g. if\n   `num_key_value_heads=8`, valid TP = {1, 2, 4, 8}.\n2. **TP should stay within a single node** (NVLink). TP > 8 requires\n   inter-node NVLink (e.g., GB200 NVL72).\n3. **PP adds pipeline bubbles.** Minimize PP; only increase when TP alone can't\n   fit the model. Use VP (virtual pipeline) to mitigate bubble overhead.\n4. **EP doesn't reduce dense-layer memory.** Only expert parameters shard with\n   EP. Shared attention\u002Fembeddings are replicated. For \"OOM with MoE\", increase\n   EP first, not TP.\n5. **SP should be True whenever TP > 1.** It eliminates redundant activation\n   copies and is essentially free.\n6. **CP requires all-to-all or ring attention.** Check `cp_comm_type`. For\n   GQA models, `a2a+p2p` hierarchical CP allows CP > num_kv_heads.\n7. **world_size = DP × TP × PP × CP × EP.** DP is implicit. Make sure the\n   product of explicit parallelisms divides your total GPU count.\n\n### Batch Size Tuning\n\n- Start with the recipe's `micro_batch_size`. If OOM, reduce to 1.\n- `global_batch_size` determines learning dynamics. Scale with DP:\n  `GBS = micro_batch_size × DP × gradient_accumulation_steps`.\n- For MoE, `micro_batch_size=1` is typical at scale.\n\n### Common Pitfalls to Warn About\n\n| Pitfall | Symptom | Fix |\n|---------|---------|-----|\n| TP > num_kv_heads | Crash: \"TP must divide num_query_groups\" | Reduce TP to a divisor of num_kv_heads |\n| PP without VP | Poor throughput (large bubble) | Set `virtual_pipeline_model_parallel_size` |\n| EP too low for large MoE | OOM on expert params | Increase EP; each expert lives on EP\u002Fnum_experts ranks |\n| CUDA graphs + packed sequences | Assert: \"CUDA graph accepts only Tensor inputs\" | Disable packing or use `local` full-iteration graphs |\n| CUDA graphs + full recompute | Assert: \"full recompute only with full iteration CUDA graph\" | Disable recompute or switch to `local` impl |\n| `use_te_rng_tracker` not set | Assert on provider init when CUDA graphs enabled | Set `cfg.model.use_te_rng_tracker = True` and `cfg.rng.te_rng_tracker = True` |\n| FSDP + TP > 1 on H100 | Possible comm bottleneck | Prefer FSDP with TP=1 or TP=2 on H100; FSDP shines on GB\u002FB-series |\n| Long context without CP | OOM on activations | Add CP=2\u002F4\u002F8; use `*_16k`, `*_64k`, or `*_128k` recipe variants |\n| MoE `overlap_grad_reduce` on H100 | May hurt perf (False in many H100 presets) | Set `overlap_grad_reduce=False` for MoE on H100 |\n| VLM SFT missing image data | Runs but produces garbage | Provide actual multimodal dataset or use mock VLM data |\n| Qwen35-VL MoE FSDP | Tested on Blackwell only | May not work on H100; validate first |\n\n### Recipe Override Examples\n\n```bash\n# Scale Llama3 8B from 2 GPUs to 8 GPUs (increase DP)\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock\n\n# Reduce parallelism for Qwen3-MoE 30B to fit on 4 GPUs\nuv run python -m torch.distributed.run --nproc_per_node=4 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_sft_config \\\n    --dataset llm-finetune \\\n    'model.expert_model_parallel_size=4'\n\n# Add long context to an existing recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.seq_length=32768' \\\n    'model.context_parallel_size=4'\n\n# Enable CUDA graphs on any recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.cuda_graph_impl=transformer_engine' \\\n    'model.cuda_graph_scope=[attn,moe_router,moe_preprocess]' \\\n    'model.use_te_rng_tracker=True' \\\n    'rng.te_rng_tracker=True'\n```\n\n---\n\n## Quick Reference: Which Recipe for My Situation?\n\n| I want to... | Start with | GPUs needed |\n|---|---|---|\n| Try Bridge for the first time | `llama3_8b_sft_config` + mock data | 2 |\n| Fine-tune a 7-8B model | `llama3_8b_sft_config` or `qwen3_8b_sft_config` | 2–8 |\n| LoRA on 1 GPU | `llama3_8b_peft_config` or `qwen3_8b_peft_config` | 1 |\n| Pretrain a dense 70B | `llama3_70b_pretrain_config` | 32–64 |\n| Train a small MoE | `qwen3_30b_a3b_pretrain_config` | 8 |\n| Train a large MoE (235B+) | `qwen3_235b_a22b_pretrain_config` | 256–512 |\n| Benchmark throughput | Perf recipes via `run_script.py` | Varies |\n| Long-context training | `llama3_8b_128k_pretrain_config` or add CP override | 16+ |\n| VLM fine-tuning | `qwen3_vl_8b_sft_config` or `gemma3_vl_*_sft_config` | 4–8 |\n| Diffusion training | `wan_1_3B_pretrain_config` or `flux_12b_pretrain_config` | 8 |\n\n---\n\n## Code Anchors\n\n| What | Path |\n|------|------|\n| Library recipes root | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` |\n| Recipe `__init__.py` (all exports) | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F__init__.py` |\n| Common recipe helpers | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Fcommon.py` |\n| Training entry point | `scripts\u002Ftraining\u002Frun_recipe.py` |\n| Perf recipes root | `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F` |\n| Perf entry point | `scripts\u002Fperformance\u002Frun_script.py` |\n| Perf recipe helpers | `scripts\u002Fperformance\u002Futils\u002Futils.py` |\n| Perf overrides (benchmark defaults) | `scripts\u002Fperformance\u002Futils\u002Foverrides.py` |\n",{"name":5,"license":15,"description":7,"when_to_use":24},"User wants a starting recipe or training config; 'which recipe', 'recommend recipe', 'how to train Llama', 'starting config for X GPUs', 'what recipe for SFT'.","main","86cc27ffd16af6cb85948f1155578e6f3f61cc4c","skillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 11:52:53",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Solizardking\u002Ftrain2earn --skill nemo-mbridge-recipe-recommender",{"tool":39,"command":40},"bunx","bunx skills add Solizardking\u002Ftrain2earn --skill nemo-mbridge-recipe-recommender",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Solizardking\u002Ftrain2earn --skill nemo-mbridge-recipe-recommender","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002FSKILL.md",true,[47,53,57,61],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"BENCHMARK.md","REFERENCE","参考文档",3876,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002FBENCHMARK.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"metadata.json",409,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002Fmetadata.json",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"skill-card.md",4188,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002Fskill-card.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"verification.json",1409,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fpublic\u002Fapi\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002Fverification.json",[66,74,82,90,97,105],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M78B94RSCAKMH1QS79VE6DG9","testing","For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.","MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Ftesting\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M78B81BKY8RX12HETPG8YKWK","qedgen","Formally verify programs by writing Lean 4 proofs. Trigger this skill whenever the user wants to formally verify code, generate Lean 4 proofs, prove properties about algorithms or smart contracts, verify invariants, convert program logic into formal specifications, or anything involving Lean 4 and formal verification. Also trigger when the user mentions \"qedgen\", \"lean proof\", \"formal proof\", \"verify my code\", \"prove correctness\", \"formal verification\", or wants mathematical guarantees about their implementation.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-formal-verification\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-formal-verification\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M78B7Q7C5K54E01DN83A60KG","solana-dev","Use when user asks to \"build a Solana dapp\", \"write an Anchor program\", \"create a token\", \"debug Solana errors\", \"set up wallet connection\", \"test my Solana program\", \"deploy to devnet\", or \"explain Solana concepts\" (rent, accounts, PDAs, CPIs, etc.). Also use for quick on-chain lookups via public RPC + curl — \"what's the balance of \u003Cwallet>\", \"look up transaction \u003Csig>\", \"token balance for \u003Caccount>\", \"check this address on mainnet\u002Fdevnet\". End-to-end Solana development playbook covering wallet connection, Anchor\u002FPinocchio programs, Codama client generation, LiteSVM\u002FMollusk\u002FSurfpool testing, security checklists, and JSON-RPC curl lookups against public clusters. Integrates with the Solana MCP server for live documentation search. Prefers framework-kit (@solana\u002Fclient + @solana\u002Freact-hooks) for UI, wallet-standard-first connection (incl. ConnectorKit), @solana\u002Fkit for client\u002FRPC code, and @solana\u002Fweb3-compat for legacy boundaries.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-dev\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-dev\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M78B7HXD6N6GWKSVRQ8F6Q31","solana-common-errors","Diagnose and fix common Solana development errors — GLIBC mismatches, Anchor version conflicts, cargo build-sbf \u002F platform-tools failures, LiteSVM issues, edition2024 crate pins, RPC airdrops, and Anchor 0.29→0.32 migrations. Use when builds fail, Anchor CLI won't install, or CI breaks on Debian\u002FUbuntu.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fsolana-common-errors\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M78B6T7YSYWQ0N4DP40QDXEZ","skill-creator","Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fskill-creator\u002Flicense.txt","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":70,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M78B1VFT9X5AND7AE1HZPZGF","phantom-wallet-mcp","Execute wallet operations through the Phantom MCP server. Use when the user wants to interact with their Phantom wallet directly — get addresses, transfer SOL or SPL tokens, buy\u002Fswap tokens, sign transactions, and sign messages across Solana, Ethereum, Bitcoin, and Sui. Requires the @phantom\u002Fmcp-server to be configured as an MCP server.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Ftrain2earn\u002Fblob\u002Fmain\u002Fskillhub\u002Fskills\u002Fphantom-wallet-mcp\u002FSKILL.md",[],[]]