Topic 8 of 20 · 21 words
Mixture of Experts (MoE)
How Mixture-of-Experts (MoE) models keep massive total knowledge while activating only a small fraction of parameters per token.
The 21 words, in learning order
Start at 1. Each word builds on the ones before it.
- Mixture of Experts (MoE)Mixture of Experts is a model design with many smaller "expert" networks, where a router picks only a few experts to handle each token.
- ExpertIn a Mixture of Experts model, an expert is one of several smaller feed-forward networks that can process a token.
- RouterA router is the small network in a Mixture of Experts layer that decides which experts each token should go to.
- RoutingRouting is the process of sending each token to the right experts in a Mixture of Experts model.
- Sparse ActivationSparse activation means only a small part of a model is switched on for each input.
- Active ParametersActive parameters are the parameters a model actually uses to process each token.
- Total ParametersTotal parameters are every parameter a model has, whether or not they are used for each token.
- Expert SelectionExpert selection is choosing which specific experts will process a token.
- Top-K RoutingTop-K routing sends each token to the K experts with the highest router scores.
- Load BalancingLoad balancing in MoE makes sure work is spread fairly evenly across experts, so none are overloaded or wasted.
- Expert CapacityExpert capacity is the maximum number of tokens one expert can handle in a batch.
- Routing CollapseRouting collapse is when an MoE router ends up sending almost all tokens to just a few experts, wasting the rest.
- Shared ExpertsShared experts are experts that process every token, alongside the routed experts that are picked per token.
- Routed ExpertsRouted experts are the experts that are only used when the router selects them for a token.
- Auxiliary LossAn auxiliary loss is an extra training penalty added to encourage a side goal, such as balancing work across experts.
- Expert ParallelismExpert parallelism spreads the experts of an MoE model across different GPUs, so each GPU holds and runs some of the experts.
- Expert CommunicationExpert communication is the data sent between GPUs when tokens travel to the experts they need and back.
- Dense vs Sparse ArchitectureDense vs sparse architecture compares models that use all parameters for every token with models that only use some.
- Conditional ComputationConditional computation means the model decides which parts of itself to use based on the input.
- MoE LayerAn MoE layer is a layer that replaces a normal feed-forward network with a router and a group of experts.
- Fine-Grained ExpertsFine-grained experts are many small experts instead of a few big ones, allowing more precise specialization.
How Mixture of Experts (MoE) fits together
In a traditional dense model, every single parameter wakes up for every single token—so making a model 8x bigger makes inference roughly 8x heavier. Mixture of Experts (MoE) breaks that trade-off by splitting feed-forward layers into specialized 'expert' sub-networks and training a lightweight router to pick only the top few experts for each token.
That distinction between total parameters (what must sit in memory) and active parameters (what actually computes each token) is why modern frontier models can hold hundreds of billions of weights while streaming answers fast.