[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PQHC0EKWMTM0VWD5S2G1RP":3,"skill-same:01M6PQHC0EKWMTM0VWD5S2G1RP":86},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6PQHC0EKWMTM0VWD5S2G1RP","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.","headmktlucca-ui\u002Fneuroads-lp","headmktlucca-ui","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F247379838?v=4","01M6PDVAV6M1W96D1SR1PDF8CS","NeuroAds","01M6PDVAZ4P281GNDKD45CYTF5",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"nemo mbridge recipe recommender","NeMo","recipe","goal","count","recommend","for","which","megatron","how to","recipes","performance","bridge","model","how","library","gpu","training","customize","config","2026-11-10 10:12:30",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## Recipe Unification (Coming Soon — PR #2803)\n\nPR [#2803](https:\u002F\u002Fgithub.com\u002FNVIDIA-NeMo\u002FMegatron-Bridge\u002Fpull\u002F2803) is\nunifying performance recipes into the same **Python function** format used by\nlibrary recipes. Key changes:\n\n- Perf recipes move from `scripts\u002Fperformance\u002Fconfigs\u002F` → `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F\u003Cfamily>\u002F\u003Cmodel>_perf.py`\n- Each perf recipe becomes a **self-contained Python function** (e.g. `llama3_8b_h100_bf16_pretrain_config()`)\n- The old `WorkloadBaseConfig` → `set_workload_base_configs` → `get_perf_optimized_recipe` pipeline is removed\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\nAfter #2803 lands, both library and perf recipes will be invocable through the\nsame `run_recipe.py` entry point.\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\nAll perf recipes live under `scripts\u002Fperformance\u002F`. They are invoked via\n`run_script.py` and use `WorkloadBaseConfig` presets per GPU type.\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 | `scripts\u002Fperformance\u002F` |\n| Perf entry point | `scripts\u002Fperformance\u002Frun_script.py` |\n| Perf workload configs | `scripts\u002Fperformance\u002Fconfigs\u002F\u003Cfamily>\u002F` |\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## Recipe Unification (Coming Soon — PR #2803)\n\nPR [#2803](https:\u002F\u002Fgithub.com\u002FNVIDIA-NeMo\u002FMegatron-Bridge\u002Fpull\u002F2803) is\nunifying performance recipes into the same **Python function** format used by\nlibrary recipes. Key changes:\n\n- Perf recipes move from `scripts\u002Fperformance\u002Fconfigs\u002F` → `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F\u003Cfamily>\u002F\u003Cmodel>_perf.py`\n- Each perf recipe becomes a **self-contained Python function** (e.g. `llama3_8b_h100_bf16_pretrain_config()`)\n- The old `WorkloadBaseConfig` → `set_workload_base_configs` → `get_perf_optimized_recipe` pipeline is removed\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\nAfter #2803 lands, both library and perf recipes will be invocable through the\nsame `run_recipe.py` entry point.\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\nAll perf recipes live under `scripts\u002Fperformance\u002F`. They are invoked via\n`run_script.py` and use `WorkloadBaseConfig` presets per GPU type.\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 | `scripts\u002Fperformance\u002F` |\n| Perf entry point | `scripts\u002Fperformance\u002Frun_script.py` |\n| Perf workload configs | `scripts\u002Fperformance\u002Fconfigs\u002F\u003Cfamily>\u002F` |\n| Perf overrides (benchmark defaults) | `scripts\u002Fperformance\u002Futils\u002Foverrides.py` |\n",{"name":5,"license":15,"description":7,"when_to_use":44},"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","7a940b8e5af16c95e5c190a524421d32fc7445a9",".claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui","https:\u002F\u002Fneuroads.com.br","2026-08-12 00:42:44",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add headmktlucca-ui\u002Fneuroads-lp --skill nemo-mbridge-recipe-recommender",{"tool":58,"command":59},"bunx","bunx skills add headmktlucca-ui\u002Fneuroads-lp --skill nemo-mbridge-recipe-recommender",{"tool":61,"command":62},"pnpm","pnpm dlx skills add headmktlucca-ui\u002Fneuroads-lp --skill nemo-mbridge-recipe-recommender","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002FSKILL.md",true,[66,72,76,80],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"BENCHMARK.md","REFERENCE","参考文档",4332,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002FBENCHMARK.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fevals.json",2020,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002Fevals\u002Fevals.json",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"skill-card.md",3873,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002Fskill-card.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"skill.oms.sig","OTHER","其他",4609,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002Fskill.oms.sig",[87,114,138,164,182,216],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":102,"publishedAt":39},"01M6PTDCZTXTGSTX4RFK901YSZ","xunit-skill","Generates xUnit.net tests in C#. Covers Fact\u002FTheory, constructor injection, IClassFixture, and FluentAssertions. Use when user mentions \"xUnit\", \"[Fact]\", \"[Theory]\", \"Assert.Equal\", \"C# xUnit\". Triggers on: \"xUnit\", \"[Fact]\", \"[Theory]\", \"Assert.Equal C#\", \"xUnit.net\".","MIT","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxunit-skill\u002FSKILL.md",[94,99],{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":100,"categoryName":101,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000023","Skill与智能体开发",[103,104,105,106,107,108,109,110,111,112,113],"xunit","xunit skill","testing","injection","user","use","tests","triggers","unit","unit-testing","C#",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":122,"publishedAt":39},"01M6PTCB59ZTG5FTMWGPYEMMBP","xcuitest-skill","Generates XCUITest UI tests for iOS\u002FiPadOS apps in Swift. Apple's native testing framework for reliable, fast UI automation. Supports local simulators and TestMu AI cloud real devices. Use when user mentions \"XCUITest\", \"XCTest\", \"iOS UI test\", \"Swift test\", \"XCUIApplication\". Triggers on: \"XCUITest\", \"XCTest UI\", \"iOS UI test\", \"Swift UI test\", \"XCUIApplication\", \"TestMu\".","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxcuitest-skill\u002FSKILL.md",[120,121],{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},{"categoryNo":100,"categoryName":101,"taxonomyType":97,"taxonomyTypeDesc":98},[123,124,105,125,126,127,128,129,108,130,131,132,133,134,109,110,135,136,25,137],"xcuitest","xcuitest skill","automation","test","testing framework","ios","devices","mobile","mobile-testing","ui test","local","apple","apps","native","objective",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":148,"publishedAt":39},"01M6PTATMNTY9NF4J7KSR76YK6","world-builder","Create and manage generative game zones for Dorothy's Pokemon-style world. Use this skill when creating, updating, or designing game worlds via MCP tools.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworld-builder\u002FSKILL.md",[144,147],{"categoryNo":145,"categoryName":146,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":100,"categoryName":101,"taxonomyType":97,"taxonomyTypeDesc":98},[149,150,151,152,153,154,155,156,108,157,158,159,160,161,162,25,163],"builder","world","world builder","MCP","create","mcp tools","Tools","game","pokemon","manage","style","via","theme","zone","generative",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":172,"publishedAt":39},"01M6PT9Z92JTSQEHE1QR0NNW5F","webdriverio-skill","Generates WebdriverIO (WDIO) automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Use when user mentions \"WebdriverIO\", \"WDIO\", \"wdio.conf\", \"browser.url\", \"$\", \"$$\". Triggers on: \"WebdriverIO\", \"WDIO\", \"wdio\", \"browser.$\".","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwebdriverio-skill\u002FSKILL.md",[170,171],{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},{"categoryNo":100,"categoryName":101,"taxonomyType":97,"taxonomyTypeDesc":98},[173,105,174,125,175,176,177,178,107,108,179,133,109,110,180,181],"webdriverio skill","typescript","javascript","browser","cloud","e2e","e2e-testing","URL","conf",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":197,"publishedAt":39},"01M6PT9NVK36ZWCQ69YXK3FR4K","web-design-guidelines","Web platform design and accessibility guidelines. Use when building web interfaces, auditing accessibility, implementing responsive layouts, or reviewing web UI code. Triggers on tasks involving HTML, CSS, web components, WCAG compliance, responsive design, or web performance.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb\u002FSKILL.md",[188,191,192],{"categoryNo":189,"categoryName":190,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":145,"categoryName":146,"taxonomyType":97,"taxonomyTypeDesc":98},{"categoryNo":193,"categoryName":194,"taxonomyType":195,"taxonomyTypeDesc":196},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[198,199,200,201,202,203,30,204,205,206,207,208,209,210,211,212,213,214,110,215],"design","web","guidelines","web design guidelines","web design","css","components","web components","tasks","code","web performance","ui","platform design","html","responsive design","responsive","platform","implementing",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":224,"publishedAt":39},"01M6PT9A3JKRE3X34276F2FW5R","watchos-design-guidelines","Apple Human Interface Guidelines for Apple Watch. Use when building watchOS apps, complications, or workout features. Triggers on tasks involving Watch UI, Digital Crown, glanceable interfaces, or wrist-based interactions.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwatchos\u002FSKILL.md",[222,223],{"categoryNo":145,"categoryName":146,"taxonomyType":97,"taxonomyTypeDesc":98},{"categoryNo":193,"categoryName":194,"taxonomyType":195,"taxonomyTypeDesc":196},[198,200,225,206,209,108,226,227,134,214,228,110,135,229,25,230,231],"watchos design guidelines","workout","human","watch","interface","platform-design","features"]