Mixture of Experts (MoE)
A sparse Transformer architecture that replaces dense FFN layers with multiple specialized Expert sub-networks, using a learned router to activate only Top-K experts per token for massive capacity at low FLOPs
Table of Contents
Structure Diagram
What is Mixture of Experts (MoE)?
A sparse Transformer architecture that replaces dense FFN layers with multiple specialized Expert sub-networks, using a learned router to activate only Top-K experts per token for massive capacity at low FLOPs. It is a core concept in Model Architecture within AI / ML.
Core Principles
Dense Transformers run every parameter for every token, making inference cost scale linearly with total size. Mixture of Experts (MoE) replaces dense FFN layers with many smaller Expert networks and uses a learned Router to activate only the Top-K experts per token.
This decouples model knowledge capacity (total parameters) from per-token compute (active parameters), delivering frontier quality at mid-sized model latency.
Practical Takeaways
- Low FLOPs, high VRAM footprint: Even though only a fraction of parameters run per token, all experts must reside in GPU VRAM, making memory capacity (and quantization) critical for MoE serving.
- Prevent router collapse with load balancing: Training relies on auxiliary balance losses or bias-adjusted routing so tokens distribute evenly across experts.
- Serve at scale with Expert Parallelism: Distributing experts across GPUs requires fast interconnects (NVLink) to handle All-to-All token dispatch.
Notable Examples
- DeepSeek-V3 / R1 (671B total, 37B active): Combines fine-grained routed experts with always-on shared experts for breakthrough cost efficiency.
- Mixtral, Qwen-MoE & Llama 4: Open-weights MoE families offering high tokens/sec alongside strong reasoning.
- Frontier API Models: Widely adopt sparse MoE backbones to serve massive world knowledge at interactive speeds.