perf-moe-optimization-workflow

Profile MoE training bottlenecks and apply optimization phases in Megatron Bridge.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill perf-moe-optimization-workflow-yo-steven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-moe-optimization-workflow
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/Megatron-Bridge/perf-moe-optimization-workflow
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill perf-moe-optimization-workflow-yo-steven

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you systematically improve Mixture-of-Experts (MoE) training throughput in Megatron Bridge by identifying which bottleneck (memory, communication, compute/host overhead) is limiting progress and applying the right optimization order rather than trying random tweaks.

Core Features & Use Cases

It provides a structured, paper-aligned workflow based on the Three Walls framework, covering how to make the run memory-feasible, choose parallelism for scale (including Parallel Folding), and profile to pinpoint the dominant bottleneck. It also includes practical guidance for dispatcher choice and overlap, an FP8 recipe decision framework, and CUDA-graphs bring-up strategies specific to MoE (including TE-scoped graph recommendations).

Use it when you are running a full MoE throughput tuning sweep, or when diagnosing a MoE throughput regression after a commit or configuration change—especially when you suspect that memory pressure, all-to-all/collective traffic, or host/launch overhead is the real limiter.

Quick Start

Follow Phase 1 to ensure the run is memory-feasible, then apply Phase 2 parallelism/Parallel Folding, and finish by profiling to target the dominant wall with dispatcher, overlap, FP8, and CUDA-graphs adjustments as appropriate.

Frequently Asked Questions about perf-moe-optimization-workflow

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

FAQPage Schema
How do I optimize MoE training throughput in Megatron Core?

To optimize MoE training throughput, follow a structured workflow that ensures memory feasibility, selects scale-oriented parallelism, and profiles to target the dominant bottleneck with dispatcher, overlap, FP8, and CUDA-graph adjustments.

What is the best way to diagnose a MoE throughput regression after changing parallelism?

Diagnose a MoE throughput regression by profiling to pinpoint the dominant bottleneck, checking if memory pressure, all-to-all/collective traffic, or host/launch overhead is the real limiter rather than applying random tweaks.

How does Parallel Folding help with MoE performance tuning?

Parallel Folding helps MoE performance tuning by providing scale-oriented parallelism selection during the second phase of the optimization workflow, ensuring the run configuration supports efficient throughput before profiling bottlenecks.

When should I apply FP8 recipe selection and CUDA-graphs bring-up for MoE training?

Apply FP8 recipe selection and CUDA-graphs bring-up during the final optimization phase after confirming memory feasibility and parallelism, specifically targeting the dominant compute or host overhead bottleneck with recompute compatibility constraints.

Does this MoE optimization workflow work with Megatron Bridge environments?

Yes, the MoE optimization workflow is designed for Megatron Bridge environments, applying the Three Walls framework to systematically target memory, communication, and compute bottlenecks for full throughput tuning sweeps.

Why is my MoE training throughput limited despite configuration changes?

MoE training throughput is often limited because the dominant bottleneck—memory pressure, all-to-all/collective traffic, or host/launch overhead—has not been correctly identified and addressed through systematic profiling rather than random tweaks.