nemo-mbridge-perf-expert-parallel-overlap
Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlap_moe_expert_parallel_comm, delay_wgrad_compute, and flex dispatcher backends such as DeepEP and HybridEP.
Security Assessment
About nemo-mbridge-perf-expert-parallel-overlap
This NVIDIA skill is an operational guide for validating and using Mixture-of-Experts (MoE) expert-parallel (EP) communication overlap in Megatron-Bridge. It addresses a specific performance-tuning problem: the token dispatch/combine all-to-all communication in EP training can dominate step time, and this skill explains how to hide that cost by overlapping it with expert feed-forward compute. It centers on the overlap_moe_expert_parallel_comm and delay_wgrad_compute config knobs and the flex dispatcher backends DeepEP and HybridEP.
The guide provides a quick decision framework (when to enable EP overlap, when to prefer the standard alltoall dispatcher versus flex, and when to avoid overlap entirely, such as with full activation recompute or PyTorch below 2.6.0). It documents a correctness-first isolation benchmark measured on Qwen3 MoE 30B-A3B SFT across 16 H100 GPUs, including exact override flags and steady-window timings showing EP overlap producing roughly a 1.3x speedup on that inter-node all-to-all shape, while noting delayed wgrad did not show an independent win there. It gives concrete Python enablement snippets for both the alltoall and flex dispatcher paths, plus compatibility constraints on expert model parallel size, expert count, and dispatcher type. It is Apache-2.0 licensed and shipped with published evaluation results.
It targets ML engineers and performance specialists training large MoE models who are tuning for throughput or tracing a throughput regression back to an EP overlap config change. Use cases include enabling EP overlap on a communication-bound run, choosing a dispatcher backend for a given GPU generation, and diagnosing why a config change slowed training. It produces configuration guidance, shell/Python snippets, and analysis; it does not itself perform destructive or privileged operations.
FAQ
What problem does EP overlap solve?
It hides the latency of MoE token dispatch/combine all-to-all communication by running it concurrently with expert FFN compute, reducing step time on communication-bound MoE training runs.
When should I avoid EP overlap?
When full activation recompute is enabled, when moe_shared_expert_overlap is enabled, while the run is still being brought up for correctness, or on PyTorch older than 2.6.0.
Which dispatcher backend should I use?
Start with the alltoall dispatcher for broadest compatibility on the first rollout, then move to flex with DeepEP or HybridEP on supported Ampere/Hopper/Blackwell GPUs when seeking additional gains.
What speedup can I expect?
It depends on the shape. On the documented Qwen3 MoE 30B-A3B benchmark on 16 H100s, plain EP overlap gave about a 1.317x steady-window speedup; on tiny or communication-light runs the gain may be negligible.
What are the hard compatibility constraints?
Expert model parallel size greater than 1, more than one MoE expert, and moe_token_dispatcher_type set to alltoall for the standard path.
Install nemo-mbridge-perf-expert-parallel-overlap
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nvidia/skills