GPT-4, Mixtral, and DeepSeek all use Mixture of Experts. Explain how MoE works mechanically — what it replaces in the transformer, how routing works, why it enables larger models without proportional compute cost, and what the practical challenges are in training and serving.
formulate your answer, then —
tldr
MoE replaces dense FFN layers with N expert FFNs; a learned router sends each token to top-K experts (K=2 typical). Total parameters scale with N but FLOPs/token stay constant. Expert collapse is the primary training failure — fixed with auxiliary load-balancing loss. Full model must fit in memory even though only K/N experts fire per token. Expert parallelism distributes experts across GPUs at the cost of all-to-all communication.
follow-up
- How does expert parallelism combine with tensor and pipeline parallelism in large-scale MoE serving?
- What is the "token dropping" problem in expert-choice routing and how does it affect training quality?
- Why might MoE models underperform dense models at small scale but outperform them at large scale?