Skip to main content
skill CX Codex

nemo-mbridge-perf-moe-dispatcher-selection — Claude Code skill: pick

Picks between alltoall, DeepEP and HybridEP for MoE token dispatch based on your hardware, EP degree and optimization stage.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NVIDIA/skills --skill nemo-mbridge-perf-moe-dispatcher-selection -a claude-code
Open on GitHub

What nemo-mbridge-perf-moe-dispatcher-selection does

The skill answers the "which dispatcher" question with decision tables. One splits by hardware: H100 and B200 point to DeepEP, GB200/GB300 NVL72 to HybridEP, and an unknown or first bring-up run to alltoall. Another splits by EP size, where small EP makes the choice second-order and large EP on NVL72 makes HybridEP the target. A third table covers model families: DSV3, Claude 235B, Claude 30B, Claude and MoE VLMs.

Tuning knobs come with the guidance. DeepEP is selected by setting moe_token_dispatcher_type="flex" and moe_flex_dispatcher_backend="deepep", with --moe-deepep-num-sms controlling the SM count (default 20). HybridEP uses --moe-hybridep-num-sms (default 16, the harness uses 32, sweep between 16 and 32) plus NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN, which has to match the NVLink domain size of the deployment. Mismatch that value and you lose performance, sometimes correctness.

The hard gate is the runtime package. Both deepep and hybridep need their packages present at model construction time, and a missing one fails before the first iteration, so there is no dispatcher timing to read at all. Check the import in the target container first and keep alltoall as the measured fallback. The skill also warns that wins are workload-dependent: in BF16 alltoall and HybridEP can run close, and a bad pipeline layout or CPU affinity can wipe out the gain.

What it helps with

  • pick a token dispatcher for a given GPU and EP degree
  • decide when DeepEP stops being enough and HybridEP is worth testing
  • set the SM count for DeepEP and HybridEP communication kernels
  • trace a MoE regression or crash back to a dispatcher config change
  • confirm the runtime package actually imports in the container

Example prompts for the agent

  • Which MoE dispatcher should I use for Claude 235B on GB200?
  • Our run fails after switching to hybridep — check the dispatcher config
  • Compare alltoall and DeepEP for EP=16 on H100

How to install nemo-mbridge-perf-moe-dispatcher-selection

1Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill nemo-mbridge-perf-moe-dispatcher-selection -a claude-code

2Manually: put the files in place

~/.claude/skills/nemo-mbridge-perf-moe-dispatcher-selection/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nemo-mbridge-perf-moe-dispatcher-selection/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nemo-mbridge-perf-moe-dispatcher-selection

How do I install nemo-mbridge-perf-moe-dispatcher-selection in Claude?

Run npx skills add NVIDIA/skills --skill nemo-mbridge-perf-moe-dispatcher-selection -a claude-code. The skill lands at ~/.claude/skills/nemo-mbridge-perf-moe-dispatcher-selection/SKILL.md.

What does nemo-mbridge-perf-moe-dispatcher-selection do?

It tells you which MoE token dispatcher to use — alltoall, DeepEP or HybridEP — based on hardware, EP degree and optimization stage, and lists the tuning parameters for DeepEP and HybridEP.

Why do DeepEP or HybridEP fail before the first iteration?

Both need their runtime packages installed at model construction time. Without the package the run dies on an import failure, leaving alltoall as the only measured fallback.

Source text

SKILL.md · Apache-2.0
---
name: nemo-mbridge-perf-moe-dispatcher-selection
description: Choose the right MoE token dispatcher (`alltoall`, DeepEP, or HybridEP) for the hardware, EP degree, and optimization stage. Summarizes patterns from DSV3, Qwen3, Qwen3-Next, and VLM bring-up work.
license: Apache-2.0
when_to_use: Choosing a MoE token dispatcher, or tracing a MoE regression or crash to a dispatcher config change; 'which dispatcher', 'alltoall vs DeepEP', 'HybridEP', 'MoE dispatcher', 'flex backend', 'EP dispatcher selection'.
---

# MoE Dispatcher Selection Guide

Stable docs: @docs/training/moe-optimization.md
Card: @skills/nemo-mbridge-perf-moe-dispatcher-selection/card.yaml

## Quick Decision

### By hardware

| Hardware | First choice | Why |
|---|---|---|
| H100 | DeepEP, if the runtime package is installed | Strong default for cross-node EP on Hopper |
| B200 | DeepEP, if the runtime package is installed | Good first choice unless a platform-specific HybridEP path is available |
| GB200 / GB300 NVL72 | HybridEP, if the runtime package is installed | Best fit for NVLink-domain-aware dispatch and lower memory pressure |
| Unknown or first bring-up | `alltoall` | Easiest path for correctness and debugging |

### By EP degree

| EP size | Guidance |
|---|---|
| Small EP | Dispatcher choice is usually second-order; start with `alltoall` or DeepEP |
| Medium EP | DeepEP often becomes worthwhile |
| Large EP | HybridEP is usually the best target on NVL72 systems |

## Model-Family Patterns

| Workload | Common best path | Notes |
|---|---|---|
| DSV3 at large scale | HybridEP on GB200 or GB300, DeepEP on H100 | Dispatcher choice matters more as EP and PP both grow |
| Qwen3 235B | DeepEP on H100, HybridEP on GB200 | HybridEP usually wins on GB200 and often uses less memory |
| Qwen3 30B | DeepEP | Smaller models still benefit, but the absolute gap is smaller |
| Qwen3-Next | Close race in BF16, HybridEP stronger in FP8 or memory-tight runs | Good reminder to test, not assume |
| MoE VLMs | Start simple, then test HybridEP on GB200-class systems | Vision workloads are sensitive to both memory and host overhead |

## Rounded Evidence Summary

### Backend availability gate

Do not interpret a dispatcher timing until the container has proven that the
selected backend package is available. `--moe_flex_dispatcher_backend None`
selects the standard `alltoall` dispatcher, while `deepep` and `hybridep`
select `moe_token_dispatcher_type="flex"` and then require their corresponding
runtime packages at model construction time. If DeepEP or HybridEP is missing,
record the import failure as an environment limitation and treat `alltoall` as
the only measured correctness fallback for that run.

### Qwen3 30B A3B on H100

A short 2026-05-17 H100 smoke run used Qwen3 30B A3B BF16, 16 GPUs, EP=16,
the recipe's Transformer Engine CUDA graph scopes (`moe_router`,
`moe_preprocess`), and `model.moe_permute_fusion=false` due to a Triton JIT
compatibility issue in the run container. The `alltoall` fallback completed five
steps with 45.65 s mean step time after warmup, 132.9 mean TFLOP/s/GPU after
warmup, final loss 11.44050, and 61.351 GB peak max allocated memory. DeepEP
and HybridEP selected the requested flex backend in the dumped configs but
failed before the first iteration because the packages were not installed. This
confirms the availability gate; it is not a throughput ranking for flex
dispatchers on H100.

### DSV3 on GB200 or GB300

The broad trend is more important than any single row in the tracker:

- plain `alltoall` is usually the conservative baseline
- DeepEP improves that baseline once EP communication becomes visible
- HybridEP adds another step up on NVL72 systems, especially after CUDA graphs,
  routing improvements, and CPU-side cleanup are already in place

In practice, the stack often moves from roughly "low-teens MFU" territory with
an untuned baseline into "high-teens to low-20s MFU" territory after the full
dispatcher and kernel stack is tuned.

### Qwen3 235B on GB200

For Qwen3 235B, the practical ordering is usually:

1. `alltoall` for initial bring-up
2. DeepEP if you want a familiar tuned path
3. HybridEP for the strongest steady-state result on GB200

HybridEP is usually modestly faster than `alltoall` on this workload and often
has noticeably better memory headroom.

### Qwen3-Next on GB200

This family is a good reminder that dispatcher wins are workload-dependent:

- in BF16, `alltoall` and HybridEP can be close
- in FP8 or memory-constrained settings, HybridEP tends to look better
- pipeline layout and grouped-GEMM changes can matter almost as much as the
  dispatcher itself

## Tuning Parameters

### DeepEP

DeepEP is selected by setting
`moe_token_dispatcher_type="flex"` and `moe_flex_dispatcher_backend="deepep"`.

```bash
--moe-deepep-num-sms 20
```

Tune the SM count allocated to DeepEP communication kernels (default 20).
The optimal value depends on the workload and EP degree.
First confirm the DeepEP package imports in the target container; a missing
package fails during model construction, before any dispatcher timing is
available.

### HybridEP

HybridEP is selected by setting
`moe_token_dispatcher_type="flex"` and `moe_flex_dispatcher_backend="hybridep"`.

```bash
--moe-hybridep-num-sms 16
```

Tune the SM count allocated to HybridEP communication (default 16). The
performance harness uses 32 for HybridEP workloads. Sweep between 16 and 32
for the target hardware. Set
`NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN` to match the NVLink domain size of
the deployment. If it does not match the actual topology, performance and
sometimes correctness will suffer.
First confirm the HybridEP package imports in the target container; a missing
package fails during model construction, before any dispatcher timing is
available.

### Routing mode

```bash
--moe-router-force-load-balancing
```

For performance benchmarking, force-balance routing is the safer default. It
usually outperforms dropless routing in large-scale benchmarks and makes results
more comparable across dispatcher backends.

## Key Interactions

| Feature | Interaction |
|---|---|
| CUDA graphs | Best paired with `attn moe_router moe_preprocess` on dropless MoE |
| EP overlap | Helps when dispatcher time is still visible after backend tuning |
| FP8 | Often increases the relative importance of communication and host overhead |
| CPU affinity | Can matter as much as dispatcher choice on GB200 or GB300 |
| Pipeline layout | Poor PP or VPP layout can erase dispatcher gains |

## When To Use Each

### `alltoall`

- first correctness bring-up
- small EP configurations
- debugging communication regressions

### DeepEP

- Hopper or B200 deployments
- cross-node EP is clearly visible in profiles
- you want a mature intermediate step before testing HybridEP

### HybridEP

- GB200 or GB300 NVL72 systems
- large EP degrees
- memory headroom matters in addition to throughput

## Pitfalls

1. **Do not compare dispatchers on different stacks**: container, routing mode,
   PP layout, and CUDA-graph scope can move the result as much as the dispatcher.

2. **HybridEP is topology-sensitive**: it is not a universal win outside the
   hardware it was designed for.

3. **Both dispatchers need SM tuning**: default `moe_deepep_num_sms` (20) and
   `moe_hybridep_num_sms` (16) are reasonable starting points but rarely optimal.

4. **Force-balance and dropless are not interchangeable baselines**: keep the
   routing mode fixed when comparing dispatcher backends.

5. **Memory and throughput can trade off differently by model**: Qwen3-style
   runs may show a smaller speed delta than DSV3, but still justify HybridEP for
   memory headroom.

6. **Backend import failures are not performance data**: if DeepEP or HybridEP
   is missing from the container, do not compare its failed job against a
   completed `alltoall` job. Fix the environment first, then rerun the same
   stack.

© NVIDIA · Apache-2.0 · NVIDIA/skills

Similar skills

Everything for AI and ML →

From the same set178

mcore-run-on-slurm Prepare a SLURM launch for distributed Megatron-LM training, from an sbatch skeleton to rank-level failure checks. Useful when configuring or debugging a multi-node job. CX Codex +1 1,800installs nemo-rl-brev-etiquette A skill that tells the agent where files belong on a Brev box: code stays in the repo, heavy run output goes to /ephemeral. CX Codex +1 1,800installs mcore-linting-and-formatting Sets up linting and code formatting for Megatron-LM projects. It helps fix ruff and mypy violations and sort imports before opening a pull request. CX Codex +1 1,800installs nemo-mbridge-perf-tp-dp-comm-overlap A skill that walks through enabling TP, DP and PP communication overlap in Megatron-Bridge: which knobs to turn, where the code gates it, how to verify. CX Codex +1 1,800installs nemo-mbridge-perf-megatron-fsdp Configures Megatron FSDP in Megatron-Bridge to replace standard DDP, helping resolve out-of-memory errors and verify training checkpoints. CX Codex +1 1,800installs nemo-rl-docs This skill hands your agent the documentation rules for NeMo-RL: keeping docs/index.md current and writing docstrings in Google style. Useful when you touch the docs. CX Codex +1 1,800installs nemo-mbridge-resiliency A skill covering resiliency setup in Megatron Bridge: fault tolerance, straggler detection, preemption and re-run state machine. CX Codex +1 1,800installs nemo-mbridge-perf-hierarchical-context-parallel Configures hierarchical context parallelism in Megatron-Bridge. Useful for scaling long-sequence model training when context length exceeds KV head counts. CX Codex +1 1,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor