What Is Mixture of Experts in AI Models Explained?
What is mixture of experts in AI models explained simply? Imagine a hospital where every patient is seen by every doctor at once. That is how a dense AI model works: every part of the network processes every word.
Now imagine the same hospital with a receptionist who sends each patient to the two specialists best suited to their problem. That is mixture of experts, and it is how some of the biggest AI models in the world are built.
Mixture of experts, usually shortened to MoE, is a machine learning approach that divides an AI model into separate sub-networks called experts, each specialising in a subset of the input data. A small gating network, called the router, decides which experts handle each piece of input.
Only the chosen experts run; the rest stay idle, which keeps the cost of each word low even though the model as a whole is enormous.
Short answer: a mixture of experts model is a large AI model split into many specialist sub-networks, with a router that activates only the few experts each input needs.
That sparse activation lets the model be far bigger than a dense model at the same running cost, at the price of far more memory and a tricky training problem called load balancing.
This guide explains MoE without the heavy maths: what experts and routers do, how MoE trades memory for compute, which real models use it and why, and the problems that make it hard to train. By the end, the headline numbers on model sizes will make sense.
Key Takeaways
MoE splits a model into expert sub-networks and activates only a few per input, a trick called sparse activation.
The router is a small learned network that scores every expert for each token and picks the top few.
Mixtral 8x7B has 45 billion parameters in total but activates only about 13 billion per token.
MoE trades memory for compute: the model is cheaper to run but needs far more memory to store.
Load balancing is the hardest part of training MoE: if the router favours a few experts, the rest never learn.
What Mixture of Experts Actually Means
A mixture of experts model is a modular architecture that combines multiple specialised predictive sub-models, called experts, using a gating mechanism that assigns each input to the experts best suited to it.
In a language model, each expert is typically a small feed-forward network, and the router is a learned layer that decides the assignment for every token, which is the model’s unit of text, roughly a word or word fragment.
The key idea is conditional computation. In a dense transformer, every layer runs the same calculation for every input, so a bigger model always costs more to run. In an MoE model, each feed-forward layer is replaced by several expert layers plus a router, and only the selected experts run for each token.
The model can therefore be much larger in total parameters while keeping the computation per token roughly constant.
An everyday analogy that actually holds up
Think of a large company with many specialist departments. A dense model is a company where every department works on every task, which is thorough but ruinously expensive. An MoE model is a company with a smart dispatcher who reads each task and sends it to the two departments best equipped to handle it.
The company can employ far more specialists in total, because only a few work on any given task.
The Router: How Tokens Find Their Expert
The router is the heart of an MoE model, and it is simpler than it sounds. It is a small learned linear layer that takes a token’s hidden state and outputs a score for each expert.
The scores go through a softmax, the top few experts are selected, the token runs through only those experts, and their outputs are combined, weighted by the router’s scores. For Mixtral, the router picks 2 experts out of 8 for each token.
The router itself adds almost no compute: a single small matrix multiplication per token. But it is trained end to end with the rest of the model, through backpropagation, and it learns which experts specialise in which kinds of patterns without any explicit supervision.
Nobody tells an expert to handle French verbs or Python code; the router discovers the assignment that minimises the loss, and specialisation emerges from training.
What the router learns, and what it does not
MoE Versus Dense Models: The Memory-for-Compute Trade
The core trade-off of MoE is easy to state and easy to misunderstand: MoE gives you a bigger model for the same running cost, but you still pay the memory cost of the bigger model. A dense 7-billion-parameter model activates all 7 billion parameters for every token. A dense 70-billion model activates all 70 billion.
An MoE model with 45 billion parameters, like Mixtral 8x7B, activates only about 13 billion per token, so it runs like a much smaller model while storing a much larger one.
The memory bill always comes due
The catch is memory. All 45 billion parameters must be stored, loaded and kept available, even though only 13 billion are used per token. You cannot run Mixtral on a single consumer graphics card, because the card does not have enough memory for the full model, even though the computation per token would fit easily.
The computational savings only appear once the model is already loaded, and loading it is the expensive part.
That makes MoE a data-centre architecture, not a laptop architecture. If you run models locally on modest hardware, a dense 7-billion or 8-billion model is usually the better choice, because it fits in memory and runs fast.
MoE shines where memory is plentiful and many requests share one loaded model, which is exactly the situation inside a cloud provider’s data centre.
Which Real Models Use MoE and Why
Mixtral 8x7B, from Mistral, is the clearest public example of MoE. It has eight experts per layer, activates two per token, and totals 45 billion parameters with about 13 billion active.
It performs like a much larger dense model while costing far less to run, which is why it became a popular open model for developers who rent cloud compute by the token.
DeepSeek’s models use MoE more aggressively, with many more, smaller experts: DeepSeek-MoE routes each token to 6 experts out of 64, plus a few shared experts that every token uses.
That fine-grained design lets the model specialise more precisely, and it is one reason DeepSeek’s models have been competitive while costing less to train than their dense rivals. Qwen’s MoE models, DBRX and Grok-1 follow the same pattern with different expert counts.
What about GPT-4?
OpenAI has not confirmed GPT-4’s architecture, but multiple reports suggest it uses MoE, and the model’s behaviour is consistent with a mixture-of-experts design.
Google’s early MoE work is public, though: the GShard architecture scaled a translation model to 600 billion parameters across 2,048 experts, and the Switch Transformer reached a trillion parameters, both achieving better results than far smaller dense models at similar training cost.
Mixture of Experts Versus Dense Models Compared
The table below compares the two architectures on the numbers that decide real deployments. The Mixtral figures come from its published design: 45 billion total parameters, about 13 billion active per token.
Aspect
Dense model
Mixture of experts model
Parameters active per token
100% of the model
A small fraction, for example 2 of 8 experts
Total parameters
Equal to active parameters
Much larger than active parameters
Compute cost per token
Grows with model size
Grows slowly as experts are added
Memory needed
Fits the model size
Must store all experts, far larger
Training difficulty
Standard
Harder, load balancing is critical
Best for
Local use, small models
Data centres, frontier-scale models
Examples
Llama 3.2, small models
Mixtral 8x7B, DeepSeek-MoE, Switch Transformer
MoE Decision Framework
Use this framework when you are choosing a model to deploy or an API to build on, and let the deployment decide the architecture.
Check your memory budget first: if the full model does not fit, MoE is off the table no matter how good it is.
Compare cost per token, not total parameters: an MoE model with 45 billion parameters can cost less to run than a dense 70 billion one.
Ask where the model runs: data centres favour MoE, laptops and phones favour dense models.
Check the router design: more, smaller experts usually mean finer specialisation and better efficiency.
Watch for load-balancing problems in training reports, and prefer models whose training is well documented.
Test on your own workload: MoE advantages vary by task, and a benchmark is not a substitute for your data.
Frequently Asked Questions
What is mixture of experts in simple terms?
It is a way of building a very large AI model out of many smaller specialist networks, called experts, with a router that sends each word to the few experts best suited to it. Only those experts run, so the model is cheap to use despite being enormous in total.
The idea dates to a 1991 paper and powers models like Mixtral and DeepSeek today.
How does the router in an MoE model work?
The router is a small learned layer that scores every expert for each token and picks the top few, usually two. It is trained together with the rest of the model, so it learns which experts handle which kinds of input without being told.
Mixtral picks 2 experts out of 8 per token; DeepSeek-MoE picks 6 out of 64.
Is MoE better than a dense model?
It depends on the deployment. MoE is better when you want the largest capable model for a given running cost, because it scales capacity without scaling compute proportionally.
Dense models are better when memory is limited, such as on a laptop or phone, because the whole model must fit in memory either way, and a dense model wastes none of it.
What is expert collapse in MoE training?
Expert collapse happens when the router keeps sending tokens to a few favourite experts, so those experts improve while the neglected ones never learn. Training adds a load-balancing loss that penalises imbalance and forces the router to spread tokens evenly.
It is the hardest part of training MoE models, and getting it wrong wastes most of the model’s capacity.
Which AI models use mixture of experts?
Mixtral 8x7B from Mistral is the clearest public example, with 8 experts per layer and 2 active per token. DeepSeek’s models use finer-grained MoE with 64 experts, and Google’s GShard and Switch Transformer pioneered the approach at massive scale. GPT-4 is widely reported to use MoE, though OpenAI has not confirmed its architecture.
Can I run an MoE model on my own computer?
Usually not, unless you have a lot of memory. Mixtral 8x7B needs enough memory for all 45 billion parameters, even though only about 13 billion are active per token, which is beyond a single consumer graphics card.
Smaller dense models are the practical choice for local use; MoE models are best used through a cloud API.
Conclusion
Mixture of experts is the architecture that lets AI models keep growing without their running costs growing at the same rate. By splitting a model into specialists and activating only the few each input needs, MoE trades memory for compute, and that trade has shaped the biggest models of the last few years.
The router, the load-balancing problem and the memory bill are the three things to remember.
If you want to go deeper into how AI models work, our explainer on what multimodal AI is covers models that read images as well as text, our piece on why chatbots make things up explains the limits of what these models know,
Ayesha is the co-founder of occcy and the editor behind its entertainment and lifestyle coverage. She believes good writing should feel like a conversation with a smart friend, clear, warm, and genuinely helpful.