TL;DR: Mixture of experts (MoE) in AI is a model design where many smaller sub-networks, called experts, sit inside each layer, and a small router picks only a few of them to process each token. That lets a model have a huge total number of parameters while using only a fraction of them for any single word, so it trains and runs faster than a dense model of the same size. The catch: all the experts still have to fit in memory, and MoE models can be trickier to train and fine-tune.
If you’ve read about models like Mixtral 8x7B or DeepSeek-V3, you’ve seen numbers like “47B total, 13B active.” That split is the signature of a mixture of experts. So what is mixture of experts in AI, and why have so many large language models adopted it? This guide explains it in plain English, with real examples and the trade-offs.
What is mixture of experts in AI?
A standard transformer model is “dense”: every parameter is used for every token it processes. A mixture-of-experts model swaps some of those dense layers for a set of parallel experts plus a gate, or router.
According to Hugging Face’s MoE explainer, an MoE layer in a transformer has two parts:
- Experts: a number of separate neural networks (for example, 8). In practice these are usually feed-forward networks, the part of a transformer layer that comes after attention.
- A router (gate network): a small learned network that decides which expert or experts each token is sent to. It’s trained at the same time as the rest of the model.
A simple analogy is a hospital reception desk sending each patient to one or two specialists instead of having every doctor see everyone. The building holds lots of expertise, but each visit only uses a little of it.
How routing works, step by step
- A token (a piece of text, see our guide to tokens and context windows) reaches an MoE layer.
- The router scores every expert for that token.
- It keeps only the top-k experts, often one or two, and ignores the rest.
- The chosen experts process the token, and their outputs are combined using the router’s weights.
- The result moves on to the next layer, where routing happens again.
Because experts that aren’t chosen don’t run, the model saves compute. This idea is called sparsity, or conditional computation.

Total vs active parameters, with real examples
The key number for an MoE model is how many parameters are active per token, not the total. Here are well-known examples, using figures published by the model makers or summarized by Hugging Face:
| Model | Total parameters | Active per token | Notes |
|---|---|---|---|
| Mixtral 8x7B (Mistral AI, 2023) | ~46.7B | ~12.9B | 8 experts per layer, 2 chosen per token (Mistral) |
| Switch Transformer (Google, 2021) | 1.6 trillion | A small fraction | Up to 2,048 experts; routes each token to just 1 expert |
| DeepSeek-V3 (DeepSeek, 2024) | 671B | 37B | Per the DeepSeek-V3 technical report |
Why isn’t Mixtral 8 × 7B = 56B? Hugging Face explains that only the feed-forward layers are split into experts; attention and other parts are shared. So the total is about 47B, and with two experts active the compute per token is closer to a 12B–13B dense model.
A short history of mixture of experts
- 1991: The paper “Adaptive Mixture of Local Experts” introduced the idea of separate expert networks with a gating network.
- 2017: Noam Shazeer and colleagues at Google (including Geoffrey Hinton and Jeff Dean) published “Outrageously Large Neural Networks,” scaling a sparsely gated MoE to 137 billion parameters.
- 2020: Google’s GShard pushed MoE transformers beyond 600 billion parameters.
- 2021–2022: Switch Transformers simplified routing to a single expert and, per the authors, reached a 4x pre-training speed-up over T5-XXL.
- 2023 onward: Open models such as Mixtral and later DeepSeek brought MoE into mainstream large language models.
Benefits of mixture of experts
- Cheaper training for the quality: Hugging Face notes that, for a fixed compute budget, an MoE can reach the quality of a dense model much faster during pre-training.
- Faster inference than a dense model of the same total size: only the chosen experts run, which helps AI inference costs.
- Room to scale: designers can add knowledge capacity (more experts) without a matching jump in per-token compute.
Drawbacks and trade-offs
Memory
Every expert must be loaded, even though few run at once. To serve Mixtral 8x7B you need enough VRAM for a roughly 47B-parameter model, per Hugging Face. That’s why quantization is popular for running MoE models locally.
Load balancing
Routers tend to favor a few experts, which then get trained more and chosen even more often. Training adds an auxiliary loss to spread tokens evenly, and many systems set an “expert capacity,” a cap on how many tokens one expert can take per batch.
Fine-tuning and infrastructure
Sparse models have historically been more prone to overfitting during fine-tuning, though instruction tuning has helped. Spreading experts across many GPUs also adds communication overhead.
MoE vs dense models: which is better?
| Factor | Dense model | Mixture of experts |
|---|---|---|
| Parameters used per token | All of them | Only the selected experts |
| Compute per token | Higher for the same total size | Lower for the same total size |
| Memory needed | Matches its size | Must hold every expert |
| Best fit | Low-VRAM, low-throughput setups | High-throughput serving across many machines |
Hugging Face sums it up: experts shine in high-throughput scenarios with many machines, while a dense model is often better when you have little VRAM. It also cautions that you can’t compare parameter counts directly between sparse and dense models, because they mean different things.
The bottom line
Mixture of experts is a way to make AI models bigger without making every answer proportionally more expensive. A router sends each token to a few specialist sub-networks, so a model can hold hundreds of billions of parameters while only using tens of billions at a time. When you see “total” and “active” parameters on a model card, you now know why.



