[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71NWWVM5JCA2X84XNQEG7Q2":3,"skill-same:01M71NWWVM5JCA2X84XNQEG7Q2":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":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M71NWWVM5JCA2X84XNQEG7Q2","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.","pattanation\u002FNorvik","pattanation","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235419268?v=4","01M71M5THHYYB15ME8R2E4FCZG","Patta","01M71M5TJM1NDM992M8PDKYR2K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\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],"recipe recommender","nemo mbridge recipe recommender","NeMo","recommender","recipe","for","count","library","recipes","recommend","config","goal","how","how to","training","performance","model","bridge","megatron","which","2026-11-10 10:56:23",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":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'.","claude\u002Finstall-gsd-build-foQdV","d86cd127f527124b5fd0fd0bc679a4d79b7d01d7",".agents\u002Fskills\u002Fnemo-mbridge-recipe-recommender","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik","https:\u002F\u002Fnorvik-orpin.vercel.app","https:\u002F\u002Fgithub.com\u002Fpattanation","2026-07-17 11:17:04",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add pattanation\u002FNorvik --skill nemo-mbridge-recipe-recommender",{"tool":58,"command":59},"bunx","bunx skills add pattanation\u002FNorvik --skill nemo-mbridge-recipe-recommender",{"tool":61,"command":62},"pnpm","pnpm dlx skills add pattanation\u002FNorvik --skill nemo-mbridge-recipe-recommender","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\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","参考文档",3876,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\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\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002Fevals\u002Fevals.json",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"skill-card.md",4188,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\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\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fnemo-mbridge-recipe-recommender\u002Fskill.oms.sig",[87,95,102,109,134,159],{"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":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":94},"01M73Z1NPMJ667E0DSPBS9FH0B","jetson-set-target","Switch the active Jetson target-platform pointer to an existing profile YAML. Use before customize\u002Fbuild\u002Fflash to change target; not for authoring profiles — use jetson-init-target instead.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fjetson-set-target\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":94},"01M73YC29YWGCW521P7B0NM3HQ","earth2studio-data-fetch","Fetch weather\u002Fclimate data via Earth2Studio data sources for specific variables and times. Do NOT use for inference pipelines, model discovery, or installation.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fearth2studio-data-fetch\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":94},"01M73YBNHMHFDFP83MAVGQQ92N","earth2studio-create-datasource","Create and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Do NOT use for fetching data with existing sources, model inference, or installation tasks.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fearth2studio-create-datasource\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":133},"01M71QDV4DM8T19HEHWATEF1K4","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[117,118,119,120,121,24,122,123,124,125,126,127,128,129,130,131,132],"webapp","testing","webapp testing","local","screenshots","applications","browser","ui","behavior","web","playwright","with","frontend","debugging","toolkit","logs","2026-11-10 13:02:02",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":138,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":133},"01M71QDH2GGMXGA9105C9W1N7B","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[142,126,143,144,145,146,147,148,149,150,151,152,24,153,154,129,155,156,157,158],"web artifacts builder","artifacts","artifacts builder","builder","multi","state","routing","state management","react","single-file","css","Tailwind","ui components","single","use","file","components",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":163,"licenseFileUrl":164,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":133},"01M71QD9T2XC3EWMQNN9ACNWQ1","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","MIT","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FSKILL.md",[],[168,169,170,171,172,173,174,175,176,177,178,179,180,181],"vueuse","vueuse functions","functions","composables","project","nuxt","apply","github","concise","build","https","features","vue","js"]