nemo-mbridge-perf-moe-optimization-workflow
Systematic workflow for MoE training optimization in Megatron Bridge, based on the Megatron-Core MoE paper. Covers the Three Walls framework, parallel folding, recompute strategy, dispatcher choice, and CUDA-graph bring-up.
Security Assessment
About nemo-mbridge-perf-moe-optimization-workflow
This NVIDIA skill provides a systematic workflow for optimizing Mixture-of-Experts (MoE) training throughput in Megatron Bridge, grounded in the Megatron-Core MoE paper. It solves the sprawling, iterative problem of MoE performance tuning by organizing it around the paper's Three Walls framework (memory wall, communication wall, compute and host-overhead wall) and a repeatable fit-first, scale-second, profile-third, retune loop, so engineers attack bottlenecks in a principled order instead of trial and error.
The workflow is presented as ordered phases with a first-answer checklist. Phase 1 makes a run memory-feasible using the smallest model parallelism that fits, selective recompute before full recompute, offloading only as a last resort, and a fake-init flag to sanity-check large layouts on one GPU. Phase 2 chooses parallelism for scale by maximizing data parallelism, keeping hot communication on the fast interconnect, using pipeline plus virtual pipeline parallelism, preferring expert parallelism over extra tensor parallelism, and adding context parallelism for long sequences, all expressed through the Parallel Folding meshes that decouple attention and MoE parallelism. Phase 3 profiles the dominant bottleneck, and retuning then adjusts dispatcher, overlap, FP8 mode, CUDA graphs, or recompute. It also documents default mappings such as alltoall for bring-up and flex plus deepep or hybridep by platform.
It targets performance engineers and researchers running full MoE tuning sweeps or diagnosing throughput regressions after a commit or config change. The content is analytical guidance referencing configuration flags and profiling, with no destructive or system-modifying operations, and its published benchmark reports a passing evaluation with a 100% security dimension.
FAQ
What framework does the workflow use?
The Three Walls framework from the Megatron-Core MoE paper: the memory wall, communication wall, and compute/host-overhead wall, worked through an iterative fit, scale, profile, retune loop.
What should I do first when tuning?
Make the run memory-feasible: use the smallest model parallelism that fits, prefer selective recompute over full recompute, add offloading only if needed, and use --fake-init-process-group to sanity-check large layouts on a single GPU.
What is Parallel Folding?
A technique that decouples attention and MoE parallelism so you can use different meshes (Attention: TP x CP x DP x PP and MoE: ETP x EP x EDP x PP) rather than one compromise layout.
How do I choose a dispatcher?
Defaults are alltoall for safe bring-up, flex plus deepep for H100/B200-style systems, and flex plus hybridep for GB200/GB300/NVL72 systems.
Does the skill execute changes for me?
No. It is a workflow and decision guide referencing configuration flags and profiling steps; you apply the chosen settings yourself.
Install nemo-mbridge-perf-moe-optimization-workflow
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nvidia/skills