[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78D1APJG96PWGF13NSMWVM5":3,"skill-same:01M78D1APJG96PWGF13NSMWVM5":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M78D1APJG96PWGF13NSMWVM5","nemo-mbridge-recipe-recommender",null,"Recommend and customize Megatron Bridge recipes for a user's model, GPU count, and training goal. Indexes library recipes (pretrain\u002FSFT\u002FPEFT) and performance recipes.","Solizardking\u002Fskillhub-main","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786NYYXSZK1D05WM8JQPC48",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nemo-mbridge-recipe-recommender\nlicense: Apache-2.0\ndescription: Recommend and customize Megatron Bridge recipes for a user's model, GPU count, and training goal. Indexes library recipes (pretrain\u002FSFT\u002FPEFT) and performance recipes.\nwhen_to_use: User wants a starting recipe or training config; 'which recipe', 'recommend recipe', 'how to train Llama', 'starting config for X GPUs', 'what recipe for SFT'.\n---\n\n# Auto Recipe — Recipe Index & Recommendation\n\nThis skill indexes every shipped recipe and helps users pick the right starting\nconfig, adjust parallelism, and avoid common pitfalls.\n\n## How to Use This Skill\n\n1. Ask the user for: **model name\u002Fsize**, **GPU count & type**, **training goal**\n   (pretrain \u002F SFT \u002F PEFT), and **sequence length** (if non-default).\n2. Look up the best-match recipe in the index below.\n3. Recommend the recipe function name + entry-point command.\n4. Provide adjustment advice (parallelism resizing, batch tuning, pitfalls).\n\n## First Answer Checklist\n\nWhen recommending recipes, always include these distinctions before the long\nindex details:\n\n1. **Library recipes** under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` are for functional\n   training and use `scripts\u002Ftraining\u002Frun_recipe.py`.\n2. **Performance recipes** under `scripts\u002Fperformance\u002F` are for upper-bound\n   throughput benchmarks. They use mock data and should not be presented as\n   production training recipes.\n3. For a first-time Bridge smoke test, recommend `llama3_8b_sft_config` with\n   mock data via `--dataset llm-pretrain-mock`. Do not use `llm-finetune` for\n   the setup-only tryout unless the user specifically asks for an SFT data path.\n4. For normal SFT recommendations, use `--dataset llm-finetune`; for pretrain\n   and mock validation recommendations, use `--dataset llm-pretrain-mock`.\n5. After the recipe and dataset, give the required resizing rules: TP must\n   divide `num_key_value_heads`, keep TP within one node unless using\n   NVL72-class interconnect, enable SP when TP > 1, configure CP for long\n   context, DP is implicit, and reduce `micro_batch_size` first on OOM.\n\n---\n\n## Entry Points\n\n### Library recipes (functional training)\n\n```bash\n# Pretrain with mock data\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-pretrain-mock\n\n# SFT with SQuAD\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-finetune\n\n# Override any field via CLI\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.tensor_model_parallel_size=2' \\\n    'training.global_batch_size=64'\n```\n\n### Performance recipes (throughput benchmarks)\n\n```bash\npython scripts\u002Fperformance\u002Frun_script.py \\\n    --recipe \u003Cmodel_family> \\\n    --gpu_type h100 \\\n    --num_gpus 64 \\\n    --data mock\n```\n\nSee the Performance Recipe Index for important caveats before using these for anything beyond throughput benchmarking.\n\n---\n\n## Perf Recipe Layout\n\nPerformance recipes use the same **Python function** format as library recipes,\nbut live in a dedicated namespace for throughput benchmarking:\n\n- Perf recipes live in `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F\u003Cfamily>\u002F\u003Chardware>\u002F\u003Cmodel>.py`\n- Each perf recipe is a **self-contained Python function** (e.g. `llama3_8b_pretrain_8gpu_h100_bf16_config()`)\n- Recipe names encode model, task, GPU count, hardware, precision, and optional variant\n- `scripts\u002Fperformance\u002Futils\u002Futils.py` derives compatibility `WorkloadBaseConfig` views from the flat recipe itself\n- Shared helpers: `_benchmark_common()` (50 iters, timing, TE RNG), `_perf_precision()` (bf16 \u002F fp8_cs \u002F fp8_mx \u002F nvfp4)\n\n**Why Python, not YAML?** Previous YAML-based approaches had problems:\nrecipe logic was split across multiple indirection layers, configs were not\nself-contained, and the two-level pipeline made maintenance and debugging\ndifficult. Python functions are explicit, greppable, and composable.\n\nThe training launcher can invoke both library recipes and perf recipes without\nthe removed legacy config package.\n\n---\n\n## Library Recipe Index\n\nAll recipes live under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F`. Each function returns a\n`ConfigContainer` with model, training, optimizer, and data settings.\n\n### Llama\n\n| Recipe | Mode | TP | PP | CP | SP | GPUs (min) | Seq Len |\n|--------|------|----|----|----|----|------------|---------|\n| `llama2_7b_pretrain_config` | Pretrain | 2 | 1 | — | — | 2 | 4K |\n| `llama3_8b_pretrain_config` | Pretrain | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_8b_16k_pretrain_config` | Pretrain | 2 | 1 | 2 | ✓ | 4 | 16K |\n| `llama3_8b_64k_pretrain_config` | Pretrain | 2 | 1 | 4 | ✓ | 8 | 64K |\n| `llama3_8b_128k_pretrain_config` | Pretrain | 2 | 1 | 8 | ✓ | 16 | 128K |\n| `llama3_70b_pretrain_config` | Pretrain | 8 | 4 | — | ✓ | 32 | 8K |\n| `llama3_70b_16k_pretrain_config` | Pretrain | 8 | 4 | 2 | ✓ | 64 | 16K |\n| `llama3_70b_64k_pretrain_config` | Pretrain | 8 | 4 | 4 | ✓ | 128 | 64K |\n| `llama31_405b_pretrain_config` | Pretrain | 8 | 16 | — | ✓ | 128 | 8K |\n| `llama3_8b_sft_config` | SFT | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_70b_sft_config` | SFT | 4 | 4 | — | ✓ | 16 | 8K |\n| `llama31_405b_sft_config` | SFT | 8 | 8 | — | ✓ | 64 | 8K |\n| `llama3_8b_peft_config` | PEFT | 1 | 1 | — | — | 1 | 8K |\n| `llama3_70b_peft_config` | PEFT | 2 | 4 | — | ✓ | 8 | 8K |\n| `llama31_405b_peft_config` | PEFT | 4 | 8 | — | ✓ | 32 | 8K |\n\n### Qwen2 \u002F Qwen2.5\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `qwen2_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 7B, 14B, 32B, 72B |\n| `qwen25_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 3B, 7B, 14B, 32B, 72B |\n\n### Qwen3 (Dense)\n\n| Recipe | Mode | TP | PP | CP | Sizes |\n|--------|------|----|----|-----|-------|\n| `qwen3_*_pretrain_config` | Pretrain | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_*_sft_config` | SFT | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_600m_sft_128k_config` | SFT | 1 | 1 | 8 | 600M (128K seq) |\n| `qwen3_*_peft_config` | PEFT | 1 | 1 | — | 600M–32B |\n\n### Qwen3 MoE\n\n| Recipe | Mode | TP | PP | EP | CP | GPUs |\n|--------|------|----|----|----|----|------|\n| `qwen3_30b_a3b_pretrain_config` | Pretrain | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_sft_config` | SFT | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_peft_config` | PEFT | 1 | 1 | 1 | — | 1 |\n| `qwen3_235b_a22b_pretrain_config` | Pretrain | 4 | 16 | 8 | 2 | 512+ |\n| `qwen3_235b_a22b_sft_config` | SFT | 4 | 8 | 8 | — | 256 |\n| `qwen3_235b_a22b_peft_config` | PEFT | 1 | 4 | 4 | — | 16 |\n\n### Qwen3-Next\n\n| Recipe | Mode | TP | PP | EP |\n|--------|------|----|----|-----|\n| `qwen3_next_80b_a3b_pretrain_config` | Pretrain | 1 | 4 | 8 |\n| `qwen3_next_80b_a3b_sft_config` | SFT | 1 | 2 | 8 |\n| `qwen3_next_80b_a3b_peft_config` | PEFT | 1 | 1 | 4 |\n\n### DeepSeek\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `deepseek_v2_lite_pretrain_config` | Pretrain | 1 | 1 | 8 | 8 |\n| `deepseek_v2_pretrain_config` | Pretrain | 1 | 4 | 32 | 128 |\n| `deepseek_v3_pretrain_config` | Pretrain | 2 | 16 | 64 | 2048 |\n| `deepseek_v3_pretrain_config_32nodes` | Pretrain | 2 | 8 | 32 | 256 |\n\n### GLM-4.5\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `glm45_355b_pretrain_config` | Pretrain | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_pretrain_config` | Pretrain | 1 | 4 | 8 | 32 |\n| `glm45_355b_sft_config` | SFT | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_sft_config` | SFT | 1 | 4 | 8 | 32 |\n| `glm45_355b_peft_config` | PEFT | 2 | 4 | 4 | 32 |\n| `glm45_air_106b_peft_config` | PEFT | 1 | 2 | 4 | 8 |\n\n### Gemma\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `gemma2_*_{pretrain,sft,peft}_config` | All | 2–8 | 1–2 | 2B, 9B, 27B |\n| `gemma3_1b_{pretrain,sft,peft}_config` | All | 1 | 1 | 1B (32K seq) |\n\n### NemotronH \u002F Nemotron\n\n| Recipe | Mode | TP | PP | EP | Notes |\n|--------|------|----|----|-----|-------|\n| `nemotronh_{4b,8b,47b,56b}_*_config` | P\u002FS\u002FPEFT | 1–8 | 1–4 | — | Dense SSM-hybrid |\n| `nemotron_3_nano_*_config` | P\u002FS\u002FPEFT | varies | 1 | 8 | MoE + Mamba |\n| `nemotron_3_super_*_config` | P\u002FS\u002FPEFT | 4 | 1 | 8 | MoE + Mamba, ~40% CUDA graph gain |\n| `nemotron_nano_{9b,12b}_v2_*_config` | P\u002FS\u002FPEFT | varies | 1 | — | Dense |\n\n### Other Models\n\n| Recipe | Mode | Notes |\n|--------|------|-------|\n| `moonlight_16b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `olmoe_7b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `ministral3_{3b,8b,14b}_{sft,peft}_config` | SFT\u002FPEFT | Dense |\n| `gpt_oss_20b_*_config` | All | MoE + FP8\u002FMXFP8 variants |\n| `gpt_oss_120b_*_config` | All | MoE |\n| `vanilla_gpt_pretrain_config` | Pretrain | MLM\u002FBridge parity baseline |\n| `gpt3_175b_pretrain_config` | Pretrain | TP=4, PP=8, VP=6 |\n| `kimi_k2_pretrain_config` | Pretrain | 1T MoE, TP=2 PP=16 EP=32 |\n\n### VLM Recipes\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `gemma3_vl_{4b,12b,27b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–2 | — | 1–16 |\n| `qwen25_vl_{3b,7b,32b,72b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–4 | — | 1–32 |\n| `qwen3_vl_{8b,30b_a3b,235b_a22b}_{sft,peft}_config` | SFT\u002FPEFT | 1–4 | 1–8 | 1–32 | 1–512 |\n| `qwen35_vl_*_{sft,peft}_config` | SFT\u002FPEFT | varies | varies | varies | varies |\n| `glm_45v_{sft,peft}_config` | SFT\u002FPEFT | 1 | 8 | 4–16 | 64–512 |\n| `nemotron_nano_v2_vl_12b_{sft,peft}_config` | SFT\u002FPEFT | 2–4 | 1 | — | 8 |\n\n### Diffusion Recipes\n\n| Recipe | Mode | TP | CP |\n|--------|------|----|----|\n| `wan_1_3B_{pretrain,sft}_config` | P\u002FSFT | 1 | 8 |\n| `wan_14B_{pretrain,sft}_config` | P\u002FSFT | 2 | 4 |\n| `flux_12b_{pretrain,sft}_config` | P\u002FSFT | 2 | 1 |\n\n---\n\n## Performance Recipe Index\n\nPerf recipe source lives under `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F`. The\nperformance launcher in `scripts\u002Fperformance\u002F` resolves those flat recipe names\nand derives compatibility workload views from the selected flat recipe when\nlegacy helper paths still need them.\n\n> **Important:** Perf recipes are designed for **upper-bound throughput\n> benchmarks**, not production training. They run **50 iterations** on **mock\n> data** by default. Throughput numbers are aspirational targets, not validated\n> convergence configs.\n\n### Llama 3 \u002F 3.1\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Llama 3 8B | 8 | H100, B200, B300, GB200, GB300, R100 | CUDA graphs (local), FSDP on GB variants |\n| Llama 3 70B | 64 | H100, B200, B300, GB200, GB300 | TP comm overlap (userbuffers), FSDP, CUDA graphs |\n| Llama 3.1 405B | 128–1024 | H100, B200, B300, GB200, GB300 | TP+CP comm overlap (userbuffers), FSDP, heavy PP\u002FVP |\n\nSFT\u002FLoRA variants also exist (e.g. 8B SFT with packed sequences, 70B SFT on 32 GPUs).\n\n### DeepSeek V3\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| DeepSeek V3 (671B MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | HybridEP dispatcher, MLA recompute, CUDA graphs (TE scoped) |\n\n### Qwen3 MoE\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | MoE alltoall\u002Fflex dispatcher |\n| Qwen3 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | TP comm overlap, CUDA graphs, MoE a2a overlap |\n| Qwen3-Next 80B-A3B | 64–128 | H100, B200, B300, GB200, GB300 | EP 64–128 |\n\n### Qwen3-VL\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3-VL 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | VLM + MoE |\n| Qwen3-VL 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | VLM + MoE, TP comm overlap |\n\n### Kimi K2\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Kimi K2 (1T MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | Muon\u002FAdam optimizer, HybridEP, pipeline layout helpers |\n\n### NemotronH\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Nemotron 3 Nano (30B MoE+Mamba) | 8–16 | H100, B200, B300, GB200, GB300 | TE CUDA graphs (attn+mamba+moe), HybridEP |\n| Nemotron 3 Super | 64 | H100, B200, B300, GB200, GB300 | TE CUDA graphs, EP=64 |\n| NemotronH 56B | 64 | H100, B200, B300 | TP=2–8, TE graphs (mamba+attn) |\n\n### GPT-OSS\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| GPT-OSS 120B | 64 | H100, B200, GB200 | EP=64, HybridEP on GB200 |\n\n---\n\n## Recommendation Decision Tree\n\n```text\nUser wants to train a model\n│\n├─ Know the model name?\n│   ├─ Yes → Look up in Library Recipe Index above\n│   │   ├─ Has a recipe for their size + mode? → Use it directly\n│   │   └─ No exact match? → Use closest size, adjust parallelism\n│   └─ No → Ask for model name, size, and HF model ID\n│\n├─ What's the training goal?\n│   ├─ Pretrain → Use *_pretrain_config\n│   ├─ SFT (full fine-tune) → Use *_sft_config\n│   └─ PEFT (LoRA\u002FDoRA) → Use *_peft_config (lowest GPU requirement)\n│\n├─ How many GPUs?\n│   ├─ 1 GPU → Only PEFT recipes work (TP=1, PP=1)\n│   ├─ 8 GPUs (1 node) → Most 8B–16B models, small MoE (EP=8)\n│   ├─ 16–64 GPUs → 70B dense, medium MoE\n│   └─ 128+ GPUs → 405B+, large MoE (DeepSeek V3, Kimi K2)\n│\n├─ Want throughput benchmarks?\n│   ├─ Yes → Use perf recipes (scripts\u002Fperformance\u002F)\n│   │   └─ ⚠️ These run on mock data for upper-bound perf only\n│   └─ No → Use library recipes (scripts\u002Ftraining\u002Frun_recipe.py)\n│\n└─ Long context?\n    ├─ > 8K → Need CP (context parallelism), check *_16k \u002F *_64k \u002F *_128k variants\n    └─ ≤ 8K → Default recipes work\n```\n\n---\n\n## Adjustment Advice (When Recommending)\n\n### Parallelism Resizing Rules\n\nWhen the user's GPU count differs from the recipe default:\n\n1. **TP must divide `num_key_value_heads`** (GQA constraint). E.g. if\n   `num_key_value_heads=8`, valid TP = {1, 2, 4, 8}.\n2. **TP should stay within a single node** (NVLink). TP > 8 requires\n   inter-node NVLink (e.g., GB200 NVL72).\n3. **PP adds pipeline bubbles.** Minimize PP; only increase when TP alone can't\n   fit the model. Use VP (virtual pipeline) to mitigate bubble overhead.\n4. **EP doesn't reduce dense-layer memory.** Only expert parameters shard with\n   EP. Shared attention\u002Fembeddings are replicated. For \"OOM with MoE\", increase\n   EP first, not TP.\n5. **SP should be True whenever TP > 1.** It eliminates redundant activation\n   copies and is essentially free.\n6. **CP requires all-to-all or ring attention.** Check `cp_comm_type`. For\n   GQA models, `a2a+p2p` hierarchical CP allows CP > num_kv_heads.\n7. **world_size = DP × TP × PP × CP × EP.** DP is implicit. Make sure the\n   product of explicit parallelisms divides your total GPU count.\n\n### Batch Size Tuning\n\n- Start with the recipe's `micro_batch_size`. If OOM, reduce to 1.\n- `global_batch_size` determines learning dynamics. Scale with DP:\n  `GBS = micro_batch_size × DP × gradient_accumulation_steps`.\n- For MoE, `micro_batch_size=1` is typical at scale.\n\n### Common Pitfalls to Warn About\n\n| Pitfall | Symptom | Fix |\n|---------|---------|-----|\n| TP > num_kv_heads | Crash: \"TP must divide num_query_groups\" | Reduce TP to a divisor of num_kv_heads |\n| PP without VP | Poor throughput (large bubble) | Set `virtual_pipeline_model_parallel_size` |\n| EP too low for large MoE | OOM on expert params | Increase EP; each expert lives on EP\u002Fnum_experts ranks |\n| CUDA graphs + packed sequences | Assert: \"CUDA graph accepts only Tensor inputs\" | Disable packing or use `local` full-iteration graphs |\n| CUDA graphs + full recompute | Assert: \"full recompute only with full iteration CUDA graph\" | Disable recompute or switch to `local` impl |\n| `use_te_rng_tracker` not set | Assert on provider init when CUDA graphs enabled | Set `cfg.model.use_te_rng_tracker = True` and `cfg.rng.te_rng_tracker = True` |\n| FSDP + TP > 1 on H100 | Possible comm bottleneck | Prefer FSDP with TP=1 or TP=2 on H100; FSDP shines on GB\u002FB-series |\n| Long context without CP | OOM on activations | Add CP=2\u002F4\u002F8; use `*_16k`, `*_64k`, or `*_128k` recipe variants |\n| MoE `overlap_grad_reduce` on H100 | May hurt perf (False in many H100 presets) | Set `overlap_grad_reduce=False` for MoE on H100 |\n| VLM SFT missing image data | Runs but produces garbage | Provide actual multimodal dataset or use mock VLM data |\n| Qwen35-VL MoE FSDP | Tested on Blackwell only | May not work on H100; validate first |\n\n### Recipe Override Examples\n\n```bash\n# Scale Llama3 8B from 2 GPUs to 8 GPUs (increase DP)\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock\n\n# Reduce parallelism for Qwen3-MoE 30B to fit on 4 GPUs\nuv run python -m torch.distributed.run --nproc_per_node=4 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_sft_config \\\n    --dataset llm-finetune \\\n    'model.expert_model_parallel_size=4'\n\n# Add long context to an existing recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.seq_length=32768' \\\n    'model.context_parallel_size=4'\n\n# Enable CUDA graphs on any recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.cuda_graph_impl=transformer_engine' \\\n    'model.cuda_graph_scope=[attn,moe_router,moe_preprocess]' \\\n    'model.use_te_rng_tracker=True' \\\n    'rng.te_rng_tracker=True'\n```\n\n---\n\n## Quick Reference: Which Recipe for My Situation?\n\n| I want to... | Start with | GPUs needed |\n|---|---|---|\n| Try Bridge for the first time | `llama3_8b_sft_config` + mock data | 2 |\n| Fine-tune a 7-8B model | `llama3_8b_sft_config` or `qwen3_8b_sft_config` | 2–8 |\n| LoRA on 1 GPU | `llama3_8b_peft_config` or `qwen3_8b_peft_config` | 1 |\n| Pretrain a dense 70B | `llama3_70b_pretrain_config` | 32–64 |\n| Train a small MoE | `qwen3_30b_a3b_pretrain_config` | 8 |\n| Train a large MoE (235B+) | `qwen3_235b_a22b_pretrain_config` | 256–512 |\n| Benchmark throughput | Perf recipes via `run_script.py` | Varies |\n| Long-context training | `llama3_8b_128k_pretrain_config` or add CP override | 16+ |\n| VLM fine-tuning | `qwen3_vl_8b_sft_config` or `gemma3_vl_*_sft_config` | 4–8 |\n| Diffusion training | `wan_1_3B_pretrain_config` or `flux_12b_pretrain_config` | 8 |\n\n---\n\n## Code Anchors\n\n| What | Path |\n|------|------|\n| Library recipes root | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` |\n| Recipe `__init__.py` (all exports) | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F__init__.py` |\n| Common recipe helpers | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Fcommon.py` |\n| Training entry point | `scripts\u002Ftraining\u002Frun_recipe.py` |\n| Perf recipes root | `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F` |\n| Perf entry point | `scripts\u002Fperformance\u002Frun_script.py` |\n| Perf recipe helpers | `scripts\u002Fperformance\u002Futils\u002Futils.py` |\n| Perf overrides (benchmark defaults) | `scripts\u002Fperformance\u002Futils\u002Foverrides.py` |\n","# Auto Recipe — Recipe Index & Recommendation\n\nThis skill indexes every shipped recipe and helps users pick the right starting\nconfig, adjust parallelism, and avoid common pitfalls.\n\n## How to Use This Skill\n\n1. Ask the user for: **model name\u002Fsize**, **GPU count & type**, **training goal**\n   (pretrain \u002F SFT \u002F PEFT), and **sequence length** (if non-default).\n2. Look up the best-match recipe in the index below.\n3. Recommend the recipe function name + entry-point command.\n4. Provide adjustment advice (parallelism resizing, batch tuning, pitfalls).\n\n## First Answer Checklist\n\nWhen recommending recipes, always include these distinctions before the long\nindex details:\n\n1. **Library recipes** under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` are for functional\n   training and use `scripts\u002Ftraining\u002Frun_recipe.py`.\n2. **Performance recipes** under `scripts\u002Fperformance\u002F` are for upper-bound\n   throughput benchmarks. They use mock data and should not be presented as\n   production training recipes.\n3. For a first-time Bridge smoke test, recommend `llama3_8b_sft_config` with\n   mock data via `--dataset llm-pretrain-mock`. Do not use `llm-finetune` for\n   the setup-only tryout unless the user specifically asks for an SFT data path.\n4. For normal SFT recommendations, use `--dataset llm-finetune`; for pretrain\n   and mock validation recommendations, use `--dataset llm-pretrain-mock`.\n5. After the recipe and dataset, give the required resizing rules: TP must\n   divide `num_key_value_heads`, keep TP within one node unless using\n   NVL72-class interconnect, enable SP when TP > 1, configure CP for long\n   context, DP is implicit, and reduce `micro_batch_size` first on OOM.\n\n---\n\n## Entry Points\n\n### Library recipes (functional training)\n\n```bash\n# Pretrain with mock data\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-pretrain-mock\n\n# SFT with SQuAD\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe \u003Crecipe_function_name> \\\n    --dataset llm-finetune\n\n# Override any field via CLI\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.tensor_model_parallel_size=2' \\\n    'training.global_batch_size=64'\n```\n\n### Performance recipes (throughput benchmarks)\n\n```bash\npython scripts\u002Fperformance\u002Frun_script.py \\\n    --recipe \u003Cmodel_family> \\\n    --gpu_type h100 \\\n    --num_gpus 64 \\\n    --data mock\n```\n\nSee the Performance Recipe Index for important caveats before using these for anything beyond throughput benchmarking.\n\n---\n\n## Perf Recipe Layout\n\nPerformance recipes use the same **Python function** format as library recipes,\nbut live in a dedicated namespace for throughput benchmarking:\n\n- Perf recipes live in `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F\u003Cfamily>\u002F\u003Chardware>\u002F\u003Cmodel>.py`\n- Each perf recipe is a **self-contained Python function** (e.g. `llama3_8b_pretrain_8gpu_h100_bf16_config()`)\n- Recipe names encode model, task, GPU count, hardware, precision, and optional variant\n- `scripts\u002Fperformance\u002Futils\u002Futils.py` derives compatibility `WorkloadBaseConfig` views from the flat recipe itself\n- Shared helpers: `_benchmark_common()` (50 iters, timing, TE RNG), `_perf_precision()` (bf16 \u002F fp8_cs \u002F fp8_mx \u002F nvfp4)\n\n**Why Python, not YAML?** Previous YAML-based approaches had problems:\nrecipe logic was split across multiple indirection layers, configs were not\nself-contained, and the two-level pipeline made maintenance and debugging\ndifficult. Python functions are explicit, greppable, and composable.\n\nThe training launcher can invoke both library recipes and perf recipes without\nthe removed legacy config package.\n\n---\n\n## Library Recipe Index\n\nAll recipes live under `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F`. Each function returns a\n`ConfigContainer` with model, training, optimizer, and data settings.\n\n### Llama\n\n| Recipe | Mode | TP | PP | CP | SP | GPUs (min) | Seq Len |\n|--------|------|----|----|----|----|------------|---------|\n| `llama2_7b_pretrain_config` | Pretrain | 2 | 1 | — | — | 2 | 4K |\n| `llama3_8b_pretrain_config` | Pretrain | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_8b_16k_pretrain_config` | Pretrain | 2 | 1 | 2 | ✓ | 4 | 16K |\n| `llama3_8b_64k_pretrain_config` | Pretrain | 2 | 1 | 4 | ✓ | 8 | 64K |\n| `llama3_8b_128k_pretrain_config` | Pretrain | 2 | 1 | 8 | ✓ | 16 | 128K |\n| `llama3_70b_pretrain_config` | Pretrain | 8 | 4 | — | ✓ | 32 | 8K |\n| `llama3_70b_16k_pretrain_config` | Pretrain | 8 | 4 | 2 | ✓ | 64 | 16K |\n| `llama3_70b_64k_pretrain_config` | Pretrain | 8 | 4 | 4 | ✓ | 128 | 64K |\n| `llama31_405b_pretrain_config` | Pretrain | 8 | 16 | — | ✓ | 128 | 8K |\n| `llama3_8b_sft_config` | SFT | 2 | 1 | — | ✓ | 2 | 8K |\n| `llama3_70b_sft_config` | SFT | 4 | 4 | — | ✓ | 16 | 8K |\n| `llama31_405b_sft_config` | SFT | 8 | 8 | — | ✓ | 64 | 8K |\n| `llama3_8b_peft_config` | PEFT | 1 | 1 | — | — | 1 | 8K |\n| `llama3_70b_peft_config` | PEFT | 2 | 4 | — | ✓ | 8 | 8K |\n| `llama31_405b_peft_config` | PEFT | 4 | 8 | — | ✓ | 32 | 8K |\n\n### Qwen2 \u002F Qwen2.5\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `qwen2_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 7B, 14B, 32B, 72B |\n| `qwen25_*_{pretrain,sft,peft}_config` | All | 1–8 | 1–4 | 500M, 1.5B, 3B, 7B, 14B, 32B, 72B |\n\n### Qwen3 (Dense)\n\n| Recipe | Mode | TP | PP | CP | Sizes |\n|--------|------|----|----|-----|-------|\n| `qwen3_*_pretrain_config` | Pretrain | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_*_sft_config` | SFT | 1–8 | 1–2 | — | 600M–32B |\n| `qwen3_600m_sft_128k_config` | SFT | 1 | 1 | 8 | 600M (128K seq) |\n| `qwen3_*_peft_config` | PEFT | 1 | 1 | — | 600M–32B |\n\n### Qwen3 MoE\n\n| Recipe | Mode | TP | PP | EP | CP | GPUs |\n|--------|------|----|----|----|----|------|\n| `qwen3_30b_a3b_pretrain_config` | Pretrain | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_sft_config` | SFT | 1 | 1 | 8 | — | 8 |\n| `qwen3_30b_a3b_peft_config` | PEFT | 1 | 1 | 1 | — | 1 |\n| `qwen3_235b_a22b_pretrain_config` | Pretrain | 4 | 16 | 8 | 2 | 512+ |\n| `qwen3_235b_a22b_sft_config` | SFT | 4 | 8 | 8 | — | 256 |\n| `qwen3_235b_a22b_peft_config` | PEFT | 1 | 4 | 4 | — | 16 |\n\n### Qwen3-Next\n\n| Recipe | Mode | TP | PP | EP |\n|--------|------|----|----|-----|\n| `qwen3_next_80b_a3b_pretrain_config` | Pretrain | 1 | 4 | 8 |\n| `qwen3_next_80b_a3b_sft_config` | SFT | 1 | 2 | 8 |\n| `qwen3_next_80b_a3b_peft_config` | PEFT | 1 | 1 | 4 |\n\n### DeepSeek\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `deepseek_v2_lite_pretrain_config` | Pretrain | 1 | 1 | 8 | 8 |\n| `deepseek_v2_pretrain_config` | Pretrain | 1 | 4 | 32 | 128 |\n| `deepseek_v3_pretrain_config` | Pretrain | 2 | 16 | 64 | 2048 |\n| `deepseek_v3_pretrain_config_32nodes` | Pretrain | 2 | 8 | 32 | 256 |\n\n### GLM-4.5\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `glm45_355b_pretrain_config` | Pretrain | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_pretrain_config` | Pretrain | 1 | 4 | 8 | 32 |\n| `glm45_355b_sft_config` | SFT | 2 | 8 | 16 | 256 |\n| `glm45_air_106b_sft_config` | SFT | 1 | 4 | 8 | 32 |\n| `glm45_355b_peft_config` | PEFT | 2 | 4 | 4 | 32 |\n| `glm45_air_106b_peft_config` | PEFT | 1 | 2 | 4 | 8 |\n\n### Gemma\n\n| Recipe | Mode | TP | PP | Sizes |\n|--------|------|----|----|-------|\n| `gemma2_*_{pretrain,sft,peft}_config` | All | 2–8 | 1–2 | 2B, 9B, 27B |\n| `gemma3_1b_{pretrain,sft,peft}_config` | All | 1 | 1 | 1B (32K seq) |\n\n### NemotronH \u002F Nemotron\n\n| Recipe | Mode | TP | PP | EP | Notes |\n|--------|------|----|----|-----|-------|\n| `nemotronh_{4b,8b,47b,56b}_*_config` | P\u002FS\u002FPEFT | 1–8 | 1–4 | — | Dense SSM-hybrid |\n| `nemotron_3_nano_*_config` | P\u002FS\u002FPEFT | varies | 1 | 8 | MoE + Mamba |\n| `nemotron_3_super_*_config` | P\u002FS\u002FPEFT | 4 | 1 | 8 | MoE + Mamba, ~40% CUDA graph gain |\n| `nemotron_nano_{9b,12b}_v2_*_config` | P\u002FS\u002FPEFT | varies | 1 | — | Dense |\n\n### Other Models\n\n| Recipe | Mode | Notes |\n|--------|------|-------|\n| `moonlight_16b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `olmoe_7b_{pretrain,sft,peft}_config` | All | MoE EP=8 |\n| `ministral3_{3b,8b,14b}_{sft,peft}_config` | SFT\u002FPEFT | Dense |\n| `gpt_oss_20b_*_config` | All | MoE + FP8\u002FMXFP8 variants |\n| `gpt_oss_120b_*_config` | All | MoE |\n| `vanilla_gpt_pretrain_config` | Pretrain | MLM\u002FBridge parity baseline |\n| `gpt3_175b_pretrain_config` | Pretrain | TP=4, PP=8, VP=6 |\n| `kimi_k2_pretrain_config` | Pretrain | 1T MoE, TP=2 PP=16 EP=32 |\n\n### VLM Recipes\n\n| Recipe | Mode | TP | PP | EP | GPUs |\n|--------|------|----|----|-----|------|\n| `gemma3_vl_{4b,12b,27b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–2 | — | 1–16 |\n| `qwen25_vl_{3b,7b,32b,72b}_{sft,peft}_config` | SFT\u002FPEFT | 1–8 | 1–4 | — | 1–32 |\n| `qwen3_vl_{8b,30b_a3b,235b_a22b}_{sft,peft}_config` | SFT\u002FPEFT | 1–4 | 1–8 | 1–32 | 1–512 |\n| `qwen35_vl_*_{sft,peft}_config` | SFT\u002FPEFT | varies | varies | varies | varies |\n| `glm_45v_{sft,peft}_config` | SFT\u002FPEFT | 1 | 8 | 4–16 | 64–512 |\n| `nemotron_nano_v2_vl_12b_{sft,peft}_config` | SFT\u002FPEFT | 2–4 | 1 | — | 8 |\n\n### Diffusion Recipes\n\n| Recipe | Mode | TP | CP |\n|--------|------|----|----|\n| `wan_1_3B_{pretrain,sft}_config` | P\u002FSFT | 1 | 8 |\n| `wan_14B_{pretrain,sft}_config` | P\u002FSFT | 2 | 4 |\n| `flux_12b_{pretrain,sft}_config` | P\u002FSFT | 2 | 1 |\n\n---\n\n## Performance Recipe Index\n\nPerf recipe source lives under `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F`. The\nperformance launcher in `scripts\u002Fperformance\u002F` resolves those flat recipe names\nand derives compatibility workload views from the selected flat recipe when\nlegacy helper paths still need them.\n\n> **Important:** Perf recipes are designed for **upper-bound throughput\n> benchmarks**, not production training. They run **50 iterations** on **mock\n> data** by default. Throughput numbers are aspirational targets, not validated\n> convergence configs.\n\n### Llama 3 \u002F 3.1\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Llama 3 8B | 8 | H100, B200, B300, GB200, GB300, R100 | CUDA graphs (local), FSDP on GB variants |\n| Llama 3 70B | 64 | H100, B200, B300, GB200, GB300 | TP comm overlap (userbuffers), FSDP, CUDA graphs |\n| Llama 3.1 405B | 128–1024 | H100, B200, B300, GB200, GB300 | TP+CP comm overlap (userbuffers), FSDP, heavy PP\u002FVP |\n\nSFT\u002FLoRA variants also exist (e.g. 8B SFT with packed sequences, 70B SFT on 32 GPUs).\n\n### DeepSeek V3\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| DeepSeek V3 (671B MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | HybridEP dispatcher, MLA recompute, CUDA graphs (TE scoped) |\n\n### Qwen3 MoE\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | MoE alltoall\u002Fflex dispatcher |\n| Qwen3 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | TP comm overlap, CUDA graphs, MoE a2a overlap |\n| Qwen3-Next 80B-A3B | 64–128 | H100, B200, B300, GB200, GB300 | EP 64–128 |\n\n### Qwen3-VL\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Qwen3-VL 30B-A3B | 8–16 | H100, B200, B300, GB200, GB300 | VLM + MoE |\n| Qwen3-VL 235B-A22B | 64–256 | H100, B200, B300, GB200, GB300 | VLM + MoE, TP comm overlap |\n\n### Kimi K2\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Kimi K2 (1T MoE) | 256–1024 | H100, B200, B300, GB200, GB300 | Muon\u002FAdam optimizer, HybridEP, pipeline layout helpers |\n\n### NemotronH\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| Nemotron 3 Nano (30B MoE+Mamba) | 8–16 | H100, B200, B300, GB200, GB300 | TE CUDA graphs (attn+mamba+moe), HybridEP |\n| Nemotron 3 Super | 64 | H100, B200, B300, GB200, GB300 | TE CUDA graphs, EP=64 |\n| NemotronH 56B | 64 | H100, B200, B300 | TP=2–8, TE graphs (mamba+attn) |\n\n### GPT-OSS\n\n| Model | GPUs | GPU Types | Key Features |\n|-------|------|-----------|--------------|\n| GPT-OSS 120B | 64 | H100, B200, GB200 | EP=64, HybridEP on GB200 |\n\n---\n\n## Recommendation Decision Tree\n\n```text\nUser wants to train a model\n│\n├─ Know the model name?\n│   ├─ Yes → Look up in Library Recipe Index above\n│   │   ├─ Has a recipe for their size + mode? → Use it directly\n│   │   └─ No exact match? → Use closest size, adjust parallelism\n│   └─ No → Ask for model name, size, and HF model ID\n│\n├─ What's the training goal?\n│   ├─ Pretrain → Use *_pretrain_config\n│   ├─ SFT (full fine-tune) → Use *_sft_config\n│   └─ PEFT (LoRA\u002FDoRA) → Use *_peft_config (lowest GPU requirement)\n│\n├─ How many GPUs?\n│   ├─ 1 GPU → Only PEFT recipes work (TP=1, PP=1)\n│   ├─ 8 GPUs (1 node) → Most 8B–16B models, small MoE (EP=8)\n│   ├─ 16–64 GPUs → 70B dense, medium MoE\n│   └─ 128+ GPUs → 405B+, large MoE (DeepSeek V3, Kimi K2)\n│\n├─ Want throughput benchmarks?\n│   ├─ Yes → Use perf recipes (scripts\u002Fperformance\u002F)\n│   │   └─ ⚠️ These run on mock data for upper-bound perf only\n│   └─ No → Use library recipes (scripts\u002Ftraining\u002Frun_recipe.py)\n│\n└─ Long context?\n    ├─ > 8K → Need CP (context parallelism), check *_16k \u002F *_64k \u002F *_128k variants\n    └─ ≤ 8K → Default recipes work\n```\n\n---\n\n## Adjustment Advice (When Recommending)\n\n### Parallelism Resizing Rules\n\nWhen the user's GPU count differs from the recipe default:\n\n1. **TP must divide `num_key_value_heads`** (GQA constraint). E.g. if\n   `num_key_value_heads=8`, valid TP = {1, 2, 4, 8}.\n2. **TP should stay within a single node** (NVLink). TP > 8 requires\n   inter-node NVLink (e.g., GB200 NVL72).\n3. **PP adds pipeline bubbles.** Minimize PP; only increase when TP alone can't\n   fit the model. Use VP (virtual pipeline) to mitigate bubble overhead.\n4. **EP doesn't reduce dense-layer memory.** Only expert parameters shard with\n   EP. Shared attention\u002Fembeddings are replicated. For \"OOM with MoE\", increase\n   EP first, not TP.\n5. **SP should be True whenever TP > 1.** It eliminates redundant activation\n   copies and is essentially free.\n6. **CP requires all-to-all or ring attention.** Check `cp_comm_type`. For\n   GQA models, `a2a+p2p` hierarchical CP allows CP > num_kv_heads.\n7. **world_size = DP × TP × PP × CP × EP.** DP is implicit. Make sure the\n   product of explicit parallelisms divides your total GPU count.\n\n### Batch Size Tuning\n\n- Start with the recipe's `micro_batch_size`. If OOM, reduce to 1.\n- `global_batch_size` determines learning dynamics. Scale with DP:\n  `GBS = micro_batch_size × DP × gradient_accumulation_steps`.\n- For MoE, `micro_batch_size=1` is typical at scale.\n\n### Common Pitfalls to Warn About\n\n| Pitfall | Symptom | Fix |\n|---------|---------|-----|\n| TP > num_kv_heads | Crash: \"TP must divide num_query_groups\" | Reduce TP to a divisor of num_kv_heads |\n| PP without VP | Poor throughput (large bubble) | Set `virtual_pipeline_model_parallel_size` |\n| EP too low for large MoE | OOM on expert params | Increase EP; each expert lives on EP\u002Fnum_experts ranks |\n| CUDA graphs + packed sequences | Assert: \"CUDA graph accepts only Tensor inputs\" | Disable packing or use `local` full-iteration graphs |\n| CUDA graphs + full recompute | Assert: \"full recompute only with full iteration CUDA graph\" | Disable recompute or switch to `local` impl |\n| `use_te_rng_tracker` not set | Assert on provider init when CUDA graphs enabled | Set `cfg.model.use_te_rng_tracker = True` and `cfg.rng.te_rng_tracker = True` |\n| FSDP + TP > 1 on H100 | Possible comm bottleneck | Prefer FSDP with TP=1 or TP=2 on H100; FSDP shines on GB\u002FB-series |\n| Long context without CP | OOM on activations | Add CP=2\u002F4\u002F8; use `*_16k`, `*_64k`, or `*_128k` recipe variants |\n| MoE `overlap_grad_reduce` on H100 | May hurt perf (False in many H100 presets) | Set `overlap_grad_reduce=False` for MoE on H100 |\n| VLM SFT missing image data | Runs but produces garbage | Provide actual multimodal dataset or use mock VLM data |\n| Qwen35-VL MoE FSDP | Tested on Blackwell only | May not work on H100; validate first |\n\n### Recipe Override Examples\n\n```bash\n# Scale Llama3 8B from 2 GPUs to 8 GPUs (increase DP)\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock\n\n# Reduce parallelism for Qwen3-MoE 30B to fit on 4 GPUs\nuv run python -m torch.distributed.run --nproc_per_node=4 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_sft_config \\\n    --dataset llm-finetune \\\n    'model.expert_model_parallel_size=4'\n\n# Add long context to an existing recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe llama3_8b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.seq_length=32768' \\\n    'model.context_parallel_size=4'\n\n# Enable CUDA graphs on any recipe\nuv run python -m torch.distributed.run --nproc_per_node=8 scripts\u002Ftraining\u002Frun_recipe.py \\\n    --recipe qwen3_30b_a3b_pretrain_config \\\n    --dataset llm-pretrain-mock \\\n    'model.cuda_graph_impl=transformer_engine' \\\n    'model.cuda_graph_scope=[attn,moe_router,moe_preprocess]' \\\n    'model.use_te_rng_tracker=True' \\\n    'rng.te_rng_tracker=True'\n```\n\n---\n\n## Quick Reference: Which Recipe for My Situation?\n\n| I want to... | Start with | GPUs needed |\n|---|---|---|\n| Try Bridge for the first time | `llama3_8b_sft_config` + mock data | 2 |\n| Fine-tune a 7-8B model | `llama3_8b_sft_config` or `qwen3_8b_sft_config` | 2–8 |\n| LoRA on 1 GPU | `llama3_8b_peft_config` or `qwen3_8b_peft_config` | 1 |\n| Pretrain a dense 70B | `llama3_70b_pretrain_config` | 32–64 |\n| Train a small MoE | `qwen3_30b_a3b_pretrain_config` | 8 |\n| Train a large MoE (235B+) | `qwen3_235b_a22b_pretrain_config` | 256–512 |\n| Benchmark throughput | Perf recipes via `run_script.py` | Varies |\n| Long-context training | `llama3_8b_128k_pretrain_config` or add CP override | 16+ |\n| VLM fine-tuning | `qwen3_vl_8b_sft_config` or `gemma3_vl_*_sft_config` | 4–8 |\n| Diffusion training | `wan_1_3B_pretrain_config` or `flux_12b_pretrain_config` | 8 |\n\n---\n\n## Code Anchors\n\n| What | Path |\n|------|------|\n| Library recipes root | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F` |\n| Recipe `__init__.py` (all exports) | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002F__init__.py` |\n| Common recipe helpers | `src\u002Fmegatron\u002Fbridge\u002Frecipes\u002Fcommon.py` |\n| Training entry point | `scripts\u002Ftraining\u002Frun_recipe.py` |\n| Perf recipes root | `src\u002Fmegatron\u002Fbridge\u002Fperf_recipes\u002F` |\n| Perf entry point | `scripts\u002Fperformance\u002Frun_script.py` |\n| Perf recipe helpers | `scripts\u002Fperformance\u002Futils\u002Futils.py` |\n| Perf overrides (benchmark defaults) | `scripts\u002Fperformance\u002Futils\u002Foverrides.py` |\n",{"name":5,"license":15,"description":7,"when_to_use":24},"User wants a starting recipe or training config; 'which recipe', 'recommend recipe', 'how to train Llama', 'starting config for X GPUs', 'what recipe for SFT'.","main","be3de0244dc1a57e323d8160787ebb40fb64930e","skills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 23:20:13",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Solizardking\u002Fskillhub-main --skill nemo-mbridge-recipe-recommender",{"tool":40,"command":41},"bunx","bunx skills add Solizardking\u002Fskillhub-main --skill nemo-mbridge-recipe-recommender",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Solizardking\u002Fskillhub-main --skill nemo-mbridge-recipe-recommender","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002FSKILL.md",true,[48,54,58,62],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"BENCHMARK.md","REFERENCE","参考文档",3876,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002FBENCHMARK.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"evals\u002Fevals.json",2020,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002Fevals\u002Fevals.json",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"skill-card.md",4188,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002Fskill-card.md",{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"skill.oms.sig","OTHER","其他",4609,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fnemo-mbridge-recipe-recommender\u002Fskill.oms.sig",[69,77,84,91,98,106],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M78E0TGCAMNPS207BA3G07S7","zkrouter","Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.","MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzkrouter\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M78E0R1Z8BDT6EDTHY17MTNB","zk","For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M78E0P3ZTZ1YWF8MD5MM23QE","zk-omni-messaging","Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk-omni-messaging\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M78E0JXZ2PNB1896VXAGDBWD","zerion-wallet-data","Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzerion-wallet-data\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M78E0G14FH9GRRTQYMKD5E59","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M78E0C2ZYA99CFFDNB7ZMK5S","yield-optimization","Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit\u002Fwithdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter\u002Fexit a position, or check portfolio balances.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyield-optimization\u002FSKILL.md",[],[]]