All glossary terms

Model architecture

Mixture of experts

A model built from many expert blocks, only a few of which run per token. Memory rent stays large, compute per token stays small, and a router picks experts.

A dense model sends every token through every parameter. A mixture of experts replaces one large feed-forward block per layer with several smaller ones, and a small gate picks the two or three that look most relevant. Total parameters - and therefore what has to sit in memory - grow with the number of experts, but compute per token only grows with the few that actually activate.

That split is the term to know cold. FLOPs follow active parameters, memory follows resident parameters. A mixture with four times more parameters than it activates computes like a small model while occupying memory like a big one, which is a deliberate trade: capacity bought with expert count, latency paid in routing hardware rather than raw size.

The routing creates second-order effects that interviews like. Expert load balancing controls the real speedup, because one overloaded expert serializes the whole layer. Memory is the real bill: resident parameters of a large MoE need many GPUs even though each token only touches a few. And training is harder - the router can collapse onto a few experts unless load-balancing losses keep the rest alive.

For serving economics, the pitch is capacity per FLOP: you hold a very knowledgeable model in memory and pay decode only for its active slice. Whether that beats a smaller dense model depends on card prices, memory per card and whether your workload actually benefits from the extra capacity the experts encode.

A worked example

A synthetic mixture of experts: 10B shared parameters, 32 layers, 8 experts of 3B parameters each per layer, top-2 routing, weights held in 16-bit.

  1. Resident parameters: 10B + 32 x 8 x 3B = 778B.
  2. Active per token: 10B + 32 x 2 x 3B = 202B, which is about 26 percent of resident.
  3. Weight memory in 16-bit: 778B x 2 bytes = 1,556 GB, about 20 80 GB cards just to hold the weights.
  4. Compute per token: 202B parameters x 2 FLOPs each = 404 GFLOPs per token, the work of a dense 202B model.

Memory follows total parameters, FLOPs follow active ones: this mixture computes like a 202B dense model while needing the memory of a 778B one.

Where this shows up

Test yourself

Related terms