[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PQGX93F19TMEJCZR14W7MH":3,"skill-same:01M6PQGX93F19TMEJCZR14W7MH":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6PQGX93F19TMEJCZR14W7MH","nemo-mbridge-perf-parallelism-strategies",null,"Operational guide for choosing and combining parallelism strategies in Megatron Bridge, including sizing rules, hardware topology mapping, and combined parallelism configuration.","headmktlucca-ui\u002Fneuroads-lp","headmktlucca-ui","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F247379838?v=4","01M6PDVAV6M1W96D1SR1PDF8CS","NeuroAds","01M6PDVAZ4P281GNDKD45CYTF5",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"strategies","nemo mbridge perf parallelism strategies","NeMo","perf","cp","combined","for","which","pp","megatron","how to","oom","tensor","change","bridge","Rules","parallel","regression","how","pipeline","2026-11-10 10:12:30",false,"---\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","# 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",{"name":5,"license":15,"description":7,"when_to_use":44},"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'.","main","7a940b8e5af16c95e5c190a524421d32fc7445a9",".claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui","https:\u002F\u002Fneuroads.com.br","2026-08-12 00:42:44",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add headmktlucca-ui\u002Fneuroads-lp --skill nemo-mbridge-perf-parallelism-strategies",{"tool":58,"command":59},"bunx","bunx skills add headmktlucca-ui\u002Fneuroads-lp --skill nemo-mbridge-perf-parallelism-strategies",{"tool":61,"command":62},"pnpm","pnpm dlx skills add headmktlucca-ui\u002Fneuroads-lp --skill nemo-mbridge-perf-parallelism-strategies","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002FSKILL.md",true,[66,72,76,80,84],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"BENCHMARK.md","REFERENCE","参考文档",4380,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002FBENCHMARK.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"card.yaml",2948,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002Fcard.yaml",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fevals.json",1552,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002Fevals\u002Fevals.json",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"skill-card.md",3749,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002Fskill-card.md",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"skill.oms.sig","OTHER","其他",4837,"https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnemo-mbridge-perf-parallelism-strategies\u002Fskill.oms.sig",[91,118,142,168,186,221],{"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":95,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":106,"publishedAt":39},"01M6PTDCZTXTGSTX4RFK901YSZ","xunit-skill","Generates xUnit.net tests in C#. Covers Fact\u002FTheory, constructor injection, IClassFixture, and FluentAssertions. Use when user mentions \"xUnit\", \"[Fact]\", \"[Theory]\", \"Assert.Equal\", \"C# xUnit\". Triggers on: \"xUnit\", \"[Fact]\", \"[Theory]\", \"Assert.Equal C#\", \"xUnit.net\".","MIT","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxunit-skill\u002FSKILL.md",[98,103],{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":104,"categoryName":105,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000023","Skill与智能体开发",[107,108,109,110,111,112,113,114,115,116,117],"xunit","xunit skill","testing","injection","user","use","tests","triggers","unit","unit-testing","C#",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":126,"publishedAt":39},"01M6PTCB59ZTG5FTMWGPYEMMBP","xcuitest-skill","Generates XCUITest UI tests for iOS\u002FiPadOS apps in Swift. Apple's native testing framework for reliable, fast UI automation. Supports local simulators and TestMu AI cloud real devices. Use when user mentions \"XCUITest\", \"XCTest\", \"iOS UI test\", \"Swift test\", \"XCUIApplication\". Triggers on: \"XCUITest\", \"XCTest UI\", \"iOS UI test\", \"Swift UI test\", \"XCUIApplication\", \"TestMu\".","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxcuitest-skill\u002FSKILL.md",[124,125],{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},{"categoryNo":104,"categoryName":105,"taxonomyType":101,"taxonomyTypeDesc":102},[127,128,109,129,130,131,132,133,112,134,135,136,137,138,113,114,139,140,25,141],"xcuitest","xcuitest skill","automation","test","testing framework","ios","devices","mobile","mobile-testing","ui test","local","apple","apps","native","objective",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":152,"publishedAt":39},"01M6PTATMNTY9NF4J7KSR76YK6","world-builder","Create and manage generative game zones for Dorothy's Pokemon-style world. Use this skill when creating, updating, or designing game worlds via MCP tools.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fworld-builder\u002FSKILL.md",[148,151],{"categoryNo":149,"categoryName":150,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":104,"categoryName":105,"taxonomyType":101,"taxonomyTypeDesc":102},[153,154,155,156,157,158,159,160,112,161,162,163,164,165,166,25,167],"builder","world","world builder","MCP","create","mcp tools","Tools","game","pokemon","manage","style","via","theme","zone","generative",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":176,"publishedAt":39},"01M6PT9Z92JTSQEHE1QR0NNW5F","webdriverio-skill","Generates WebdriverIO (WDIO) automation tests in JavaScript or TypeScript. Supports local and TestMu AI cloud. Use when user mentions \"WebdriverIO\", \"WDIO\", \"wdio.conf\", \"browser.url\", \"$\", \"$$\". Triggers on: \"WebdriverIO\", \"WDIO\", \"wdio\", \"browser.$\".","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwebdriverio-skill\u002FSKILL.md",[174,175],{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},{"categoryNo":104,"categoryName":105,"taxonomyType":101,"taxonomyTypeDesc":102},[177,109,178,129,179,180,181,182,111,112,183,137,113,114,184,185],"webdriverio skill","typescript","javascript","browser","cloud","e2e","e2e-testing","URL","conf",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":201,"publishedAt":39},"01M6PT9NVK36ZWCQ69YXK3FR4K","web-design-guidelines","Web platform design and accessibility guidelines. Use when building web interfaces, auditing accessibility, implementing responsive layouts, or reviewing web UI code. Triggers on tasks involving HTML, CSS, web components, WCAG compliance, responsive design, or web performance.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb\u002FSKILL.md",[192,195,196],{"categoryNo":193,"categoryName":194,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":149,"categoryName":150,"taxonomyType":101,"taxonomyTypeDesc":102},{"categoryNo":197,"categoryName":198,"taxonomyType":199,"taxonomyTypeDesc":200},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,114,220],"design","web","guidelines","web design guidelines","web design","css","performance","components","web components","tasks","code","web performance","ui","platform design","html","responsive design","responsive","platform","implementing",{"skillNo":222,"name":223,"nameZh":6,"description":224,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":225,"categories":226,"keywords":229,"publishedAt":39},"01M6PT9A3JKRE3X34276F2FW5R","watchos-design-guidelines","Apple Human Interface Guidelines for Apple Watch. Use when building watchOS apps, complications, or workout features. Triggers on tasks involving Watch UI, Digital Crown, glanceable interfaces, or wrist-based interactions.","https:\u002F\u002Fgithub.com\u002Fheadmktlucca-ui\u002Fneuroads-lp\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwatchos\u002FSKILL.md",[227,228],{"categoryNo":149,"categoryName":150,"taxonomyType":101,"taxonomyTypeDesc":102},{"categoryNo":197,"categoryName":198,"taxonomyType":199,"taxonomyTypeDesc":200},[202,204,230,211,214,112,231,232,138,219,233,114,139,234,25,235,236],"watchos design guidelines","workout","human","watch","interface","platform-design","features"]