К основному содержанию
скилл CX Codex

nemo-mbridge-perf-moe-dispatcher-selection — скилл для Claude Code

Помогает выбрать между alltoall, DeepEP и HybridEP для раздачи токенов в MoE-моделях по железу, размеру EP и этапу оптимизации.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add NVIDIA/skills --skill nemo-mbridge-perf-moe-dispatcher-selection -a claude-code
Открыть на GitHub

Что делает nemo-mbridge-perf-moe-dispatcher-selection

Скилл отвечает на вопрос «какой диспетчер ставить» таблицами решений: по железу (H100, B200, GB200/GB300 NVL72) и по размеру EP. Для H100 и B200 первым выбором идёт DeepEP, для NVL72 — HybridEP, а на первой сборке проще всего alltoall. Отдельная таблица разбирает семейства моделей: DSV3, Qwen3 235B, Qwen3 30B, Qwen3-Next и MoE-VLM.

Внутри есть параметры тюнинга. DeepEP включается через moe_token_dispatcher_type="flex" и moe_flex_dispatcher_backend="deepep", число SM задаёт --moe-deepep-num-sms (по умолчанию 20). Для HybridEP — --moe-hybridep-num-sms (по умолчанию 16, в харнессе используют 32, советуют перебирать от 16 до 32) и переменная NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN, которую надо выставить по размеру NVLink-домена в развёртывании. Если она не совпадает с топологией, страдает производительность, а иногда и корректность.

Главное ограничение — пакет рантайма. deepep и hybridep требуют своих пакетов на этапе сборки модели, и без них прогон падает до первого шага. Поэтому сначала проверяйте импорт в контейнере, а alltoall держите как запасной вариант для проверки корректности. Ещё скилл напоминает: выигрыш диспетчера зависит от нагрузки, в BF16 alltoall и HybridEP могут идти вровень, а плохая раскладка pipeline или CPU affinity способны съесть весь прирост.

Какие задачи решает

  • выбрать диспетчер токенов под конкретное железо и размер EP
  • понять, когда DeepEP перестаёт быть достаточным и нужен HybridEP
  • настроить число SM для коммуникационных ядер DeepEP и HybridEP
  • отловить регрессию или падение после смены конфига диспетчера
  • проверить, что пакет рантайма вообще импортируется в контейнере

Примеры запросов агенту

  • Какой MoE-диспетчер выбрать для Claude 235B на GB200?
  • У нас падает прогон после переключения на hybridep — проверь конфиг диспетчера
  • Сравни alltoall и DeepEP для EP=16 на H100

Как установить nemo-mbridge-perf-moe-dispatcher-selection

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/nemo-mbridge-perf-moe-dispatcher-selection/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о nemo-mbridge-perf-moe-dispatcher-selection

Как установить nemo-mbridge-perf-moe-dispatcher-selection в Claude?

Выполните npx skills add NVIDIA/skills --skill nemo-mbridge-perf-moe-dispatcher-selection -a claude-code. Скилл появится в ~/.claude/skills/nemo-mbridge-perf-moe-dispatcher-selection/SKILL.md.

Что делает nemo-mbridge-perf-moe-dispatcher-selection?

Подсказывает, какой диспетчер токенов MoE взять — alltoall, DeepEP или HybridEP — с учётом железа, размера EP и этапа оптимизации, и даёт параметры тюнинга для DeepEP и HybridEP.

Почему DeepEP или HybridEP падают до первого шага?

Обоим нужны соответствующие пакеты рантайма на этапе сборки модели. Если пакет не установлен, прогон завершается ошибкой импорта, а alltoall остаётся единственным измеренным запасным вариантом.

Исходный текст

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

Похожие скиллы

Всё по теме «ИИ и ML» →
dispatcher adobe Единая точка входа в набор скиллов по Adobe Dispatcher для AEM 6.5 LTS: разбирает запрос и отправляет его нужному специалисту. CX Codex +1 986установок nemo-evaluator-sdk Orchestra Research Скилл запускает оценку языковых моделей на 100+ бенчмарках из 18+ харнессов: MMLU, HumanEval, GSM8K, safety и VLM. Пригодится, когда нужно сравнить модели воспроизводимо. CX Codex +1 943установок benchmark-model modular Гоняет нагрузку на запущенный max serve и выдаёт tokens/sec, TTFT и TPOT. Нужен, когда надо понять, сколько модель держит и где проседает latency. CX Codex +1 887установок gpu-server-management devops-skills Скилл ведёт агента по установке драйверов NVIDIA, CUDA и Docker с GPU, делит A100/H100 через MIG и настраивает мониторинг. CX Codex +1 331установок gpu-kubernetes-operations devops-skills Скилл для работы с GPU-кластерами Kubernetes: планирование подов, MIG-разделение, автоскейлинг и мониторинг через DCGM. CX Codex +1 329установок cuda-profiling mohitmishra786 Ведёт агента по профилированию CUDA-приложений: таймлайн в Nsight Systems, метрики ядер в Nsight Compute, разбор roofline и узких мест. CX Codex +1 316установок

Из того же набора178

mcore-run-on-slurm Скилл помогает подготовить запуск распределённого обучения Megatron-LM на SLURM-кластере. Пригодится для настройки sbatch, мног узлового запуска и разбора сбоев по логам рангов. CX Codex +1 1 800установок nemo-rl-brev-etiquette Скилл задаёт агенту правила хранения файлов на инстансе Brev: код остаётся в репозитории, тяжёлые артефакты уезжают на /ephemeral. CX Codex +1 1 800установок mcore-linting-and-formatting Скилл настраивает проверку и форматирование кода в проекте Megatron-LM. Помогает исправить ошибки ruff, mypy и отсортировать импорты перед открытием PR. CX Codex +1 1 800установок nemo-mbridge-perf-tp-dp-comm-overlap Скилл ведёт по настройке перекрытия коммуникаций TP, DP и PP в Megatron-Bridge: какие ручки крутить, где смотреть код и как проверить результат. CX Codex +1 1 800установок nemo-mbridge-perf-megatron-fsdp Скилл помогает настроить Megatron FSDP в Megatron-Bridge для распределённого обучения вместо стандартного DDP, избежать падений по OOM и проверить чекпоинты. CX Codex +1 1 800установок nemo-rl-docs Скилл задаёт агенту правила оформления документации NeMo-RL: обновление docs/index.md и стиль докстрингов. Пригодится, когда вы пишете или правите доки. CX Codex +1 1 800установок nemo-mbridge-resiliency Скилл описывает настройку отказоустойчивости в Megatron Bridge: перезапуски, детекцию отстающих рангов, преемпцию и повторные прогоны. CX Codex +1 1 800установок nemo-mbridge-perf-hierarchical-context-parallel Скилл настраивает иерархический контекстный параллелизм в Megatron-Bridge. Помогает масштабировать обучение длинных последовательностей при нехватке KV-голов. CX Codex +1 1 800установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой