Explainer
Mixture of experts
A model whose layers hold many expert blocks but run only a few for each token, so it needs the memory of its full size while doing much less work per token.
In a mixture of experts, or MoE, some layers contain several parallel blocks called experts, and a small router picks a few for each token. Every expert must be stored, because the next token may need any of them; only the chosen ones do arithmetic. The Mixtral paper gives both numbers for its model: “each token has access to 47B parameters, but only uses 13B active parameters during inference.”
Read two numbers on a model card:
- Total parameters set the memory for the weights. Mixtral's 47 billion at 16 bits need about 94 GB before any working space.
- Active parameters set much of the work per token, and so much of the speed. OpenAI's gpt-oss-120b card lists “117B parameters with 5.1B active parameters”.
Names can mislead. Mixtral 8x7B is not 56 billion parameters, because its experts share the attention layers (Hugging Face's guide). An MoE is called a sparse model because most of it sits idle for each token. That is not sparse attention, which limits which earlier tokens each token looks at, and it is not a panel of judges, where several whole models each answer.
Going deeper
Active parameters do not set all of the speed: attention over a long context, the router and moving data still take time. The experts are not subject specialists either; Hugging Face reports a study in which experts trained on many languages did not divide by language. Very large MoE models are served with expert parallelism, which places different experts on different GPUs (vLLM).
In the long read: Count the space for the weights. Then read What a reply costs.
Read next: What a reply costs