perf-moe-long-context

Guide training of large MoE models with 16K to 256K token contexts.

852|445|Updated May 21, 2025
One-click install
npx skills add https://github.com/NVIDIA-NeMo/Megatron-Bridge --skill perf-moe-long-context
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-moe-long-context
Source: https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/skills/perf-moe-long-context
Command: npx skills add https://github.com/NVIDIA-NeMo/Megatron-Bridge --skill perf-moe-long-context

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance for efficient training of MoE models with extensive context lengths, addressing memory constraints and throughput challenges.

Core Features & Use Cases

  • Long-Sequence Training Optimization: Offers strategies for scaling MoE models to sequences up to 256K tokens, including CP sizing and recompute methods.
  • Configuration Guidance: Details specific dispatcher choices, precision settings, and CUDA graph policies for big models.
  • Use Case: Developers training long-context MoE models can implement these best practices to improve performance and resource utilization, such as handling 128K token sequences in NLP tasks.

Quick Start

Refer to the recommended configuration patterns and scaling rules in the documentation to set up your long-context MoE training environment effectively.

Frequently Asked Questions about perf-moe-long-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize memory usage when training long-context MoE models?

Optimize memory for long-context Mixture of Experts training by applying targeted CP sizing and recompute strategies. This reduces memory constraints for large-scale models, improving resource utilization during deep learning training on extensive context lengths.

What is the best way to scale MoE training for 128K token sequences?

Scaling Mixture of Experts training for 128K token sequences requires specific dispatcher choices and CUDA graph policies. Implementing these configuration patterns ensures high throughput and efficient memory management for large NLP models.

Can I train a 256K context length MoE model without running out of memory?

Training 256K context length Mixture of Experts models is possible by applying strict memory management and optimal parallelism configurations. These scaling strategies directly address memory usage and throughput challenges for very long sequence lengths.

Which precision settings should I use for large MoE models with long context?

Specific precision settings are recommended for large Mixture of Experts models to balance training efficiency and numerical stability. Configuring these alongside appropriate dispatcher choices and CUDA graph policies maximizes throughput for long-sequence training.

When do I need to adjust context parallelism sizing for MoE training?

Adjust context parallelism sizing for Mixture of Experts training when scaling sequence lengths from 16K to 256K tokens. This recompute method manages memory constraints and maintains throughput across large-scale deep learning models.