nvidia-nemo/megatron-bridge · Archived

nemo-mbridge-perf-moe-vlm-training

Practical guidance for training MoE VLMs in Megatron Bridge. Compares FSDP and 3D-parallel approaches, using rounded lessons from Qwen3-VL, Qwen3-Next, and other multimodal experiments.

First seen Jul 22, 2026

Installation

$ npx skills add nvidia-nemo/megatron-bridge --skill nemo-mbridge-perf-moe-vlm-training

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from nvidia-nemo/megatron-bridge · top by installs.

npx skills add nvidia-nemo/megatron-bridge

Browse all from nvidia-nemo/megatron-bridge

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 822
License LICENSE
Default branch main
Open issues 267
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 8,338 B
  • docs SUMMARY.md 227 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

MoE VLM Training

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

FSDP vs 3D Parallel

Approach Strength Best fit
FSDP Simplest path to a working multimodal run first bring-up, memory-first tuning, awkward PP boundaries
3D parallel Higher ceiling after tuning stable models with a clean PP layout and time for deeper sweeps

For MoE VLMs, the practical workflow is usually:

  1. get the first reliable run with FSDP
  2. stabilize real-data input, recompute, and memory behavior
  3. move to 3D parallel only if the throughput headroom is worth the extra work

Rounded Findings From Recent VLM Runs

Qwen3-VL class models

The main patterns were consistent across the tracker:

  • FSDP on GB200-class systems can already reach healthy high-teens utilization

with a comparatively simple setup

  • B200 FSDP runs are viable, but more sensitive to recompute choice and frozen

vision settings

  • 3D parallel can recover to a similar or better operating point, but only after

tuning MBS, recompute, and the real vision path together

Real data vs mock data

Mock-data VLM runs are not trustworthy performance proxies. In the experiments, image-free mock runs looked closer to "roughly twice as fast" than "slightly optimistic" when compared with real multimodal input.

Use real or realistic image payloads before drawing any conclusion about VLM throughput.

Smaller multimodal MoE runs

The smaller Qwen3.5-style multimodal experiments reinforce the same lessons:

  • HybridEP is a solid default on GB200
  • TE-scoped CUDA graphs help once the training loop is stable
  • larger MBS can pay off, but only if the vision encoder does not become the

next bottleneck

Decision Guide

Choose FSDP when

  • you are bringing up a new VLM for the first time
  • the model has awkward stage boundaries across embedding, vision, and decoder
  • memory fit matters more than absolute throughput
  • you may freeze the vision stack during decoder-focused tuning

Choose 3D parallel when

  • the model is already stable under FSDP
  • the PP layout is clear and repeatable
  • you can sweep MBS, recompute, and CUDA-graph scope together
  • the goal is best steady-state throughput, not easiest bring-up

Key Tuning Knobs

  1. Keep TP as small as memory permits: prefer activation recompute over

increasing TP when activations, rather than model weights, are the reason the run does not fit. Lower TP keeps GEMMs larger and avoids unnecessary TP communication. TP may still be required for dense weights, the vocabulary head, or a workable PP boundary; verify the actual memory limiter before removing it.

  1. Make EP large enough to shard expert weights effectively: for an MoE

model whose expert count is divisible by the rank count, start with EP8 on an 8-GPU allocation and EP32 on a 32-GPU allocation. Treat these as starting points, not unconditional rules: EP does not shard dense, vision, embedding, or output-layer weights, and the final choice must respect PP/DP rank layout and the hardware topology.

  1. Prefer selective activation recompute after fit is established: use full

recompute to get a memory-constrained configuration running, then replace it with the narrowest supported selective modules. This usually recovers more throughput than adding TP solely for activation memory.

Qwen3.5/Qwen3.6 requires special care. Megatron-Core supports the targeted gdnnormout recompute module, but that does not checkpoint the complete GDN recurrence. If coreattn, gdnnormout, and moeact still do not provide enough headroom—commonly with smaller EP such as EP8—retain full recompute rather than claiming unsupported GDN selective coverage. Larger EP, such as EP32, can reduce expert-weight pressure enough to retry the selective policy.

  1. Prefer HybridEP, then measure against AllToAll: HybridEP is the default

candidate when the topology supports it. Within one 8-GPU NVLink domain in BF16, HybridEP and conventional AllToAll can be close; benchmark both with identical work instead of assuming HybridEP must win.

  1. Freeze the vision stack when appropriate: if the work is decoder-focused,

freezing the vision side often gives a small but real throughput gain and reduces memory pressure.

  1. Sweep MBS aggressively: VLMs are more MBS-sensitive than text-only MoE

runs because the vision path changes the compute-to-overhead balance.

  1. Match CUDA-graph scope to the workload: attn moerouter moepreprocess

is the safer MoE default, while narrower scopes can still be useful for controlled experiments.

  1. Use ETP only when EP alone is insufficient: it can unlock a layout, but

it also introduces more communication and more tuning surface.

Fit-First Tuning Order

Use this order so each measurement answers one question:

  1. Select the largest topology-compatible EP that usefully shards the experts.
  2. Minimize TP while retaining enough memory for non-expert weights.
  3. Start with full recompute if needed to obtain a stable real-data run.
  4. Replace full recompute with supported selective modules and remeasure memory.
  5. Inspect per-rank peak allocated and reserved memory in the experiment logger.
  6. If there is headroom, increase MBS; if TP was used for activation pressure,

lower TP and remeasure. Change one of these two controls at a time.

  1. Compare HybridEP with AllToAll on the same topology and precision.
  2. Add communication overlap and CUDA graphs only after the memory and batch

operating point is stable.

At every step, keep the dataset, sequence/image shapes, global batch, precision, trainable parameters, and useful-work accounting fixed. A configuration that fits is the baseline; it is not automatically the performance recipe.

Representative Config Families

FSDP-first GB200 path

TP=1  CP=1  PP=1
EP sized to the expert topology, often large
Dispatcher: HybridEP on GB200-class systems
Recompute: start with full, then relax toward selective recompute

3D-parallel GB200 path

TP=1  CP=1  PP=1 or modest PP
EP and ETP sized to the expert topology
Dispatcher: HybridEP
CUDA Graph: start narrow, then widen only after the real-data path is stable

Compatibility

Feature FSDP 3D parallel
HybridEP on GB200 strong default strong default once topology is stable
CUDA graphs useful after bring-up useful, but more scope-sensitive
Freeze vision natural fit possible, but less often used as the headline perf path
Selective recompute recommended recommended

Pitfalls

  1. Mock multimodal data is misleading: it can make the decoder look much

healthier than the real end-to-end VLM path.

  1. The vision encoder can dominate unexpectedly: profile encoder, projector,

and decoder separately before attributing everything to the dispatcher.

  1. Do not compare FSDP and 3D-parallel runs with different effective work:

normalize by useful tokens and workload shape, not only by step time.

  1. ETP is not free: use it as a fit or topology tool, not as the default.
  1. Recompute and CUDA-graph choices are coupled: the setting that gets the

model to fit is often not the setting that gives the best steady-state speed.

  1. Qwen3.5 GDN recompute coverage is easy to overstate: gdnnormout

checkpoints the normalization/output portion, not the full GDN recurrence. Confirm the supported module names in the pinned Megatron-Core before replacing full recompute.

  1. High EP does not solve every memory problem: it reduces expert-weight

pressure but does not shard the vision encoder, embeddings, dense attention, or output head.