Skip to content

MoE Training Guide

Guides an agent through training Mixture of Experts models with DeepSpeed or HuggingFace.

Stars
14,195
Licence
MIT
Files
4 files

What it does

Once installed, the agent can advise on and write code for Mixture of Experts (MoE) models, a design where a network holds many specialist sub-networks but only activates a few per input, so it can grow in capacity without a matching rise in compute. The agent can explain routing (choosing which experts handle each token), load balancing, expert parallelism, and inference tradeoffs, and can produce example PyTorch code and DeepSpeed training commands. The skill's reference files cover architectures, training and inference details.

Great for

  • ML engineers planning or running large-model training under a limited compute budget
  • Researchers exploring sparse architectures such as Mixtral or DeepSeek-V3 style designs
  • Developers who want a starting-point MoE layer and DeepSpeed configuration to adapt

Skip it if

  • People who just want to use an existing model via an API, since this covers building and training models, not using them (no value added)
  • Production training runs copied without review, because the example commands and configs are illustrative and need tuning for hardware, data and cost; the claimed 5x cost reduction is a general claim, not a guarantee
  • Users without GPU infrastructure, since training MoE models at scale requires substantial hardware

Try asking

  • “Write a PyTorch top-2 routed MoE layer with 8 experts for my transformer.”
  • “Help me set up a DeepSpeed config to train a 128-expert MoE with expert parallelism.”
  • “Explain how load balancing loss and router z-loss differ and when to use each.”
  • “What inference optimizations should I consider for a Mixtral-style model?”
Step-by-step guide: how to use MoE Training GuideInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the MIT licence and an attribution note.

    moe-training.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip moe-training.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip moe-training.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • State your hardware (GPU count and memory) and model size so the agent can suggest realistic expert counts and parallelism settings.
  • Ask the agent to verify commands against current DeepSpeed and Megatron-DeepSpeed documentation, since flags and versions change.
  • Treat the code snippets as reference implementations and test them on small data before scaling up.

What's inside

  • references/architectures.md
  • references/inference.md
  • references/training.md
  • SKILL.md

Redistributed unmodified from Orchestra-Research/AI-Research-SKILLs under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.