[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-nemo-mbridge-perf-parallelism-strategies":3,"mdc--4xc8vj-key":34,"related-org-nvidia-nemo-mbridge-perf-parallelism-strategies":1963,"related-repo-nvidia-nemo-mbridge-perf-parallelism-strategies":2123},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"nemo-mbridge-perf-parallelism-strategies","configure Megatron Bridge parallelism strategies","Operational guide for choosing and combining parallelism strategies in Megatron Bridge, including sizing rules, hardware topology mapping, and combined parallelism configuration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Engineering","engineering",{"name":21,"slug":22,"type":15},"AI Infrastructure","ai-infrastructure",2473,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fskills","2026-07-14T05:28:11.887551","Apache-2.0",281,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"AI agent skills published by NVIDIA","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies","---\nname: nemo-mbridge-perf-parallelism-strategies\ndescription: Operational guide for choosing and combining parallelism strategies in Megatron Bridge, including sizing rules, hardware topology mapping, and combined parallelism configuration.\nlicense: Apache-2.0\nwhen_to_use: Choosing or sizing TP\u002FDP\u002FPP\u002FCP\u002FEP degrees, or tracing an OOM or regression to a parallelism config change; 'how to parallelize', 'tensor parallel', 'pipeline parallel', 'parallelism config', 'which parallelism for X GPUs'.\n---\n\n# Parallelism Strategy Selection Skill\n\nFor stable background on each parallelism type, see:\n\n- @docs\u002Fparallelisms.md\n- @skills\u002Fnemo-mbridge-perf-parallelism-strategies\u002Fcard.yaml\n\n## Decision by Model Size\n\n### Dense models\n\n| Model size | GPUs | Recommended starting point |\n|---|---|---|\n| \u003C 1B | 1-8 | DP only |\n| 1-10B | 8-16 | TP=2-4 + DP |\n| 10-70B | 16-64 | TP=4-8 + PP=2-4 + DP |\n| 70-175B | 64-256 | TP=8 + PP=4-8 + DP |\n| 175-500B | 256-1024 | TP=8 + PP=8-16 + CP=2 + DP |\n\n### MoE models\n\nMoE parallelism differs from dense models. Because only a fraction of\nparameters are active per token, TP can often stay at 1 or 2 — the active\nparameter shard already fits on a single GPU. EP is the primary scaling\ndimension, with PP handling cross-node layer distribution.\n\n| Model (total \u002F active) | TP | PP | EP | Notes |\n|---|---|---|---|---|\n| OLMoE 7B \u002F 1B | 1 | 1 | 8 | EP only, fits single node |\n| Moonlight 16B \u002F 3B | 2 | 1 | 8 | small TP for shared layers |\n| DeepSeek-V2 236B \u002F 21B | 1 | 4 | 32 | no TP at all |\n| GLM-4.5 Air 106B \u002F 12B | 1 | 4 | 8 | no TP at all |\n| Qwen3 30B-A3B | 4 | 2 | 4 | |\n| GLM-4.5 355B \u002F 32B | 2 | 8 | 16 | |\n| Qwen3 235B-A22B | 4 | 16 | 8 | CP=2 for pretrain |\n| DeepSeek-V3 671B \u002F 37B | 2 | 16 | 64 | TP=2, not 8 |\n| Kimi-K2 1T | 2 | 16 | 32 | |\n\nKey patterns:\n\n- TP is sized by **active** params, not total params. A 671B MoE with\n  37B active needs far less TP than a 70B dense model.\n- EP scales with expert count. Common: EP = num_experts or\n  num_experts \u002F experts_per_gpu.\n- PP handles depth. Large MoE models use PP=8-16 across nodes.\n- ETP (expert tensor parallelism) is rarely used. Llama 4 is an\n  exception (ETP=4).\n\nThese are starting points, not hard rules. Always profile the first\niteration to verify memory and communication.\n\n## Decision by Hardware Topology\n\nSingle node with NVLink:\n\n```python\ncfg.model.tensor_model_parallel_size = 8\n```\n\nMultiple nodes with InfiniBand:\n\n```python\ncfg.model.tensor_model_parallel_size = 8\ncfg.model.pipeline_model_parallel_size = N\n```\n\nLimited network (Ethernet):\n\n```python\ncfg.model.tensor_model_parallel_size = 4\ncfg.model.pipeline_model_parallel_size = M\n```\n\nThe stable rule is: keep TP within a single NVLink domain. Use PP or DP\nfor cross-node scaling. TP across nodes is almost always a performance\nloss.\n\n## Decision by Sequence Length\n\n| Sequence length | Recommendation |\n|---|---|\n| \u003C 2K | standard TP + PP + DP |\n| 2K-8K | add SP (`sequence_parallel=True`) |\n| 8K-32K | add CP=2 |\n| 32K+ | add CP=4-8, consider `a2a+p2p` for large CP |\n\n## Combined Parallelism Enablement\n\n3D parallelism (TP + PP + DP):\n\n```python\ncfg.model.tensor_model_parallel_size = 4\ncfg.model.pipeline_model_parallel_size = 4\ncfg.model.sequence_parallel = True\n```\n\n4D parallelism (TP + PP + CP + DP):\n\n```python\ncfg.model.tensor_model_parallel_size = 8\ncfg.model.pipeline_model_parallel_size = 8\ncfg.model.context_parallel_size = 2\ncfg.model.sequence_parallel = True\n```\n\nMoE with EP + PP (e.g. DeepSeek-V2 236B on 128 GPUs):\n\n```python\ncfg.model.tensor_model_parallel_size = 1\ncfg.model.pipeline_model_parallel_size = 4\ncfg.model.expert_model_parallel_size = 32\ncfg.model.sequence_parallel = False\n```\n\nMoE with small TP + PP + EP (e.g. DeepSeek-V3 671B on 256 GPUs):\n\n```python\ncfg.model.tensor_model_parallel_size = 2\ncfg.model.pipeline_model_parallel_size = 16\ncfg.model.expert_model_parallel_size = 64\ncfg.model.sequence_parallel = True\n```\n\nDP size is always implicit:\n\n```\ndata_parallel_size = world_size \u002F (TP * PP * CP)        # dense path\nexpert_data_parallel_size = world_size \u002F (PP * EP * ETP) # MoE path\n```\n\n## Minimum GPU Count\n\nThe **minimum** GPUs needed to run a config (i.e. with `DP=1`, `EDP=1`)\nis **not** the product of all parallelism dimensions. The dense path uses\na `TP*CP`-mesh and the MoE path uses an `EP*ETP`-mesh, and within each PP\nstage these two meshes share the same set of GPUs — they overlap, they\ndon't multiply. Only PP stages multiply (they're disjoint slices of the\nmodel). So:\n\n```\nmin_gpus = PP * max(TP * CP, EP * ETP)\n```\n\n**Common simplification (WRONG):** `PP * TP * CP * EP * ETP`. This\nover-allocates GPUs and shows up in many READMEs and slurm sizing tables.\nDon't propagate it.\n\nThe decoupling of attention and MoE parallelism (different mesh shapes\nfor the dense and expert paths sharing the same PP-stage GPUs) is\ndetailed in\n[Pangu Ultra MoE (arXiv:2504.14960)](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2504.14960).\n\n### Examples\n\n| Config | Wrong (PP·TP·CP·EP·ETP) | Correct (PP·max(TP·CP, EP·ETP)) |\n|---|---|---|\n| PP=1, TP=2, CP=1, EP=8, ETP=1 | 16 | **8** (1 node) |\n| PP=1, TP=4, CP=1, EP=8, ETP=1 | 32 | **8** (max(4, 8)) |\n| PP=1, TP=2, CP=2, EP=8, ETP=1 | 32 | **8** (max(4, 8)) |\n| PP=1, TP=2, CP=4, EP=8, ETP=1 | 64 | **8** (max(8, 8)) |\n| PP=2, TP=2, CP=1, EP=8, ETP=1 | 32 | **16** (2 · max(2, 8)) |\n| PP=1, TP=2, CP=1, EP=4, ETP=2 | 16 | **8** (max(2, 8)) |\n\n### Scaling above the minimum\n\nAdding GPUs scales `DP` and\u002For `EDP` (the `world_size` must satisfy\nboth equations simultaneously). At `min_gpus` the larger-mesh side has\nDP (or EDP) = 1 and the smaller side absorbs the slack.\n\nExample — TP=2, CP=1, EP=8, ETP=1, PP=1:\n\n- **8 GPUs** (`min_gpus`): dense `DP = 8\u002F2 = 4`, MoE `EDP = 8\u002F8 = 1`\n- **16 GPUs**: dense `DP = 8`, MoE `EDP = 2` → 2× global batch\n- **32 GPUs**: dense `DP = 16`, MoE `EDP = 4` → 4× global batch\n\nWhen sizing slurm scripts, compute `--nodes` from `min_gpus` (or a\nmultiple of it for higher throughput via DP\u002FEDP).\n\nWhen answering MoE sizing prompts, include this checklist:\n\n- compute `min_gpus = PP * max(TP * CP, EP * ETP)` with the requested values\n- explicitly reject the wrong `PP * TP * CP * EP * ETP` full product\n- give both DP formulas: dense `world_size \u002F (TP * PP * CP)` and MoE\n  `world_size \u002F (PP * EP * ETP)`\n- mention TP topology, SP, CP divisibility, and long-sequence CP guidance\n\n## Memory Estimation\n\nWithout parallelism (70B model, FP16):\n\n```\nparameters:       140 GB\ngradients:        140 GB\noptimizer states: 280 GB (Adam)\nactivations:       48 GB (batch=1, seq=4K)\ntotal:            608 GB\n```\n\nWith TP=4, PP=4, DP=4 (64 GPUs):\n\n```\nparameters:        8.75 GB per GPU\ngradients:         8.75 GB per GPU\noptimizer states: 17.50 GB per GPU\nactivations:       3.00 GB per GPU\ntotal:           ~38    GB per GPU\n```\n\n## Code Anchors\n\nParallelism dimensions set in model provider:\n\n```66:81:docs\u002Fparallelisms.md\nmodel_config = GPTModelProvider(\n    tensor_model_parallel_size=2,\n    # ... other model parameters\n)\n```\n\nDP size calculation:\n\n```424:436:docs\u002Fparallelisms.md\ndata_parallel_size = world_size \u002F (tensor_model_parallel_size × pipeline_model_parallel_size × context_parallel_size)\n```\n\nBridge initialization wires parallelism into process groups:\n\n```618:628:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Finitialize.py\nparallel_state.initialize_model_parallel(\n    tensor_model_parallel_size=model_config.tensor_model_parallel_size,\n    pipeline_model_parallel_size=model_config.pipeline_model_parallel_size,\n    ...\n    context_parallel_size=model_config.context_parallel_size,\n    hierarchical_context_parallel_sizes=model_config.hierarchical_context_parallel_sizes,\n    expert_model_parallel_size=model_config.expert_model_parallel_size,\n    ...\n)\n```\n\n## Pitfalls\n\n1. TP across nodes destroys throughput. Always keep TP within a single\n   NVLink domain.\n\n2. PP without interleaving has large pipeline bubbles. Use\n   `virtual_pipeline_model_parallel_size` when possible.\n\n3. SP requires `tensor_model_parallel_size > 1`. Enabling SP alone\n   without TP is a config error.\n\n4. CP requires `seq_length % (2 * context_parallel_size) == 0`.\n\n5. EP is only for MoE models. Setting `expert_model_parallel_size` on a\n   dense model is a no-op or error.\n\n6. The model-size-to-parallelism table above is a starting heuristic.\n   Always profile the first iteration to check memory and communication.\n\n7. `CUDA_DEVICE_MAX_CONNECTIONS` and related env vars interact with\n   overlap settings. See @skills\u002Fnemo-mbridge-perf-tp-dp-comm-overlap\u002FSKILL.md.\n\n8. The minimum GPU count for an MoE config is `PP * max(TP*CP, EP*ETP)`,\n   not the product of all dimensions. The dense `TP*CP`-mesh and MoE\n   `EP*ETP`-mesh share the same GPUs in each PP stage. See\n   \"Minimum GPU Count\" section above.\n\n## Verification\n\nQuick sanity check that combined parallelism initializes correctly using\nthe smallest available recipe with overridden parallelism:\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1,2,3 uv run python -m torch.distributed.run --nproc_per_node=4 \\\n  scripts\u002Ftraining\u002Frun_recipe.py \\\n  --recipe llama32_1b_pretrain_config \\\n  model.tensor_model_parallel_size=2 \\\n  model.pipeline_model_parallel_size=2 \\\n  model.sequence_parallel=True \\\n  train.train_iters=3 train.global_batch_size=8 train.micro_batch_size=1 \\\n  scheduler.lr_warmup_iters=0 \\\n  validation.eval_iters=0 validation.eval_interval=0 \\\n  checkpoint.save_interval=0 \\\n  logger.log_interval=1\n```\n\nSuccess criteria:\n\n- exit code 0\n- finite loss at iteration 3 (e.g. `lm loss: 1.003808E+01`)\n- log shows TP=2 PP=2 DP=1 layout with 4 ranks\n",{"data":35,"body":37},{"name":4,"description":6,"license":26,"when_to_use":36},"Choosing or sizing TP\u002FDP\u002FPP\u002FCP\u002FEP degrees, or tracing an OOM or regression to a parallelism config change; 'how to parallelize', 'tensor parallel', 'pipeline parallel', 'parallelism config', 'which parallelism for X GPUs'.",{"type":38,"children":39},"root",[40,49,55,70,77,84,207,213,218,480,485,516,521,527,532,554,559,582,587,610,615,621,711,717,722,753,758,796,801,839,844,882,887,897,903,954,963,981,997,1003,1155,1161,1198,1203,1286,1306,1311,1363,1369,1374,1383,1388,1397,1403,1408,1449,1454,1470,1475,1559,1565,1668,1674,1679,1927,1932,1957],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"parallelism-strategy-selection-skill",[46],{"type":47,"value":48},"text","Parallelism Strategy Selection Skill",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"For stable background on each parallelism type, see:",{"type":41,"tag":56,"props":57,"children":58},"ul",{},[59,65],{"type":41,"tag":60,"props":61,"children":62},"li",{},[63],{"type":47,"value":64},"@docs\u002Fparallelisms.md",{"type":41,"tag":60,"props":66,"children":67},{},[68],{"type":47,"value":69},"@skills\u002Fnemo-mbridge-perf-parallelism-strategies\u002Fcard.yaml",{"type":41,"tag":71,"props":72,"children":74},"h2",{"id":73},"decision-by-model-size",[75],{"type":47,"value":76},"Decision by Model Size",{"type":41,"tag":78,"props":79,"children":81},"h3",{"id":80},"dense-models",[82],{"type":47,"value":83},"Dense models",{"type":41,"tag":85,"props":86,"children":87},"table",{},[88,112],{"type":41,"tag":89,"props":90,"children":91},"thead",{},[92],{"type":41,"tag":93,"props":94,"children":95},"tr",{},[96,102,107],{"type":41,"tag":97,"props":98,"children":99},"th",{},[100],{"type":47,"value":101},"Model size",{"type":41,"tag":97,"props":103,"children":104},{},[105],{"type":47,"value":106},"GPUs",{"type":41,"tag":97,"props":108,"children":109},{},[110],{"type":47,"value":111},"Recommended starting point",{"type":41,"tag":113,"props":114,"children":115},"tbody",{},[116,135,153,171,189],{"type":41,"tag":93,"props":117,"children":118},{},[119,125,130],{"type":41,"tag":120,"props":121,"children":122},"td",{},[123],{"type":47,"value":124},"\u003C 1B",{"type":41,"tag":120,"props":126,"children":127},{},[128],{"type":47,"value":129},"1-8",{"type":41,"tag":120,"props":131,"children":132},{},[133],{"type":47,"value":134},"DP only",{"type":41,"tag":93,"props":136,"children":137},{},[138,143,148],{"type":41,"tag":120,"props":139,"children":140},{},[141],{"type":47,"value":142},"1-10B",{"type":41,"tag":120,"props":144,"children":145},{},[146],{"type":47,"value":147},"8-16",{"type":41,"tag":120,"props":149,"children":150},{},[151],{"type":47,"value":152},"TP=2-4 + DP",{"type":41,"tag":93,"props":154,"children":155},{},[156,161,166],{"type":41,"tag":120,"props":157,"children":158},{},[159],{"type":47,"value":160},"10-70B",{"type":41,"tag":120,"props":162,"children":163},{},[164],{"type":47,"value":165},"16-64",{"type":41,"tag":120,"props":167,"children":168},{},[169],{"type":47,"value":170},"TP=4-8 + PP=2-4 + DP",{"type":41,"tag":93,"props":172,"children":173},{},[174,179,184],{"type":41,"tag":120,"props":175,"children":176},{},[177],{"type":47,"value":178},"70-175B",{"type":41,"tag":120,"props":180,"children":181},{},[182],{"type":47,"value":183},"64-256",{"type":41,"tag":120,"props":185,"children":186},{},[187],{"type":47,"value":188},"TP=8 + PP=4-8 + DP",{"type":41,"tag":93,"props":190,"children":191},{},[192,197,202],{"type":41,"tag":120,"props":193,"children":194},{},[195],{"type":47,"value":196},"175-500B",{"type":41,"tag":120,"props":198,"children":199},{},[200],{"type":47,"value":201},"256-1024",{"type":41,"tag":120,"props":203,"children":204},{},[205],{"type":47,"value":206},"TP=8 + PP=8-16 + CP=2 + DP",{"type":41,"tag":78,"props":208,"children":210},{"id":209},"moe-models",[211],{"type":47,"value":212},"MoE models",{"type":41,"tag":50,"props":214,"children":215},{},[216],{"type":47,"value":217},"MoE parallelism differs from dense models. Because only a fraction of\nparameters are active per token, TP can often stay at 1 or 2 — the active\nparameter shard already fits on a single GPU. EP is the primary scaling\ndimension, with PP handling cross-node layer distribution.",{"type":41,"tag":85,"props":219,"children":220},{},[221,252],{"type":41,"tag":89,"props":222,"children":223},{},[224],{"type":41,"tag":93,"props":225,"children":226},{},[227,232,237,242,247],{"type":41,"tag":97,"props":228,"children":229},{},[230],{"type":47,"value":231},"Model (total \u002F active)",{"type":41,"tag":97,"props":233,"children":234},{},[235],{"type":47,"value":236},"TP",{"type":41,"tag":97,"props":238,"children":239},{},[240],{"type":47,"value":241},"PP",{"type":41,"tag":97,"props":243,"children":244},{},[245],{"type":47,"value":246},"EP",{"type":41,"tag":97,"props":248,"children":249},{},[250],{"type":47,"value":251},"Notes",{"type":41,"tag":113,"props":253,"children":254},{},[255,282,308,335,359,382,406,431,457],{"type":41,"tag":93,"props":256,"children":257},{},[258,263,268,272,277],{"type":41,"tag":120,"props":259,"children":260},{},[261],{"type":47,"value":262},"OLMoE 7B \u002F 1B",{"type":41,"tag":120,"props":264,"children":265},{},[266],{"type":47,"value":267},"1",{"type":41,"tag":120,"props":269,"children":270},{},[271],{"type":47,"value":267},{"type":41,"tag":120,"props":273,"children":274},{},[275],{"type":47,"value":276},"8",{"type":41,"tag":120,"props":278,"children":279},{},[280],{"type":47,"value":281},"EP only, fits single node",{"type":41,"tag":93,"props":283,"children":284},{},[285,290,295,299,303],{"type":41,"tag":120,"props":286,"children":287},{},[288],{"type":47,"value":289},"Moonlight 16B \u002F 3B",{"type":41,"tag":120,"props":291,"children":292},{},[293],{"type":47,"value":294},"2",{"type":41,"tag":120,"props":296,"children":297},{},[298],{"type":47,"value":267},{"type":41,"tag":120,"props":300,"children":301},{},[302],{"type":47,"value":276},{"type":41,"tag":120,"props":304,"children":305},{},[306],{"type":47,"value":307},"small TP for shared layers",{"type":41,"tag":93,"props":309,"children":310},{},[311,316,320,325,330],{"type":41,"tag":120,"props":312,"children":313},{},[314],{"type":47,"value":315},"DeepSeek-V2 236B \u002F 21B",{"type":41,"tag":120,"props":317,"children":318},{},[319],{"type":47,"value":267},{"type":41,"tag":120,"props":321,"children":322},{},[323],{"type":47,"value":324},"4",{"type":41,"tag":120,"props":326,"children":327},{},[328],{"type":47,"value":329},"32",{"type":41,"tag":120,"props":331,"children":332},{},[333],{"type":47,"value":334},"no TP at all",{"type":41,"tag":93,"props":336,"children":337},{},[338,343,347,351,355],{"type":41,"tag":120,"props":339,"children":340},{},[341],{"type":47,"value":342},"GLM-4.5 Air 106B \u002F 12B",{"type":41,"tag":120,"props":344,"children":345},{},[346],{"type":47,"value":267},{"type":41,"tag":120,"props":348,"children":349},{},[350],{"type":47,"value":324},{"type":41,"tag":120,"props":352,"children":353},{},[354],{"type":47,"value":276},{"type":41,"tag":120,"props":356,"children":357},{},[358],{"type":47,"value":334},{"type":41,"tag":93,"props":360,"children":361},{},[362,367,371,375,379],{"type":41,"tag":120,"props":363,"children":364},{},[365],{"type":47,"value":366},"Qwen3 30B-A3B",{"type":41,"tag":120,"props":368,"children":369},{},[370],{"type":47,"value":324},{"type":41,"tag":120,"props":372,"children":373},{},[374],{"type":47,"value":294},{"type":41,"tag":120,"props":376,"children":377},{},[378],{"type":47,"value":324},{"type":41,"tag":120,"props":380,"children":381},{},[],{"type":41,"tag":93,"props":383,"children":384},{},[385,390,394,398,403],{"type":41,"tag":120,"props":386,"children":387},{},[388],{"type":47,"value":389},"GLM-4.5 355B \u002F 32B",{"type":41,"tag":120,"props":391,"children":392},{},[393],{"type":47,"value":294},{"type":41,"tag":120,"props":395,"children":396},{},[397],{"type":47,"value":276},{"type":41,"tag":120,"props":399,"children":400},{},[401],{"type":47,"value":402},"16",{"type":41,"tag":120,"props":404,"children":405},{},[],{"type":41,"tag":93,"props":407,"children":408},{},[409,414,418,422,426],{"type":41,"tag":120,"props":410,"children":411},{},[412],{"type":47,"value":413},"Qwen3 235B-A22B",{"type":41,"tag":120,"props":415,"children":416},{},[417],{"type":47,"value":324},{"type":41,"tag":120,"props":419,"children":420},{},[421],{"type":47,"value":402},{"type":41,"tag":120,"props":423,"children":424},{},[425],{"type":47,"value":276},{"type":41,"tag":120,"props":427,"children":428},{},[429],{"type":47,"value":430},"CP=2 for pretrain",{"type":41,"tag":93,"props":432,"children":433},{},[434,439,443,447,452],{"type":41,"tag":120,"props":435,"children":436},{},[437],{"type":47,"value":438},"DeepSeek-V3 671B \u002F 37B",{"type":41,"tag":120,"props":440,"children":441},{},[442],{"type":47,"value":294},{"type":41,"tag":120,"props":444,"children":445},{},[446],{"type":47,"value":402},{"type":41,"tag":120,"props":448,"children":449},{},[450],{"type":47,"value":451},"64",{"type":41,"tag":120,"props":453,"children":454},{},[455],{"type":47,"value":456},"TP=2, not 8",{"type":41,"tag":93,"props":458,"children":459},{},[460,465,469,473,477],{"type":41,"tag":120,"props":461,"children":462},{},[463],{"type":47,"value":464},"Kimi-K2 1T",{"type":41,"tag":120,"props":466,"children":467},{},[468],{"type":47,"value":294},{"type":41,"tag":120,"props":470,"children":471},{},[472],{"type":47,"value":402},{"type":41,"tag":120,"props":474,"children":475},{},[476],{"type":47,"value":329},{"type":41,"tag":120,"props":478,"children":479},{},[],{"type":41,"tag":50,"props":481,"children":482},{},[483],{"type":47,"value":484},"Key patterns:",{"type":41,"tag":56,"props":486,"children":487},{},[488,501,506,511],{"type":41,"tag":60,"props":489,"children":490},{},[491,493,499],{"type":47,"value":492},"TP is sized by ",{"type":41,"tag":494,"props":495,"children":496},"strong",{},[497],{"type":47,"value":498},"active",{"type":47,"value":500}," params, not total params. A 671B MoE with\n37B active needs far less TP than a 70B dense model.",{"type":41,"tag":60,"props":502,"children":503},{},[504],{"type":47,"value":505},"EP scales with expert count. Common: EP = num_experts or\nnum_experts \u002F experts_per_gpu.",{"type":41,"tag":60,"props":507,"children":508},{},[509],{"type":47,"value":510},"PP handles depth. Large MoE models use PP=8-16 across nodes.",{"type":41,"tag":60,"props":512,"children":513},{},[514],{"type":47,"value":515},"ETP (expert tensor parallelism) is rarely used. Llama 4 is an\nexception (ETP=4).",{"type":41,"tag":50,"props":517,"children":518},{},[519],{"type":47,"value":520},"These are starting points, not hard rules. Always profile the first\niteration to verify memory and communication.",{"type":41,"tag":71,"props":522,"children":524},{"id":523},"decision-by-hardware-topology",[525],{"type":47,"value":526},"Decision by Hardware Topology",{"type":41,"tag":50,"props":528,"children":529},{},[530],{"type":47,"value":531},"Single node with NVLink:",{"type":41,"tag":533,"props":534,"children":539},"pre",{"className":535,"code":536,"language":537,"meta":538,"style":538},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","cfg.model.tensor_model_parallel_size = 8\n","python","",[540],{"type":41,"tag":541,"props":542,"children":543},"code",{"__ignoreMap":538},[544],{"type":41,"tag":545,"props":546,"children":549},"span",{"class":547,"line":548},"line",1,[550],{"type":41,"tag":545,"props":551,"children":552},{},[553],{"type":47,"value":536},{"type":41,"tag":50,"props":555,"children":556},{},[557],{"type":47,"value":558},"Multiple nodes with InfiniBand:",{"type":41,"tag":533,"props":560,"children":562},{"className":535,"code":561,"language":537,"meta":538,"style":538},"cfg.model.tensor_model_parallel_size = 8\ncfg.model.pipeline_model_parallel_size = N\n",[563],{"type":41,"tag":541,"props":564,"children":565},{"__ignoreMap":538},[566,573],{"type":41,"tag":545,"props":567,"children":568},{"class":547,"line":548},[569],{"type":41,"tag":545,"props":570,"children":571},{},[572],{"type":47,"value":536},{"type":41,"tag":545,"props":574,"children":576},{"class":547,"line":575},2,[577],{"type":41,"tag":545,"props":578,"children":579},{},[580],{"type":47,"value":581},"cfg.model.pipeline_model_parallel_size = N\n",{"type":41,"tag":50,"props":583,"children":584},{},[585],{"type":47,"value":586},"Limited network (Ethernet):",{"type":41,"tag":533,"props":588,"children":590},{"className":535,"code":589,"language":537,"meta":538,"style":538},"cfg.model.tensor_model_parallel_size = 4\ncfg.model.pipeline_model_parallel_size = M\n",[591],{"type":41,"tag":541,"props":592,"children":593},{"__ignoreMap":538},[594,602],{"type":41,"tag":545,"props":595,"children":596},{"class":547,"line":548},[597],{"type":41,"tag":545,"props":598,"children":599},{},[600],{"type":47,"value":601},"cfg.model.tensor_model_parallel_size = 4\n",{"type":41,"tag":545,"props":603,"children":604},{"class":547,"line":575},[605],{"type":41,"tag":545,"props":606,"children":607},{},[608],{"type":47,"value":609},"cfg.model.pipeline_model_parallel_size = M\n",{"type":41,"tag":50,"props":611,"children":612},{},[613],{"type":47,"value":614},"The stable rule is: keep TP within a single NVLink domain. Use PP or DP\nfor cross-node scaling. TP across nodes is almost always a performance\nloss.",{"type":41,"tag":71,"props":616,"children":618},{"id":617},"decision-by-sequence-length",[619],{"type":47,"value":620},"Decision by Sequence Length",{"type":41,"tag":85,"props":622,"children":623},{},[624,640],{"type":41,"tag":89,"props":625,"children":626},{},[627],{"type":41,"tag":93,"props":628,"children":629},{},[630,635],{"type":41,"tag":97,"props":631,"children":632},{},[633],{"type":47,"value":634},"Sequence length",{"type":41,"tag":97,"props":636,"children":637},{},[638],{"type":47,"value":639},"Recommendation",{"type":41,"tag":113,"props":641,"children":642},{},[643,656,677,690],{"type":41,"tag":93,"props":644,"children":645},{},[646,651],{"type":41,"tag":120,"props":647,"children":648},{},[649],{"type":47,"value":650},"\u003C 2K",{"type":41,"tag":120,"props":652,"children":653},{},[654],{"type":47,"value":655},"standard TP + PP + DP",{"type":41,"tag":93,"props":657,"children":658},{},[659,664],{"type":41,"tag":120,"props":660,"children":661},{},[662],{"type":47,"value":663},"2K-8K",{"type":41,"tag":120,"props":665,"children":666},{},[667,669,675],{"type":47,"value":668},"add SP (",{"type":41,"tag":541,"props":670,"children":672},{"className":671},[],[673],{"type":47,"value":674},"sequence_parallel=True",{"type":47,"value":676},")",{"type":41,"tag":93,"props":678,"children":679},{},[680,685],{"type":41,"tag":120,"props":681,"children":682},{},[683],{"type":47,"value":684},"8K-32K",{"type":41,"tag":120,"props":686,"children":687},{},[688],{"type":47,"value":689},"add CP=2",{"type":41,"tag":93,"props":691,"children":692},{},[693,698],{"type":41,"tag":120,"props":694,"children":695},{},[696],{"type":47,"value":697},"32K+",{"type":41,"tag":120,"props":699,"children":700},{},[701,703,709],{"type":47,"value":702},"add CP=4-8, consider ",{"type":41,"tag":541,"props":704,"children":706},{"className":705},[],[707],{"type":47,"value":708},"a2a+p2p",{"type":47,"value":710}," for large CP",{"type":41,"tag":71,"props":712,"children":714},{"id":713},"combined-parallelism-enablement",[715],{"type":47,"value":716},"Combined Parallelism Enablement",{"type":41,"tag":50,"props":718,"children":719},{},[720],{"type":47,"value":721},"3D parallelism (TP + PP + DP):",{"type":41,"tag":533,"props":723,"children":725},{"className":535,"code":724,"language":537,"meta":538,"style":538},"cfg.model.tensor_model_parallel_size = 4\ncfg.model.pipeline_model_parallel_size = 4\ncfg.model.sequence_parallel = True\n",[726],{"type":41,"tag":541,"props":727,"children":728},{"__ignoreMap":538},[729,736,744],{"type":41,"tag":545,"props":730,"children":731},{"class":547,"line":548},[732],{"type":41,"tag":545,"props":733,"children":734},{},[735],{"type":47,"value":601},{"type":41,"tag":545,"props":737,"children":738},{"class":547,"line":575},[739],{"type":41,"tag":545,"props":740,"children":741},{},[742],{"type":47,"value":743},"cfg.model.pipeline_model_parallel_size = 4\n",{"type":41,"tag":545,"props":745,"children":747},{"class":547,"line":746},3,[748],{"type":41,"tag":545,"props":749,"children":750},{},[751],{"type":47,"value":752},"cfg.model.sequence_parallel = True\n",{"type":41,"tag":50,"props":754,"children":755},{},[756],{"type":47,"value":757},"4D parallelism (TP + PP + CP + DP):",{"type":41,"tag":533,"props":759,"children":761},{"className":535,"code":760,"language":537,"meta":538,"style":538},"cfg.model.tensor_model_parallel_size = 8\ncfg.model.pipeline_model_parallel_size = 8\ncfg.model.context_parallel_size = 2\ncfg.model.sequence_parallel = True\n",[762],{"type":41,"tag":541,"props":763,"children":764},{"__ignoreMap":538},[765,772,780,788],{"type":41,"tag":545,"props":766,"children":767},{"class":547,"line":548},[768],{"type":41,"tag":545,"props":769,"children":770},{},[771],{"type":47,"value":536},{"type":41,"tag":545,"props":773,"children":774},{"class":547,"line":575},[775],{"type":41,"tag":545,"props":776,"children":777},{},[778],{"type":47,"value":779},"cfg.model.pipeline_model_parallel_size = 8\n",{"type":41,"tag":545,"props":781,"children":782},{"class":547,"line":746},[783],{"type":41,"tag":545,"props":784,"children":785},{},[786],{"type":47,"value":787},"cfg.model.context_parallel_size = 2\n",{"type":41,"tag":545,"props":789,"children":791},{"class":547,"line":790},4,[792],{"type":41,"tag":545,"props":793,"children":794},{},[795],{"type":47,"value":752},{"type":41,"tag":50,"props":797,"children":798},{},[799],{"type":47,"value":800},"MoE with EP + PP (e.g. DeepSeek-V2 236B on 128 GPUs):",{"type":41,"tag":533,"props":802,"children":804},{"className":535,"code":803,"language":537,"meta":538,"style":538},"cfg.model.tensor_model_parallel_size = 1\ncfg.model.pipeline_model_parallel_size = 4\ncfg.model.expert_model_parallel_size = 32\ncfg.model.sequence_parallel = False\n",[805],{"type":41,"tag":541,"props":806,"children":807},{"__ignoreMap":538},[808,816,823,831],{"type":41,"tag":545,"props":809,"children":810},{"class":547,"line":548},[811],{"type":41,"tag":545,"props":812,"children":813},{},[814],{"type":47,"value":815},"cfg.model.tensor_model_parallel_size = 1\n",{"type":41,"tag":545,"props":817,"children":818},{"class":547,"line":575},[819],{"type":41,"tag":545,"props":820,"children":821},{},[822],{"type":47,"value":743},{"type":41,"tag":545,"props":824,"children":825},{"class":547,"line":746},[826],{"type":41,"tag":545,"props":827,"children":828},{},[829],{"type":47,"value":830},"cfg.model.expert_model_parallel_size = 32\n",{"type":41,"tag":545,"props":832,"children":833},{"class":547,"line":790},[834],{"type":41,"tag":545,"props":835,"children":836},{},[837],{"type":47,"value":838},"cfg.model.sequence_parallel = False\n",{"type":41,"tag":50,"props":840,"children":841},{},[842],{"type":47,"value":843},"MoE with small TP + PP + EP (e.g. DeepSeek-V3 671B on 256 GPUs):",{"type":41,"tag":533,"props":845,"children":847},{"className":535,"code":846,"language":537,"meta":538,"style":538},"cfg.model.tensor_model_parallel_size = 2\ncfg.model.pipeline_model_parallel_size = 16\ncfg.model.expert_model_parallel_size = 64\ncfg.model.sequence_parallel = True\n",[848],{"type":41,"tag":541,"props":849,"children":850},{"__ignoreMap":538},[851,859,867,875],{"type":41,"tag":545,"props":852,"children":853},{"class":547,"line":548},[854],{"type":41,"tag":545,"props":855,"children":856},{},[857],{"type":47,"value":858},"cfg.model.tensor_model_parallel_size = 2\n",{"type":41,"tag":545,"props":860,"children":861},{"class":547,"line":575},[862],{"type":41,"tag":545,"props":863,"children":864},{},[865],{"type":47,"value":866},"cfg.model.pipeline_model_parallel_size = 16\n",{"type":41,"tag":545,"props":868,"children":869},{"class":547,"line":746},[870],{"type":41,"tag":545,"props":871,"children":872},{},[873],{"type":47,"value":874},"cfg.model.expert_model_parallel_size = 64\n",{"type":41,"tag":545,"props":876,"children":877},{"class":547,"line":790},[878],{"type":41,"tag":545,"props":879,"children":880},{},[881],{"type":47,"value":752},{"type":41,"tag":50,"props":883,"children":884},{},[885],{"type":47,"value":886},"DP size is always implicit:",{"type":41,"tag":533,"props":888,"children":892},{"className":889,"code":891,"language":47},[890],"language-text","data_parallel_size = world_size \u002F (TP * PP * CP)        # dense path\nexpert_data_parallel_size = world_size \u002F (PP * EP * ETP) # MoE path\n",[893],{"type":41,"tag":541,"props":894,"children":895},{"__ignoreMap":538},[896],{"type":47,"value":891},{"type":41,"tag":71,"props":898,"children":900},{"id":899},"minimum-gpu-count",[901],{"type":47,"value":902},"Minimum GPU Count",{"type":41,"tag":50,"props":904,"children":905},{},[906,908,913,915,921,923,929,931,936,938,944,946,952],{"type":47,"value":907},"The ",{"type":41,"tag":494,"props":909,"children":910},{},[911],{"type":47,"value":912},"minimum",{"type":47,"value":914}," GPUs needed to run a config (i.e. with ",{"type":41,"tag":541,"props":916,"children":918},{"className":917},[],[919],{"type":47,"value":920},"DP=1",{"type":47,"value":922},", ",{"type":41,"tag":541,"props":924,"children":926},{"className":925},[],[927],{"type":47,"value":928},"EDP=1",{"type":47,"value":930},")\nis ",{"type":41,"tag":494,"props":932,"children":933},{},[934],{"type":47,"value":935},"not",{"type":47,"value":937}," the product of all parallelism dimensions. The dense path uses\na ",{"type":41,"tag":541,"props":939,"children":941},{"className":940},[],[942],{"type":47,"value":943},"TP*CP",{"type":47,"value":945},"-mesh and the MoE path uses an ",{"type":41,"tag":541,"props":947,"children":949},{"className":948},[],[950],{"type":47,"value":951},"EP*ETP",{"type":47,"value":953},"-mesh, and within each PP\nstage these two meshes share the same set of GPUs — they overlap, they\ndon't multiply. Only PP stages multiply (they're disjoint slices of the\nmodel). So:",{"type":41,"tag":533,"props":955,"children":958},{"className":956,"code":957,"language":47},[890],"min_gpus = PP * max(TP * CP, EP * ETP)\n",[959],{"type":41,"tag":541,"props":960,"children":961},{"__ignoreMap":538},[962],{"type":47,"value":957},{"type":41,"tag":50,"props":964,"children":965},{},[966,971,973,979],{"type":41,"tag":494,"props":967,"children":968},{},[969],{"type":47,"value":970},"Common simplification (WRONG):",{"type":47,"value":972}," ",{"type":41,"tag":541,"props":974,"children":976},{"className":975},[],[977],{"type":47,"value":978},"PP * TP * CP * EP * ETP",{"type":47,"value":980},". This\nover-allocates GPUs and shows up in many READMEs and slurm sizing tables.\nDon't propagate it.",{"type":41,"tag":50,"props":982,"children":983},{},[984,986,995],{"type":47,"value":985},"The decoupling of attention and MoE parallelism (different mesh shapes\nfor the dense and expert paths sharing the same PP-stage GPUs) is\ndetailed in\n",{"type":41,"tag":987,"props":988,"children":992},"a",{"href":989,"rel":990},"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2504.14960",[991],"nofollow",[993],{"type":47,"value":994},"Pangu Ultra MoE (arXiv:2504.14960)",{"type":47,"value":996},".",{"type":41,"tag":78,"props":998,"children":1000},{"id":999},"examples",[1001],{"type":47,"value":1002},"Examples",{"type":41,"tag":85,"props":1004,"children":1005},{},[1006,1027],{"type":41,"tag":89,"props":1007,"children":1008},{},[1009],{"type":41,"tag":93,"props":1010,"children":1011},{},[1012,1017,1022],{"type":41,"tag":97,"props":1013,"children":1014},{},[1015],{"type":47,"value":1016},"Config",{"type":41,"tag":97,"props":1018,"children":1019},{},[1020],{"type":47,"value":1021},"Wrong (PP·TP·CP·EP·ETP)",{"type":41,"tag":97,"props":1023,"children":1024},{},[1025],{"type":47,"value":1026},"Correct (PP·max(TP·CP, EP·ETP))",{"type":41,"tag":113,"props":1028,"children":1029},{},[1030,1051,1072,1092,1113,1134],{"type":41,"tag":93,"props":1031,"children":1032},{},[1033,1038,1042],{"type":41,"tag":120,"props":1034,"children":1035},{},[1036],{"type":47,"value":1037},"PP=1, TP=2, CP=1, EP=8, ETP=1",{"type":41,"tag":120,"props":1039,"children":1040},{},[1041],{"type":47,"value":402},{"type":41,"tag":120,"props":1043,"children":1044},{},[1045,1049],{"type":41,"tag":494,"props":1046,"children":1047},{},[1048],{"type":47,"value":276},{"type":47,"value":1050}," (1 node)",{"type":41,"tag":93,"props":1052,"children":1053},{},[1054,1059,1063],{"type":41,"tag":120,"props":1055,"children":1056},{},[1057],{"type":47,"value":1058},"PP=1, TP=4, CP=1, EP=8, ETP=1",{"type":41,"tag":120,"props":1060,"children":1061},{},[1062],{"type":47,"value":329},{"type":41,"tag":120,"props":1064,"children":1065},{},[1066,1070],{"type":41,"tag":494,"props":1067,"children":1068},{},[1069],{"type":47,"value":276},{"type":47,"value":1071}," (max(4, 8))",{"type":41,"tag":93,"props":1073,"children":1074},{},[1075,1080,1084],{"type":41,"tag":120,"props":1076,"children":1077},{},[1078],{"type":47,"value":1079},"PP=1, TP=2, CP=2, EP=8, ETP=1",{"type":41,"tag":120,"props":1081,"children":1082},{},[1083],{"type":47,"value":329},{"type":41,"tag":120,"props":1085,"children":1086},{},[1087,1091],{"type":41,"tag":494,"props":1088,"children":1089},{},[1090],{"type":47,"value":276},{"type":47,"value":1071},{"type":41,"tag":93,"props":1093,"children":1094},{},[1095,1100,1104],{"type":41,"tag":120,"props":1096,"children":1097},{},[1098],{"type":47,"value":1099},"PP=1, TP=2, CP=4, EP=8, ETP=1",{"type":41,"tag":120,"props":1101,"children":1102},{},[1103],{"type":47,"value":451},{"type":41,"tag":120,"props":1105,"children":1106},{},[1107,1111],{"type":41,"tag":494,"props":1108,"children":1109},{},[1110],{"type":47,"value":276},{"type":47,"value":1112}," (max(8, 8))",{"type":41,"tag":93,"props":1114,"children":1115},{},[1116,1121,1125],{"type":41,"tag":120,"props":1117,"children":1118},{},[1119],{"type":47,"value":1120},"PP=2, TP=2, CP=1, EP=8, ETP=1",{"type":41,"tag":120,"props":1122,"children":1123},{},[1124],{"type":47,"value":329},{"type":41,"tag":120,"props":1126,"children":1127},{},[1128,1132],{"type":41,"tag":494,"props":1129,"children":1130},{},[1131],{"type":47,"value":402},{"type":47,"value":1133}," (2 · max(2, 8))",{"type":41,"tag":93,"props":1135,"children":1136},{},[1137,1142,1146],{"type":41,"tag":120,"props":1138,"children":1139},{},[1140],{"type":47,"value":1141},"PP=1, TP=2, CP=1, EP=4, ETP=2",{"type":41,"tag":120,"props":1143,"children":1144},{},[1145],{"type":47,"value":402},{"type":41,"tag":120,"props":1147,"children":1148},{},[1149,1153],{"type":41,"tag":494,"props":1150,"children":1151},{},[1152],{"type":47,"value":276},{"type":47,"value":1154}," (max(2, 8))",{"type":41,"tag":78,"props":1156,"children":1158},{"id":1157},"scaling-above-the-minimum",[1159],{"type":47,"value":1160},"Scaling above the minimum",{"type":41,"tag":50,"props":1162,"children":1163},{},[1164,1166,1172,1174,1180,1182,1188,1190,1196],{"type":47,"value":1165},"Adding GPUs scales ",{"type":41,"tag":541,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":47,"value":1171},"DP",{"type":47,"value":1173}," and\u002For ",{"type":41,"tag":541,"props":1175,"children":1177},{"className":1176},[],[1178],{"type":47,"value":1179},"EDP",{"type":47,"value":1181}," (the ",{"type":41,"tag":541,"props":1183,"children":1185},{"className":1184},[],[1186],{"type":47,"value":1187},"world_size",{"type":47,"value":1189}," must satisfy\nboth equations simultaneously). At ",{"type":41,"tag":541,"props":1191,"children":1193},{"className":1192},[],[1194],{"type":47,"value":1195},"min_gpus",{"type":47,"value":1197}," the larger-mesh side has\nDP (or EDP) = 1 and the smaller side absorbs the slack.",{"type":41,"tag":50,"props":1199,"children":1200},{},[1201],{"type":47,"value":1202},"Example — TP=2, CP=1, EP=8, ETP=1, PP=1:",{"type":41,"tag":56,"props":1204,"children":1205},{},[1206,1237,1262],{"type":41,"tag":60,"props":1207,"children":1208},{},[1209,1214,1216,1221,1223,1229,1231],{"type":41,"tag":494,"props":1210,"children":1211},{},[1212],{"type":47,"value":1213},"8 GPUs",{"type":47,"value":1215}," (",{"type":41,"tag":541,"props":1217,"children":1219},{"className":1218},[],[1220],{"type":47,"value":1195},{"type":47,"value":1222},"): dense ",{"type":41,"tag":541,"props":1224,"children":1226},{"className":1225},[],[1227],{"type":47,"value":1228},"DP = 8\u002F2 = 4",{"type":47,"value":1230},", MoE ",{"type":41,"tag":541,"props":1232,"children":1234},{"className":1233},[],[1235],{"type":47,"value":1236},"EDP = 8\u002F8 = 1",{"type":41,"tag":60,"props":1238,"children":1239},{},[1240,1245,1247,1253,1254,1260],{"type":41,"tag":494,"props":1241,"children":1242},{},[1243],{"type":47,"value":1244},"16 GPUs",{"type":47,"value":1246},": dense ",{"type":41,"tag":541,"props":1248,"children":1250},{"className":1249},[],[1251],{"type":47,"value":1252},"DP = 8",{"type":47,"value":1230},{"type":41,"tag":541,"props":1255,"children":1257},{"className":1256},[],[1258],{"type":47,"value":1259},"EDP = 2",{"type":47,"value":1261}," → 2× global batch",{"type":41,"tag":60,"props":1263,"children":1264},{},[1265,1270,1271,1277,1278,1284],{"type":41,"tag":494,"props":1266,"children":1267},{},[1268],{"type":47,"value":1269},"32 GPUs",{"type":47,"value":1246},{"type":41,"tag":541,"props":1272,"children":1274},{"className":1273},[],[1275],{"type":47,"value":1276},"DP = 16",{"type":47,"value":1230},{"type":41,"tag":541,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":47,"value":1283},"EDP = 4",{"type":47,"value":1285}," → 4× global batch",{"type":41,"tag":50,"props":1287,"children":1288},{},[1289,1291,1297,1299,1304],{"type":47,"value":1290},"When sizing slurm scripts, compute ",{"type":41,"tag":541,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":47,"value":1296},"--nodes",{"type":47,"value":1298}," from ",{"type":41,"tag":541,"props":1300,"children":1302},{"className":1301},[],[1303],{"type":47,"value":1195},{"type":47,"value":1305}," (or a\nmultiple of it for higher throughput via DP\u002FEDP).",{"type":41,"tag":50,"props":1307,"children":1308},{},[1309],{"type":47,"value":1310},"When answering MoE sizing prompts, include this checklist:",{"type":41,"tag":56,"props":1312,"children":1313},{},[1314,1327,1339,1358],{"type":41,"tag":60,"props":1315,"children":1316},{},[1317,1319,1325],{"type":47,"value":1318},"compute ",{"type":41,"tag":541,"props":1320,"children":1322},{"className":1321},[],[1323],{"type":47,"value":1324},"min_gpus = PP * max(TP * CP, EP * ETP)",{"type":47,"value":1326}," with the requested values",{"type":41,"tag":60,"props":1328,"children":1329},{},[1330,1332,1337],{"type":47,"value":1331},"explicitly reject the wrong ",{"type":41,"tag":541,"props":1333,"children":1335},{"className":1334},[],[1336],{"type":47,"value":978},{"type":47,"value":1338}," full product",{"type":41,"tag":60,"props":1340,"children":1341},{},[1342,1344,1350,1352],{"type":47,"value":1343},"give both DP formulas: dense ",{"type":41,"tag":541,"props":1345,"children":1347},{"className":1346},[],[1348],{"type":47,"value":1349},"world_size \u002F (TP * PP * CP)",{"type":47,"value":1351}," and MoE\n",{"type":41,"tag":541,"props":1353,"children":1355},{"className":1354},[],[1356],{"type":47,"value":1357},"world_size \u002F (PP * EP * ETP)",{"type":41,"tag":60,"props":1359,"children":1360},{},[1361],{"type":47,"value":1362},"mention TP topology, SP, CP divisibility, and long-sequence CP guidance",{"type":41,"tag":71,"props":1364,"children":1366},{"id":1365},"memory-estimation",[1367],{"type":47,"value":1368},"Memory Estimation",{"type":41,"tag":50,"props":1370,"children":1371},{},[1372],{"type":47,"value":1373},"Without parallelism (70B model, FP16):",{"type":41,"tag":533,"props":1375,"children":1378},{"className":1376,"code":1377,"language":47},[890],"parameters:       140 GB\ngradients:        140 GB\noptimizer states: 280 GB (Adam)\nactivations:       48 GB (batch=1, seq=4K)\ntotal:            608 GB\n",[1379],{"type":41,"tag":541,"props":1380,"children":1381},{"__ignoreMap":538},[1382],{"type":47,"value":1377},{"type":41,"tag":50,"props":1384,"children":1385},{},[1386],{"type":47,"value":1387},"With TP=4, PP=4, DP=4 (64 GPUs):",{"type":41,"tag":533,"props":1389,"children":1392},{"className":1390,"code":1391,"language":47},[890],"parameters:        8.75 GB per GPU\ngradients:         8.75 GB per GPU\noptimizer states: 17.50 GB per GPU\nactivations:       3.00 GB per GPU\ntotal:           ~38    GB per GPU\n",[1393],{"type":41,"tag":541,"props":1394,"children":1395},{"__ignoreMap":538},[1396],{"type":47,"value":1391},{"type":41,"tag":71,"props":1398,"children":1400},{"id":1399},"code-anchors",[1401],{"type":47,"value":1402},"Code Anchors",{"type":41,"tag":50,"props":1404,"children":1405},{},[1406],{"type":47,"value":1407},"Parallelism dimensions set in model provider:",{"type":41,"tag":533,"props":1409,"children":1413},{"className":1410,"code":1411,"language":1412,"meta":538,"style":538},"language-66:81:docs\u002Fparallelisms.md shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","model_config = GPTModelProvider(\n    tensor_model_parallel_size=2,\n    # ... other model parameters\n)\n","66:81:docs\u002Fparallelisms.md",[1414],{"type":41,"tag":541,"props":1415,"children":1416},{"__ignoreMap":538},[1417,1425,1433,1441],{"type":41,"tag":545,"props":1418,"children":1419},{"class":547,"line":548},[1420],{"type":41,"tag":545,"props":1421,"children":1422},{},[1423],{"type":47,"value":1424},"model_config = GPTModelProvider(\n",{"type":41,"tag":545,"props":1426,"children":1427},{"class":547,"line":575},[1428],{"type":41,"tag":545,"props":1429,"children":1430},{},[1431],{"type":47,"value":1432},"    tensor_model_parallel_size=2,\n",{"type":41,"tag":545,"props":1434,"children":1435},{"class":547,"line":746},[1436],{"type":41,"tag":545,"props":1437,"children":1438},{},[1439],{"type":47,"value":1440},"    # ... other model parameters\n",{"type":41,"tag":545,"props":1442,"children":1443},{"class":547,"line":790},[1444],{"type":41,"tag":545,"props":1445,"children":1446},{},[1447],{"type":47,"value":1448},")\n",{"type":41,"tag":50,"props":1450,"children":1451},{},[1452],{"type":47,"value":1453},"DP size calculation:",{"type":41,"tag":533,"props":1455,"children":1459},{"className":1456,"code":1457,"language":1458,"meta":538,"style":538},"language-424:436:docs\u002Fparallelisms.md shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","data_parallel_size = world_size \u002F (tensor_model_parallel_size × pipeline_model_parallel_size × context_parallel_size)\n","424:436:docs\u002Fparallelisms.md",[1460],{"type":41,"tag":541,"props":1461,"children":1462},{"__ignoreMap":538},[1463],{"type":41,"tag":545,"props":1464,"children":1465},{"class":547,"line":548},[1466],{"type":41,"tag":545,"props":1467,"children":1468},{},[1469],{"type":47,"value":1457},{"type":41,"tag":50,"props":1471,"children":1472},{},[1473],{"type":47,"value":1474},"Bridge initialization wires parallelism into process groups:",{"type":41,"tag":533,"props":1476,"children":1480},{"className":1477,"code":1478,"language":1479,"meta":538,"style":538},"language-618:628:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Finitialize.py shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","parallel_state.initialize_model_parallel(\n    tensor_model_parallel_size=model_config.tensor_model_parallel_size,\n    pipeline_model_parallel_size=model_config.pipeline_model_parallel_size,\n    ...\n    context_parallel_size=model_config.context_parallel_size,\n    hierarchical_context_parallel_sizes=model_config.hierarchical_context_parallel_sizes,\n    expert_model_parallel_size=model_config.expert_model_parallel_size,\n    ...\n)\n","618:628:src\u002Fmegatron\u002Fbridge\u002Ftraining\u002Finitialize.py",[1481],{"type":41,"tag":541,"props":1482,"children":1483},{"__ignoreMap":538},[1484,1492,1500,1508,1516,1525,1534,1543,1551],{"type":41,"tag":545,"props":1485,"children":1486},{"class":547,"line":548},[1487],{"type":41,"tag":545,"props":1488,"children":1489},{},[1490],{"type":47,"value":1491},"parallel_state.initialize_model_parallel(\n",{"type":41,"tag":545,"props":1493,"children":1494},{"class":547,"line":575},[1495],{"type":41,"tag":545,"props":1496,"children":1497},{},[1498],{"type":47,"value":1499},"    tensor_model_parallel_size=model_config.tensor_model_parallel_size,\n",{"type":41,"tag":545,"props":1501,"children":1502},{"class":547,"line":746},[1503],{"type":41,"tag":545,"props":1504,"children":1505},{},[1506],{"type":47,"value":1507},"    pipeline_model_parallel_size=model_config.pipeline_model_parallel_size,\n",{"type":41,"tag":545,"props":1509,"children":1510},{"class":547,"line":790},[1511],{"type":41,"tag":545,"props":1512,"children":1513},{},[1514],{"type":47,"value":1515},"    ...\n",{"type":41,"tag":545,"props":1517,"children":1519},{"class":547,"line":1518},5,[1520],{"type":41,"tag":545,"props":1521,"children":1522},{},[1523],{"type":47,"value":1524},"    context_parallel_size=model_config.context_parallel_size,\n",{"type":41,"tag":545,"props":1526,"children":1528},{"class":547,"line":1527},6,[1529],{"type":41,"tag":545,"props":1530,"children":1531},{},[1532],{"type":47,"value":1533},"    hierarchical_context_parallel_sizes=model_config.hierarchical_context_parallel_sizes,\n",{"type":41,"tag":545,"props":1535,"children":1537},{"class":547,"line":1536},7,[1538],{"type":41,"tag":545,"props":1539,"children":1540},{},[1541],{"type":47,"value":1542},"    expert_model_parallel_size=model_config.expert_model_parallel_size,\n",{"type":41,"tag":545,"props":1544,"children":1546},{"class":547,"line":1545},8,[1547],{"type":41,"tag":545,"props":1548,"children":1549},{},[1550],{"type":47,"value":1515},{"type":41,"tag":545,"props":1552,"children":1554},{"class":547,"line":1553},9,[1555],{"type":41,"tag":545,"props":1556,"children":1557},{},[1558],{"type":47,"value":1448},{"type":41,"tag":71,"props":1560,"children":1562},{"id":1561},"pitfalls",[1563],{"type":47,"value":1564},"Pitfalls",{"type":41,"tag":1566,"props":1567,"children":1568},"ol",{},[1569,1574,1587,1600,1612,1625,1630,1641],{"type":41,"tag":60,"props":1570,"children":1571},{},[1572],{"type":47,"value":1573},"TP across nodes destroys throughput. Always keep TP within a single\nNVLink domain.",{"type":41,"tag":60,"props":1575,"children":1576},{},[1577,1579,1585],{"type":47,"value":1578},"PP without interleaving has large pipeline bubbles. Use\n",{"type":41,"tag":541,"props":1580,"children":1582},{"className":1581},[],[1583],{"type":47,"value":1584},"virtual_pipeline_model_parallel_size",{"type":47,"value":1586}," when possible.",{"type":41,"tag":60,"props":1588,"children":1589},{},[1590,1592,1598],{"type":47,"value":1591},"SP requires ",{"type":41,"tag":541,"props":1593,"children":1595},{"className":1594},[],[1596],{"type":47,"value":1597},"tensor_model_parallel_size > 1",{"type":47,"value":1599},". Enabling SP alone\nwithout TP is a config error.",{"type":41,"tag":60,"props":1601,"children":1602},{},[1603,1605,1611],{"type":47,"value":1604},"CP requires ",{"type":41,"tag":541,"props":1606,"children":1608},{"className":1607},[],[1609],{"type":47,"value":1610},"seq_length % (2 * context_parallel_size) == 0",{"type":47,"value":996},{"type":41,"tag":60,"props":1613,"children":1614},{},[1615,1617,1623],{"type":47,"value":1616},"EP is only for MoE models. Setting ",{"type":41,"tag":541,"props":1618,"children":1620},{"className":1619},[],[1621],{"type":47,"value":1622},"expert_model_parallel_size",{"type":47,"value":1624}," on a\ndense model is a no-op or error.",{"type":41,"tag":60,"props":1626,"children":1627},{},[1628],{"type":47,"value":1629},"The model-size-to-parallelism table above is a starting heuristic.\nAlways profile the first iteration to check memory and communication.",{"type":41,"tag":60,"props":1631,"children":1632},{},[1633,1639],{"type":41,"tag":541,"props":1634,"children":1636},{"className":1635},[],[1637],{"type":47,"value":1638},"CUDA_DEVICE_MAX_CONNECTIONS",{"type":47,"value":1640}," and related env vars interact with\noverlap settings. See @skills\u002Fnemo-mbridge-perf-tp-dp-comm-overlap\u002FSKILL.md.",{"type":41,"tag":60,"props":1642,"children":1643},{},[1644,1646,1652,1654,1659,1661,1666],{"type":47,"value":1645},"The minimum GPU count for an MoE config is ",{"type":41,"tag":541,"props":1647,"children":1649},{"className":1648},[],[1650],{"type":47,"value":1651},"PP * max(TP*CP, EP*ETP)",{"type":47,"value":1653},",\nnot the product of all dimensions. The dense ",{"type":41,"tag":541,"props":1655,"children":1657},{"className":1656},[],[1658],{"type":47,"value":943},{"type":47,"value":1660},"-mesh and MoE\n",{"type":41,"tag":541,"props":1662,"children":1664},{"className":1663},[],[1665],{"type":47,"value":951},{"type":47,"value":1667},"-mesh share the same GPUs in each PP stage. See\n\"Minimum GPU Count\" section above.",{"type":41,"tag":71,"props":1669,"children":1671},{"id":1670},"verification",[1672],{"type":47,"value":1673},"Verification",{"type":41,"tag":50,"props":1675,"children":1676},{},[1677],{"type":47,"value":1678},"Quick sanity check that combined parallelism initializes correctly using\nthe smallest available recipe with overridden parallelism:",{"type":41,"tag":533,"props":1680,"children":1684},{"className":1681,"code":1682,"language":1683,"meta":538,"style":538},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","CUDA_VISIBLE_DEVICES=0,1,2,3 uv run python -m torch.distributed.run --nproc_per_node=4 \\\n  scripts\u002Ftraining\u002Frun_recipe.py \\\n  --recipe llama32_1b_pretrain_config \\\n  model.tensor_model_parallel_size=2 \\\n  model.pipeline_model_parallel_size=2 \\\n  model.sequence_parallel=True \\\n  train.train_iters=3 train.global_batch_size=8 train.micro_batch_size=1 \\\n  scheduler.lr_warmup_iters=0 \\\n  validation.eval_iters=0 validation.eval_interval=0 \\\n  checkpoint.save_interval=0 \\\n  logger.log_interval=1\n","bash",[1685],{"type":41,"tag":541,"props":1686,"children":1687},{"__ignoreMap":538},[1688,1745,1757,1774,1791,1807,1819,1854,1871,1896,1913],{"type":41,"tag":545,"props":1689,"children":1690},{"class":547,"line":548},[1691,1697,1703,1709,1715,1720,1725,1730,1735,1740],{"type":41,"tag":545,"props":1692,"children":1694},{"style":1693},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1695],{"type":47,"value":1696},"CUDA_VISIBLE_DEVICES",{"type":41,"tag":545,"props":1698,"children":1700},{"style":1699},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1701],{"type":47,"value":1702},"=",{"type":41,"tag":545,"props":1704,"children":1706},{"style":1705},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1707],{"type":47,"value":1708},"0,1,2,3",{"type":41,"tag":545,"props":1710,"children":1712},{"style":1711},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1713],{"type":47,"value":1714}," uv",{"type":41,"tag":545,"props":1716,"children":1717},{"style":1705},[1718],{"type":47,"value":1719}," run",{"type":41,"tag":545,"props":1721,"children":1722},{"style":1705},[1723],{"type":47,"value":1724}," python",{"type":41,"tag":545,"props":1726,"children":1727},{"style":1705},[1728],{"type":47,"value":1729}," -m",{"type":41,"tag":545,"props":1731,"children":1732},{"style":1705},[1733],{"type":47,"value":1734}," torch.distributed.run",{"type":41,"tag":545,"props":1736,"children":1737},{"style":1705},[1738],{"type":47,"value":1739}," --nproc_per_node=4",{"type":41,"tag":545,"props":1741,"children":1742},{"style":1693},[1743],{"type":47,"value":1744}," \\\n",{"type":41,"tag":545,"props":1746,"children":1747},{"class":547,"line":575},[1748,1753],{"type":41,"tag":545,"props":1749,"children":1750},{"style":1705},[1751],{"type":47,"value":1752},"  scripts\u002Ftraining\u002Frun_recipe.py",{"type":41,"tag":545,"props":1754,"children":1755},{"style":1693},[1756],{"type":47,"value":1744},{"type":41,"tag":545,"props":1758,"children":1759},{"class":547,"line":746},[1760,1765,1770],{"type":41,"tag":545,"props":1761,"children":1762},{"style":1705},[1763],{"type":47,"value":1764},"  --recipe",{"type":41,"tag":545,"props":1766,"children":1767},{"style":1705},[1768],{"type":47,"value":1769}," llama32_1b_pretrain_config",{"type":41,"tag":545,"props":1771,"children":1772},{"style":1693},[1773],{"type":47,"value":1744},{"type":41,"tag":545,"props":1775,"children":1776},{"class":547,"line":790},[1777,1782,1787],{"type":41,"tag":545,"props":1778,"children":1779},{"style":1705},[1780],{"type":47,"value":1781},"  model.tensor_model_parallel_size=",{"type":41,"tag":545,"props":1783,"children":1785},{"style":1784},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1786],{"type":47,"value":294},{"type":41,"tag":545,"props":1788,"children":1789},{"style":1693},[1790],{"type":47,"value":1744},{"type":41,"tag":545,"props":1792,"children":1793},{"class":547,"line":1518},[1794,1799,1803],{"type":41,"tag":545,"props":1795,"children":1796},{"style":1705},[1797],{"type":47,"value":1798},"  model.pipeline_model_parallel_size=",{"type":41,"tag":545,"props":1800,"children":1801},{"style":1784},[1802],{"type":47,"value":294},{"type":41,"tag":545,"props":1804,"children":1805},{"style":1693},[1806],{"type":47,"value":1744},{"type":41,"tag":545,"props":1808,"children":1809},{"class":547,"line":1527},[1810,1815],{"type":41,"tag":545,"props":1811,"children":1812},{"style":1705},[1813],{"type":47,"value":1814},"  model.sequence_parallel=True",{"type":41,"tag":545,"props":1816,"children":1817},{"style":1693},[1818],{"type":47,"value":1744},{"type":41,"tag":545,"props":1820,"children":1821},{"class":547,"line":1536},[1822,1827,1832,1837,1841,1846,1850],{"type":41,"tag":545,"props":1823,"children":1824},{"style":1705},[1825],{"type":47,"value":1826},"  train.train_iters=",{"type":41,"tag":545,"props":1828,"children":1829},{"style":1784},[1830],{"type":47,"value":1831},"3",{"type":41,"tag":545,"props":1833,"children":1834},{"style":1705},[1835],{"type":47,"value":1836}," train.global_batch_size=",{"type":41,"tag":545,"props":1838,"children":1839},{"style":1784},[1840],{"type":47,"value":276},{"type":41,"tag":545,"props":1842,"children":1843},{"style":1705},[1844],{"type":47,"value":1845}," train.micro_batch_size=",{"type":41,"tag":545,"props":1847,"children":1848},{"style":1784},[1849],{"type":47,"value":267},{"type":41,"tag":545,"props":1851,"children":1852},{"style":1693},[1853],{"type":47,"value":1744},{"type":41,"tag":545,"props":1855,"children":1856},{"class":547,"line":1545},[1857,1862,1867],{"type":41,"tag":545,"props":1858,"children":1859},{"style":1705},[1860],{"type":47,"value":1861},"  scheduler.lr_warmup_iters=",{"type":41,"tag":545,"props":1863,"children":1864},{"style":1784},[1865],{"type":47,"value":1866},"0",{"type":41,"tag":545,"props":1868,"children":1869},{"style":1693},[1870],{"type":47,"value":1744},{"type":41,"tag":545,"props":1872,"children":1873},{"class":547,"line":1553},[1874,1879,1883,1888,1892],{"type":41,"tag":545,"props":1875,"children":1876},{"style":1705},[1877],{"type":47,"value":1878},"  validation.eval_iters=",{"type":41,"tag":545,"props":1880,"children":1881},{"style":1784},[1882],{"type":47,"value":1866},{"type":41,"tag":545,"props":1884,"children":1885},{"style":1705},[1886],{"type":47,"value":1887}," validation.eval_interval=",{"type":41,"tag":545,"props":1889,"children":1890},{"style":1784},[1891],{"type":47,"value":1866},{"type":41,"tag":545,"props":1893,"children":1894},{"style":1693},[1895],{"type":47,"value":1744},{"type":41,"tag":545,"props":1897,"children":1899},{"class":547,"line":1898},10,[1900,1905,1909],{"type":41,"tag":545,"props":1901,"children":1902},{"style":1705},[1903],{"type":47,"value":1904},"  checkpoint.save_interval=",{"type":41,"tag":545,"props":1906,"children":1907},{"style":1784},[1908],{"type":47,"value":1866},{"type":41,"tag":545,"props":1910,"children":1911},{"style":1693},[1912],{"type":47,"value":1744},{"type":41,"tag":545,"props":1914,"children":1916},{"class":547,"line":1915},11,[1917,1922],{"type":41,"tag":545,"props":1918,"children":1919},{"style":1705},[1920],{"type":47,"value":1921},"  logger.log_interval=",{"type":41,"tag":545,"props":1923,"children":1924},{"style":1784},[1925],{"type":47,"value":1926},"1\n",{"type":41,"tag":50,"props":1928,"children":1929},{},[1930],{"type":47,"value":1931},"Success criteria:",{"type":41,"tag":56,"props":1933,"children":1934},{},[1935,1940,1952],{"type":41,"tag":60,"props":1936,"children":1937},{},[1938],{"type":47,"value":1939},"exit code 0",{"type":41,"tag":60,"props":1941,"children":1942},{},[1943,1945,1951],{"type":47,"value":1944},"finite loss at iteration 3 (e.g. ",{"type":41,"tag":541,"props":1946,"children":1948},{"className":1947},[],[1949],{"type":47,"value":1950},"lm loss: 1.003808E+01",{"type":47,"value":676},{"type":41,"tag":60,"props":1953,"children":1954},{},[1955],{"type":47,"value":1956},"log shows TP=2 PP=2 DP=1 layout with 4 ranks",{"type":41,"tag":1958,"props":1959,"children":1960},"style",{},[1961],{"type":47,"value":1962},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1964,"total":2122},[1965,1983,2000,2011,2023,2037,2050,2064,2077,2088,2102,2111],{"slug":1966,"name":1966,"fn":1967,"description":1968,"org":1969,"tags":1970,"stars":1980,"repoUrl":1981,"updatedAt":1982},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1971,1974,1977],{"name":1972,"slug":1973,"type":15},"Documentation","documentation",{"name":1975,"slug":1976,"type":15},"MCP","mcp",{"name":1978,"slug":1979,"type":15},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":1984,"name":1984,"fn":1985,"description":1986,"org":1987,"tags":1988,"stars":1997,"repoUrl":1998,"updatedAt":1999},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1989,1992,1995],{"name":1990,"slug":1991,"type":15},"Containers","containers",{"name":1993,"slug":1994,"type":15},"Deployment","deployment",{"name":1996,"slug":537,"type":15},"Python",17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":2001,"name":2001,"fn":2002,"description":2003,"org":2004,"tags":2005,"stars":1997,"repoUrl":1998,"updatedAt":2010},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2006,2009],{"name":2007,"slug":2008,"type":15},"CI\u002FCD","ci-cd",{"name":1993,"slug":1994,"type":15},"2026-07-14T05:25:59.97109",{"slug":2012,"name":2012,"fn":2013,"description":2014,"org":2015,"tags":2016,"stars":1997,"repoUrl":1998,"updatedAt":2022},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2017,2018,2019],{"name":2007,"slug":2008,"type":15},{"name":1993,"slug":1994,"type":15},{"name":2020,"slug":2021,"type":15},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":2024,"name":2024,"fn":2025,"description":2026,"org":2027,"tags":2028,"stars":1997,"repoUrl":1998,"updatedAt":2036},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2029,2032,2033],{"name":2030,"slug":2031,"type":15},"Debugging","debugging",{"name":2020,"slug":2021,"type":15},{"name":2034,"slug":2035,"type":15},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":2038,"name":2038,"fn":2039,"description":2040,"org":2041,"tags":2042,"stars":1997,"repoUrl":1998,"updatedAt":2049},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2043,2046],{"name":2044,"slug":2045,"type":15},"Best Practices","best-practices",{"name":2047,"slug":2048,"type":15},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":2051,"name":2051,"fn":2052,"description":2053,"org":2054,"tags":2055,"stars":1997,"repoUrl":1998,"updatedAt":2063},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2056,2059,2062],{"name":2057,"slug":2058,"type":15},"Machine Learning","machine-learning",{"name":2060,"slug":2061,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:11.777011",{"slug":2065,"name":2065,"fn":2066,"description":2067,"org":2068,"tags":2069,"stars":1997,"repoUrl":1998,"updatedAt":2076},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2070,2073],{"name":2071,"slug":2072,"type":15},"QA","qa",{"name":2074,"slug":2075,"type":15},"Testing","testing","2026-07-14T05:25:53.673039",{"slug":2078,"name":2078,"fn":2079,"description":2080,"org":2081,"tags":2082,"stars":1997,"repoUrl":1998,"updatedAt":2087},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2083,2084],{"name":1993,"slug":1994,"type":15},{"name":2085,"slug":2086,"type":15},"Infrastructure","infrastructure","2026-07-14T05:25:49.362534",{"slug":2089,"name":2089,"fn":2090,"description":2091,"org":2092,"tags":2093,"stars":1997,"repoUrl":1998,"updatedAt":2101},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2094,2097,2098],{"name":2095,"slug":2096,"type":15},"Code Review","code-review",{"name":2020,"slug":2021,"type":15},{"name":2099,"slug":2100,"type":15},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":2103,"name":2103,"fn":2104,"description":2105,"org":2106,"tags":2107,"stars":1997,"repoUrl":1998,"updatedAt":2110},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2108,2109],{"name":2071,"slug":2072,"type":15},{"name":2074,"slug":2075,"type":15},"2026-07-14T05:25:54.928983",{"slug":2112,"name":2112,"fn":2113,"description":2114,"org":2115,"tags":2116,"stars":1997,"repoUrl":1998,"updatedAt":2121},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2117,2120],{"name":2118,"slug":2119,"type":15},"Automation","automation",{"name":2007,"slug":2008,"type":15},"2026-07-30T05:29:03.275638",496,{"items":2124,"total":2218},[2125,2140,2150,2164,2174,2189,2204],{"slug":2126,"name":2126,"fn":2127,"description":2128,"org":2129,"tags":2130,"stars":23,"repoUrl":24,"updatedAt":2139},"accelerated-computing-cudf","accelerate data processing with cuDF","Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV\u002FParquet I\u002FO, nullable semantics, and multi-GPU DataFrame workloads.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2131,2134,2137,2138],{"name":2132,"slug":2133,"type":15},"Data Analysis","data-analysis",{"name":2135,"slug":2136,"type":15},"Data Engineering","data-engineering",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-14T05:28:43.176466",{"slug":2141,"name":2141,"fn":2142,"description":2143,"org":2144,"tags":2145,"stars":23,"repoUrl":24,"updatedAt":2149},"aiq-deploy","deploy and manage NVIDIA AI-Q infrastructure","Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2146,2147,2148],{"name":1993,"slug":1994,"type":15},{"name":2085,"slug":2086,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:29:06.667109",{"slug":2151,"name":2151,"fn":2152,"description":2153,"org":2154,"tags":2155,"stars":23,"repoUrl":24,"updatedAt":2163},"aiq-research","conduct deep research with AI-Q","Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2156,2159,2160],{"name":2157,"slug":2158,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":2161,"slug":2162,"type":15},"Research","research","2026-07-14T05:28:06.816956",{"slug":2165,"name":2165,"fn":2166,"description":2167,"org":2168,"tags":2169,"stars":23,"repoUrl":24,"updatedAt":2173},"amc-run-sample-calibration","run AMC sample dataset calibration","Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice. Use when user says 'test sample dataset', 'run sample calibration', 'verify AMC install', or 'launch and test'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2170,2171,2172],{"name":2132,"slug":2133,"type":15},{"name":9,"slug":8,"type":15},{"name":2074,"slug":2075,"type":15},"2026-07-17T05:29:03.913266",{"slug":2175,"name":2175,"fn":2176,"description":2177,"org":2178,"tags":2179,"stars":23,"repoUrl":24,"updatedAt":2188},"amc-run-video-calibration","calibrate video datasets with AutoMagicCalib","Calibrate a new dataset from pre-recorded video files via the AutoMagicCalib REST API. Use when user has local MP4s and says 'calibrate my videos', 'run AMC on these videos', or similar. For RTSP\u002Flive streams, use amc-run-rtsp-calibration instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2180,2181,2184,2185],{"name":2118,"slug":2119,"type":15},{"name":2182,"slug":2183,"type":15},"Imaging","imaging",{"name":9,"slug":8,"type":15},{"name":2186,"slug":2187,"type":15},"Video","video","2026-07-17T05:28:53.905004",{"slug":2190,"name":2190,"fn":2191,"description":2192,"org":2193,"tags":2194,"stars":23,"repoUrl":24,"updatedAt":2203},"amc-setup-calibration-stack","deploy AutoMagicCalib microservice with Docker","Launch AutoMagicCalib microservice and web UI from NGC release images via Docker Compose. Use when user says 'deploy auto calibration', 'launch auto calibration', 'launch AMC', 'start MS+UI', or 'set up auto-magic-calib'. Requires NGC API key.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2195,2196,2199,2200],{"name":1993,"slug":1994,"type":15},{"name":2197,"slug":2198,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},{"name":2201,"slug":2202,"type":15},"Operations","operations","2026-07-17T05:28:56.913999",{"slug":2205,"name":2205,"fn":2206,"description":2207,"org":2208,"tags":2209,"stars":23,"repoUrl":24,"updatedAt":2217},"cudaq-guide","develop quantum applications with CUDA-Q","CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2210,2211,2214],{"name":9,"slug":8,"type":15},{"name":2212,"slug":2213,"type":15},"Quantum Computing","quantum-computing",{"name":2215,"slug":2216,"type":15},"Simulation","simulation","2026-07-14T05:26:58.898253",305]