Mixture of Experts: Big Model, Small Bill, Hidden Catch
A mixture-of-experts model holds huge total parameters but uses a few per token. A router picks the experts. The catch: memory still pays for all of them.
On this page
When a lab says a new model has 100 billion parameters but “only 10 billion active”, that is mixture of experts. It is why some very large models run surprisingly fast, and also why running them locally is harder than the “active” number suggests.
How a dense layer differs from an MoE layer
In a standard transformer block, each token goes through attention and then a single feed-forward network (FFN). Every token uses every weight in that FFN.
In an MoE block, the single FFN is replaced by many parallel FFNs, the experts, and a small router:
token vector
|
[router] -> scores for each expert
|
pick top-k experts (k is small, often 1 or 2)
|
expert_i(token), expert_j(token) -> combine weighted by router scores
Attention layers are typically still shared across all tokens. Only the feed-forward part is sparse. The Switch Transformer work pushed this to an extreme by routing each token to a single expert, showing that capacity can scale a lot without scaling per-token compute.
Total versus active parameters
| What it counts | What it drives | |
|---|---|---|
| Total parameters | Every weight, all experts included | Memory to hold the model, storage, load time |
| Active parameters | Shared layers plus the chosen experts for one token | Compute (FLOPs) per token, and therefore speed and cost |
A model with 64 experts per layer and top-2 routing uses roughly 2/64 of the expert weights per token. That is where “big model, small bill” comes from.
Any token might need any expert, so all expert weights must be available: in GPU memory, or sharded across many devices. MoE saves operations per token, not memory. A model that is cheap to run per token can still be impossible to fit on one consumer GPU.
What makes MoE hard in practice
When MoE is worth it
- Serving at scale with ample memory: high throughput per dollar, because each token touches fewer weights.
- Wanting more knowledge capacity without proportionally more compute at each step.
And when it is not:
- Memory-constrained deployment, such as one consumer GPU, where total parameters decide whether it fits at all.
- Small batch, latency-critical use, where expert routing overhead and underused experts erode the savings.
Do
Compare MoE models on both numbers: total parameters for memory planning, active parameters for speed and cost estimates.
Don't
Read “10B active” as “fits like a 10B model”. Plan hardware from the total size, then enjoy the speed from the active size.
Takeaway
Mixture of experts decouples a model’s capacity from its per-token compute by activating only a few specialists at a time. It is a real efficiency win with a real cost: the full parameter set must live in memory, and routing makes training and serving harder. Always ask for both the total and the active parameter count.
Frequently asked questions
What is a mixture-of-experts model?
A transformer where some layers contain many parallel feed-forward networks, called experts, plus a small router. For each token the router selects a few experts to run, and the others stay idle. The model has high total capacity but compute per token matches a much smaller dense model.
What is the difference between total and active parameters?
Total parameters count every weight in the model, including all experts. Active parameters are the ones actually used to process a given token: the shared layers plus the chosen experts. Compute cost tracks active parameters, memory cost tracks total parameters.
Why does a mixture-of-experts model still need so much memory?
Any expert might be selected for the next token, so all expert weights must be loaded, in GPU memory or sharded across devices. You save floating-point operations per token, not storage. That makes MoE attractive for throughput but not a free pass for running huge models on small hardware.
What is a load-balancing loss?
A training term that penalizes the router for sending most tokens to a few favourite experts. Without it, routing can collapse, with a handful of experts doing all the work while the rest never learn. The auxiliary loss encourages a more even spread so all experts get trained.



/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.