Paper 10~7 min readShazeer et al. · 2017
Paper Breakdown

Mixture of Experts,
explained.

A hospital doesn't send every patient to every doctor — a receptionist points each one to the right specialist. This idea, applied to neural networks, is why a model can carry hundreds of billions of parameters yet stay cheap to run: for any given token, almost all of it stays asleep.

Video breakdown
The animated walkthrough is in production.
Read the full breakdown below in the meantime ↓
01

The dense-model tax

In a normal dense network, every parameter is used for every input. That's a hard tax: to make the model twice as capable you double the parameters, and now every single token costs twice as much compute. Capacity and cost are chained together, so scaling up gets expensive fast.

But intuitively, that's wasteful. A token about French poetry and a token about Python syntax probably don't need the same billions of parameters. What if different parts of the model handled different kinds of input?

02

The idea: many specialists, one receptionist

A Mixture of Experts replaces one big dense layer with many smaller sub-networks — the experts — plus a small gating network that acts as a receptionist. For each token, the gate picks just the top one or two experts to handle it. The rest sit idle for that token.

So the model can have dozens or hundreds of experts — an enormous total parameter count — while any single token only ever touches a couple of them. This is sparse activation: lots of capacity, little compute per token.

03

The gating network

The gate is itself learned. For each token it scores every expert, keeps the highest few (top-k routing, often k=1 or 2), and sends the token only to those. Their outputs are blended, weighted by the gate's scores. Over training, the gate discovers which experts are good at what and routes accordingly.

Top-2 routing for one token
token
gating network — picks top 2
Expert 1 ● Expert 2 Expert 3 ● Expert 4 Expert N

Only the two lit experts run. The other N−2 — the bulk of the model's parameters — cost nothing for this token.

04

The catch: load balancing

Left to its own devices, the gate cheats. It finds a few experts that work well early on and keeps sending everything to them, while most experts starve — never getting enough tokens to learn anything. A model with 128 experts that only ever uses 4 is mostly dead weight.

Worth knowing

The fix is an auxiliary load-balancing loss that penalizes lopsided routing and nudges the gate to spread tokens across all experts. Getting this balance right is one of the central engineering challenges of training MoE models.

05

Sparse vs dense

The original Sparsely-Gated MoE built layers with up to thousands of experts and billions of parameters, beating strong dense baselines at a fraction of the compute. The later Switch Transformer simplified routing to a single expert per token and scaled to over a trillion parameters — while keeping per-token cost roughly flat.

Total parametersActive per tokenCompute per token
Dense modelNAll NGrows with N
MoE modelMany × NOnly top-k experts~Constant

The chain between capacity and cost — the thing that made scaling expensive — is broken.

06

Why it still matters

Mixture of Experts is one of the main levers behind the frontier. Open models like Mixtral and DeepSeek are MoE, and several leading proprietary models are widely believed to be as well. When you hear a model has "hundreds of billions of parameters" but runs surprisingly cheaply, MoE is usually why — only a slice of it wakes up for each token.

The deeper idea — conditional computation, spending compute only where it's needed — is one of the most powerful tools we have for scaling models without scaling their bills. This paper is where it went from theory to practice.

Frequently asked

Quick answers

What is a Mixture of Experts?

A layer of many expert sub-networks plus a gating network that routes each token to just a few — so the model holds huge total capacity while computing only a small amount per token.

How does it stay fast while being big?

It breaks the link between parameters and per-token compute: many experts add capacity, but each token uses only the top one or two, so compute per token stays roughly constant.

What is the gating network?

A small learned router that scores all experts for each token, selects the top-k, sends the token there, and blends their outputs weighted by its scores.

What is load balancing?

An auxiliary loss that stops the gate from over-using a few experts and starving the rest, spreading tokens evenly so every expert learns something useful.

Which models use MoE?

From the 2017 Sparsely-Gated MoE and the Switch Transformer to modern frontier models — open ones like Mixtral and DeepSeek, and reportedly several leading proprietary models.

Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer · Shazeer, Mirhoseini, Maziarz, Davis, Le, Hinton, Dean · 2017 · read the original paper on arXiv → · Vibe Engines · 2026
Finished this one? 0 / 30 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns