Berk Bayri

Mixture of experts

A model design in which a large network is split into many sub-networks, called experts, and a router sends each token to only a few of them, so the model can be very large while using only part of it per step.

In a standard dense model, every part of the network does work for every token. A mixture of experts model replaces some of its layers with a set of parallel sub-networks, the experts, plus a small router. For each token, the router picks a few experts, often two, and only those run.

The result is a model with a very large total number of parameters but a much smaller number used per token. Mistral's Mixtral 8x7B, released in December 2023, is a well-documented example: it has about 46.7 billion parameters in total but uses about 12.9 billion for each token, according to Mistral's announcement. Several large models released since then use the same approach.

Mixtral of experts

Mistral AI · 2023-12-11

Why it matters

The design changes the economics of inference. Compute per token follows the active parameters, which can make a large model answer at the speed and cost of a much smaller one. Memory does not shrink the same way: all experts usually have to be loaded, so hosting a mixture of experts model yourself can still need large and expensive hardware. When comparing models or hosting options, ask for both numbers, total and active, and check which one a cost estimate is based on.

Common confusion

The "experts" are not specialists in law, medicine or finance. They are learned partitions of the network, and the router assigns tokens by patterns that rarely map onto human topics. Mixture of experts is also different from model routing, which sends whole requests to different models. One happens inside a single model, token by token. The other is a system choice made around models.