Nemo Mbridge Perf Moe Long Context
NVIDIAOfficialPublished by NVIDIA
- Skill
- Guidelines
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides architectural patterns and configuration strategies for training MoE models at long sequence lengths. It synthesizes findings from various model experiments to help practitioners manage memory constraints, throughput, and parallelism trade-offs when scaling beyond standard sequence lengths.
What it does
- Provides rules of thumb for context parallelism (CP) sizing based on sequence length.
- Outlines strategies for selective activation recomputation to manage memory.
- Offers configuration templates for different hardware and model scales.
- Details considerations for dispatcher choices and pipeline layouts.
- Identifies common pitfalls in long-context training, such as CUDA graph limitations.
- Suggests methods for balancing parallelism dimensions like TP, EP, and PP.
When to use it
- When training MoE models at long sequence lengths.
- When troubleshooting out-of-memory (OOM) errors in long-context MoE runs.
- When investigating throughput degradation during long-context scaling.
- When determining appropriate parallelism layouts for large-scale model training.
Advantages
- Provides empirically derived scaling patterns for complex MoE architectures.
- Helps balance memory usage against GPU-count feasibility.
- Offers actionable advice on recompute strategies to optimize memory footprint.
- Clarifies the interaction between different parallelism dimensions.
Usage examples
- “How should I determine the initial CP size for a 128k sequence length MoE model?”
- The skill suggests starting with a CP value derived from the sequence length divided by 4096, then rounding to a practical power-of-two layout.
- “What recompute strategy is recommended for long-context MoE training?”
- It advises preferring selective recompute of modules like up_proj, norm, moe, or mlp before considering full recompute.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/nemo-mbridge-perf-moe-long-context/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip nemo-mbridge-perf-moe-long-context.zip -d .agents/skills
Documentation by NVIDIA
MoE Long-Context Training
Stable docs: @docs/training/moe-optimization.md Card: @skills/nemo-mbridge-perf-moe-long-context/card.yaml
What Changes At Long Context
Once sequence length moves well past the 4K-class regime, attention memory and activation residency become the dominant constraints. For MoE models, that usually means you need some combination of:
context parallelism
selective recompute
lower precision
CPU offload for optimizer state
a dispatcher and PP layout that do not waste the smaller remaining DP budget
Rounded Scaling Patterns
DSV3 on H100
The DSV3 long-context runs show a stable pattern:
selective recompute works better than full recompute once you move past the shortest contexts
throughput stays in a fairly narrow band from mid-length through very long contexts if CP is increased appropriately
the trade shifts from "memory fit" to "GPU-count feasibility" as CP grows
In other words, long context does not immediately collapse utilization if the layout is chosen well, but it does consume the DP budget very quickly.
Qwen3-Next on GB200
Qwen3-Next behaves more like a memory-sensitive medium-scale model:
8K and 32K remain practical with moderate CP
64K is possible, but the throughput drop is noticeable and memory becomes much tighter
pipeline layout and grouped-GEMM improvements matter almost as much as CP
Qwen3 235B on GB200
Qwen3 235B shows that long context can still be efficient on NVL72 systems when TP, CP, and HybridEP are coordinated. The best 128K-class configurations are not just "fit-only" recipes; they can remain highly efficient if routing, parallelism, and recompute are balanced.
CP Sizing Rules Of Thumb
Start from a 4K shard target: a good first guess is
CP ~= seq_len / 4096, then round to a practical power-of-two layout.Keep DP alive if possible: long-context scaling becomes brittle once CP, EP, TP, and PP together squeeze DP down to the floor.
Prefer selective recompute: recompute modules such as
up_proj,norm,moe,moe_act, ormlpbefore reaching for full recompute.Avoid SDPA-heavy recompute at very long context: recomputing attention internals can add a lot of work for less memory benefit than recomputing smaller MoE and MLP-side modules.
Use TP as another lever on NVL72 systems: GB200 and GB300 runs can sometimes trade some CP for TP while still staying efficient.
Assume GBS will need to shrink: as CP rises and DP falls, you may need to reduce global batch size or accept higher GA.
Representative Config Families
DSV3 at 128K on H100
TP=1 CP=32 EP=32 PP=8 VPP=4
Precision: FP8-class
Dispatcher: DeepEP
Recompute: up_proj, norm, moe, mlp
Extra memory help: optimizer CPU offloadDSV3 at 256K on H100
TP=1 CP=64 EP=32 PP=8 EDP=2 VPP=4
Precision: FP8-class
Dispatcher: DeepEP
Recompute: up_proj, norm, moe, mlp
Extra memory help: optimizer CPU offloadQwen3 235B at 128K on GB200
TP=4 CP=4 EP=32 PP=4 VPP=12
Precision: BF16 or MXFP8
Dispatcher: HybridEP
Recompute: moe_act, norm
CUDA Graph: attn + moe_router + moe_preprocessRecompute And CUDA Graph Guidance
For long-context MoE training:
start with selective recompute
add CUDA graphs only after the shapes and routing path are stable
keep sequence length and MBS fixed when using CUDA graphs
if the run depends on highly dynamic batches, prefer eager execution
Useful references:
@docs/training/activation-recomputation.md
@skills/nemo-mbridge-perf-cuda-graphs/SKILL.md
Pitfalls
CP does not replace EP or PP: it adds another dimension; it does not make the others disappear.
A good 4K baseline can still be a bad long-context baseline: routing mode, recompute choice, and offload strategy often need to change.
GPU-count feasibility becomes the real constraint: very long context can look fine in a single recipe, then become impossible once EP and PP are added honestly across the full model.
CUDA graphs need static shapes: variable-length batches and opportunistic padding strategies can silently break the path.
Container and kernel support matters more at 128K+: long-context paths tend to rely on newer kernels and bug fixes than short-context bring-up does.
Files
- ATTRIBUTION.mdAdded by AutoGineer867 B
- BENCHMARK.md4.3 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md4.8 KiB
- card.yaml3.4 KiB
- evals/evals.json1.6 KiB
- skill-card.md3.8 KiB
- skill.oms.sig4.7 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "nemo-mbridge-perf-moe-long-context", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: fce3cca4170be75e82c64920654d56ee2811b005
Published by: NVIDIA (https://github.com/NVIDIA)
Publisher: NVIDIA (https://github.com/NVIDIA)
Licence: Apache License 2.0 (https://spdx.org/licenses/Apache-2.0.html)
Licence evidence: declared in the frontmatter ("license: Apache-2.0")
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE-APACHE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- NVIDIA
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/nemo-mbridge-perf-moe-long-context · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nemo-mbridge-perf-moe-long-context.zip