nemo-mbridge-perf-moe-comm-overlap
MoE expert-parallel communication overlap in Megatron Bridge. Covers dispatch/combine overlap, flex dispatcher backends, and expert wgrad scheduling.
Security Assessment
About nemo-mbridge-perf-moe-comm-overlap
This NVIDIA skill is a focused tuning guide for Mixture-of-Experts (MoE) expert-parallel communication overlap in Megatron Bridge. It addresses a specific performance problem in large-scale distributed training: when expert parallelism is used and token dispatch/combine communication becomes a visible slice of step time, overlapping that communication with compute can recover throughput. The guide helps engineers decide when the optimization is worthwhile and how to enable it correctly without destabilizing an already-working run.
It documents the exact configuration flags (overlap_moe_expert_parallel_comm, optional delay_wgrad_compute, and disabling moe_shared_expert_overlap), the prerequisites (expert_model_parallel_size > 1, more than one expert, an alltoall or flex token dispatcher, BF16/FP16 precision, and VPP when pipeline parallelism is active), and the subtlety that setting a flex dispatcher backend alone does not activate flex dispatch. It explains interactions with recompute and CUDA graphs, lists code anchors in the Megatron Bridge source and tests, enumerates common pitfalls, and includes a measured but explicitly directional short-run benchmark on H100 hardware showing a throughput improvement when EP communication was exposed. A verification section describes how the overlap validation raises on unmet prerequisites so a clean startup confirms the feature is active.
It targets performance engineers and researchers tuning MoE training throughput or tracing a regression to a comm-overlap config change. The content is analytical and configuration-oriented, with a couple of read-only performance-harness commands, and its published card reports a passing evaluation with a 100% security dimension. It is a knowledge and configuration reference, not a system-modifying tool.
FAQ
When should I enable MoE communication overlap?
When expert parallelism (EP > 1) is in use, token dispatch or combine time is visible in the profile, and the run is already correct and you are tuning throughput. It is discouraged as an early bring-up step.
What are the prerequisites?
expert_model_parallel_size > 1, num_moe_experts > 1, a token dispatcher of alltoall or flex, BF16 or FP16 precision, and VPP set (non-None) when pipeline parallelism is active.
Why isn't the flex dispatcher activating?
Setting moe_flex_dispatcher_backend alone does not activate flex dispatch; you must also set moe_token_dispatcher_type to flex.
Are the reported speedups guaranteed?
No. The benchmark is described as directional rather than release-grade; overlap helps most when dispatch communication is already a visible slice of step time and is not guaranteed to help every run.
How do I confirm overlap is active?
The comm overlap validation raises if prerequisites are not met, so a clean startup plus overlap-related init log messages confirm the feature is active.
Install nemo-mbridge-perf-moe-comm-overlap
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nvidia/skills