Parameters you have without paying for them
- : one expert, usually a feed-forward block.
- : the gate's weight for that expert.
- : the selected top- experts.
A dense layer uses every parameter for every token. A mixture layer has many experts and uses a few per token.
The router is one small matrix producing a score per expert, from which the highest are kept and renormalised.
That ratio is the entire proposition: capacity scales with the number of experts, and compute scales with .
Load balancing, or it collapses
- : the fraction of tokens routed to expert .
- : the mean gate probability for it.
Left alone, the router sends almost everything to a few experts. Those get more training, become better, and attract more traffic still.
The auxiliary loss is minimised when the load is uniform, and it is added to the training objective with a small coefficient.
Each expert also has a fixed buffer per batch.
Tokens beyond it are dropped and pass through the residual connection unprocessed, which bounds the memory at the cost of occasionally skipping a layer.
One token, in order
- The token's hidden state reaches the mixture layer.
- The router scores every expert and keeps the top .
- The token is dispatched to those experts, across devices if they are sharded.
- Each expert computes its output.
- The outputs are combined by the gate weights and added back into the residual stream.
Steps three and five are a network operation in a distributed setup, and they are usually the bottleneck rather than the arithmetic.
What it costs that dense models do not
Every expert must be resident even though only a fraction runs, so a mixture model needs the memory of its full size while using the compute of its active size.
That is the honest trade: it is a way of spending memory and bandwidth to buy quality at fixed compute, not a free lunch.
Training is also less stable. The router is discrete, the gradient reaches only the selected experts, and small changes in routing early on can decide which experts ever become useful.
Why it is now standard
Most current frontier models are mixtures, because inference cost is set by the active parameters and quality tracks the total.
Fine-tuning them is harder, since a small dataset routes to a subset of experts and leaves the rest untouched, which is a real problem for anyone adapting one rather than training it.