·
Last changedVersion:
This version passed the hardening gate. Hardening updated the skill content and independently checked the resulting changes. Classified findings before hardening: 2. Classified findings closed: 1. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 3. Review findings remaining: 9.
2
1
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
SKILL.md | Sensitive Data & Secret Exposure | Agent snooping | Medium | Closed | |
BENCHMARK.md | Sensitive Data & Secret Exposure | Agent snooping | Medium | Open |
2 findings
| Model size | GPUs | Recommended starting point |
|---|---|---|
< 1B | 1-8 | DP only |
1-10B | 8-16 | TP=2-4 + DP |
10-70B | 16-64 | TP=4-8 + PP=2-4 + DP |
70-175B | 64-256 | TP=8 + PP=4-8 + DP |
175-500B | 256-1024 | TP=8 + PP=8-16 + CP=2 + DP |
MoE parallelism differs from dense models. Because only a fraction of parameters are active per token, TP can often stay at 1 or 2 — the active parameter shard already fits on a single GPU. EP is the primary scaling dimension, with PP handling cross-node layer distribution.
| Model (total / active) | TP | PP | EP | Notes |
|---|---|---|---|---|
OLMoE 7B / 1B | 1 | 1 | 8 | EP only, fits single node |
Moonlight 16B / 3B | 2 | 1 | 8 | small TP for shared layers |
DeepSeek-V2 236B / 21B | 1 | 4 | 32 | no TP at all |
GLM-4.5 Air 106B / 12B | 1 | 4 | 8 | no TP at all |
Qwen3 30B-A3B | 4 | 2 | 4 | |
GLM-4.5 355B / 32B | 2 | 8 | 16 | |
Qwen3 235B-A22B | 4 | 16 | 8 | CP=2 for pretrain |
DeepSeek-V3 671B / 37B | 2 | 16 | 64 | TP=2, not 8 |
Kimi-K2 1T | 2 | 16 | 32 |
Key patterns:
These are starting points, not hard rules. Always profile the first iteration to verify memory and communication.
Single node with NVLink:
Multiple nodes with InfiniBand:
Limited network (Ethernet):
The stable rule is: keep TP within a single NVLink domain. Use PP or DP for cross-node scaling. TP across nodes is almost always a performance loss.
| Sequence length | Recommendation |
|---|---|
< 2K | standard TP + PP + DP |
2K-8K | add SP ( |
8K-32K | add CP=2 |
32K+ | add CP=4-8, consider |
3D parallelism (TP + PP + DP):
4D parallelism (TP + PP + CP + DP):
MoE with EP + PP (e.g. DeepSeek-V2 236B on 128 GPUs):
MoE with small TP + PP + EP
DP size is always implicit:
The minimum GPUs needed to run a config (i.e. with DP=1, EDP=1)
is not the product of all parallelism dimensions. The dense path uses
a TP*CP-mesh and the MoE path uses an EP*ETP-mesh, and within each PP
stage these two meshes share the same set of GPUs — they overlap, they
don't multiply. Only PP stages multiply (they're disjoint slices of the
model). So:
Common simplification (WRONG): PP * TP * CP * EP * ETP. This
over-allocates GPUs and shows up in many READMEs and slurm sizing tables.
Don't propagate it.
The decoupling of attention and MoE parallelism (different mesh shapes for the dense and expert paths sharing the same PP-stage GPUs) is detailed in Pangu Ultra MoE (arXiv:2504.14960).
| Config | Wrong (PP·TP·CP·EP·ETP) | Correct (PP·max(TP·CP, EP·ETP)) |
|---|---|---|
PP=1, TP=2, CP=1, EP=8, ETP=1 | 16 | 8 (1 node) |
PP=1, TP=4, CP=1, EP=8, ETP=1 | 32 | 8 (max(4, 8)) |
PP=1, TP=2, CP=2, EP=8, ETP=1 | 32 | 8 (max(4, 8)) |
PP=1, TP=2, CP=4, EP=8, ETP=1 | 64 | 8 (max(8, 8)) |
PP=2, TP=2, CP=1, EP=8, ETP=1 | 32 | 16 (2 · max(2, 8)) |
PP=1, TP=2, CP=1, EP=4, ETP=2 | 16 | 8 (max(2, 8)) |
Adding GPUs scales DP and/or EDP (the world_size must satisfy
both equations simultaneously). At min_gpus the larger-mesh side has
DP (or EDP) = 1 and the smaller side absorbs the slack.
Example — TP=2, CP=1, EP=8, ETP=1, PP=1:
min_gpus): dense DP = 8/2 = 4, MoE EDP = 8/8 = 1DP = 8, MoE EDP = 2 → 2× global batchDP = 16, MoE EDP = 4 → 4× global batchWhen sizing slurm scripts, compute --nodes from min_gpus (or a
multiple of it for higher throughput via DP/EDP).
When answering MoE sizing prompts, include this checklist:
min_gpus = PP * max(TP * CP, EP * ETP) with the requested valuesPP * TP * CP * EP * ETP full productworld_size / (TP * PP * CP) and MoE
world_size / (PP * EP * ETP)Without parallelism (70B model, FP16):
With TP=4, PP=4, DP=4 (64 GPUs):
Parallelism dimensions set in model provider:
DP size calculation:
Bridge initialization wires parallelism into process groups:
TP across nodes destroys throughput. Always keep TP within a single NVLink domain.
PP without interleaving has large pipeline bubbles. Use
virtual_pipeline_model_parallel_size when possible.
SP requires tensor_model_parallel_size > 1. Enabling SP alone
without TP is a config error.
CP requires seq_length % (2 * context_parallel_size) == 0.
EP is only for MoE models. Setting expert_model_parallel_size on a
dense model is a no-op or error.
The model-size-to-parallelism table above is a starting heuristic. Always profile the first iteration to check memory and communication.
CUDA_DEVICE_MAX_CONNECTIONS and related env vars interact with
overlap settings.
The minimum GPU count for an MoE config is PP * max(TP*CP, EP*ETP),
not the product of all dimensions. The dense TP*CP-mesh and MoE
EP*ETP-mesh share the same GPUs in each PP stage. See
"Minimum GPU Count" section above.
Quick sanity check that combined parallelism initializes correctly using the smallest available recipe with overridden parallelism:
Success criteria:
lm loss: 1.003808E+01)Get started with chainctlchainctl skill install public/nvidia/nemo-mbridge-perf-parallelism-strategies:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.chainreg.biz/public/github.com/nvidia/skills/nemo-mbridge-perf-parallelism-strategies:latest
Apache-2.0
BENCHMARK.md
HARDENING.md
LICENSE
SKILL.md
card.yaml
evals/evals.json
skill-card.md
skill.oms.sig