Glossary · Feed-forward and experts
Mixture of experts (MoE)
Also: MoEexpertsrouteractive parametersshared expertstop-k routingsparse model
Read it at the depth you need: one sentence · a paragraph · the math · in the models here
1In one sentence
An FFN split into many expert FFNs, of which a router picks a few per token: the model stores all of them but runs only the chosen ones, so total and active parameters differ.
2In a paragraph
In a mixture of experts the feed-forward layer of each block is replaced by E smaller FFNs (experts) and a router, a small linear layer that scores the experts for each token. Only the top k run. A model can then have hundreds of billions of parameters but spend the compute of a much smaller one on each token: that is the difference between total and active parameters. The catch is memory: every expert has to be loaded, because the next token may pick different ones. Many designs also keep one or more shared experts that every token uses, and some keep the first few layers dense.
3The math, shapes and parameters
g = softmax(Wr x) (or sigmoid) → keep the top k: S
MoE(x) = Σe∈S ge · FFNe(x) + FFNshared(x)
Parameters per MoE layer: the router E × d, plus E × 3 × d × fe for the experts (fe is moe_intermediate_size), plus any shared experts. Active per token:
active = total − (MoE layers) × (E − k) × 3·d·fe
Training needs the experts to be used evenly: an auxiliary loss, or (DeepSeek-V3) a per-expert bias added only for routing (e_score_correction_bias). Memory follows the total, speed follows the active count, which is why a 30B-A3B model needs the memory of a 30B but generates about as fast as a 3B.
Term by term on Notation Decoder, the sister site: Softmax · argmax and top-k
4In the 96 models on this site
The 30 mixtures of experts here. "Per token" counts routed experts plus shared ones; memory at 4-bit is for every expert.
| Model | Experts | Per token | Expert FFN | Total | Active | Active share | 4-bit weights |
|---|---|---|---|---|---|---|---|
| DeepSeek-V2-Lite | 64 | 6 + 2 | 1,408 | 15.7B | 2.66B | 16.9% | 7.9 GB |
| gpt-oss-20b | 32 | 4 | 2,880 | 20.9B | 4.19B | 20.0% | 10.5 GB |
| Gemma 4 26B-A4B | 128 | 8 | 704 | 25.2B | 3.82B | 15.1% | 12.6 GB |
| Qwen3 30B-A3B | 128 | 8 | 768 | 30.5B | 3.35B | 11.0% | 15.3 GB |
| Nemotron 3 Nano 30B-A3B | 128 | 6 + 1 | 1,856 | 31.6B | 3.58B | 11.3% | 15.8 GB |
| Qwen3.5 35B-A3B | 256 | 8 + 1 | 512 | 34.7B | 3.45B | 10.0% | 17.3 GB |
| Phi-3.5 MoE | 16 | 2 | 6,400 | 41.9B | 6.64B | 15.9% | 20.9 GB |
| Mixtral 8x7B | 8 | 2 | 14,336 | 46.7B | 12.9B | 27.6% | 23.4 GB |
| Qwen3-Next 80B-A3B | 512 | 10 + 1 | 512 | 79.7B | 3.87B | 4.9% | 39.8 GB |
| GLM-4.5-Air | 128 | 8 + 1 | 1,408 | 107B | 13.4B | 12.6% | 53.4 GB |
| Llama 4 Scout (17B-16E) | 16 | 1 + 1 | 8,192 | 108B | 17.2B | 15.9% | 53.9 GB |
| gpt-oss-120b | 128 | 4 | 2,880 | 117B | 5.71B | 4.9% | 58.4 GB |
| Nemotron 3 Super 120B-A12B | 512 | 22 + 1 | 2,688 | 121B | 12.8B | 10.6% | 60.3 GB |
| Qwen3.5 122B-A10B | 256 | 8 + 1 | 1,024 | 122B | 9.77B | 8.0% | 61.1 GB |
| Mixtral 8x22B | 8 | 2 | 16,384 | 141B | 39.2B | 27.8% | 70.3 GB |
| MiniMax M2 | 256 | 8 | 1,536 | 229B | 11B | 4.8% | 114 GB |
| Qwen3 235B-A22B | 128 | 8 | 1,536 | 235B | 22.2B | 9.4% | 118 GB |
| Inkling-Small | 256 | 6 + 2 | 2,048 | 264B | 12B | 4.6% | 132 GB |
| GLM-4.5 | 160 | 8 + 1 | 1,536 | 353B | 33.6B | 9.5% | 176 GB |
| Qwen3.5 397B-A17B | 512 | 10 + 1 | 1,024 | 396B | 17.3B | 4.4% | 198 GB |
| Llama 4 Maverick (17B-128E) | 128 | 1 + 1 | 8,192 | 401B | 17.2B | 4.3% | 200 GB |
| Nemotron 3 Ultra 550B-A55B | 512 | 22 + 1 | 5,120 | 549B | 56.1B | 10.2% | 275 GB |
| DeepSeek-V3 | 256 | 8 + 1 | 2,048 | 671B | 37.6B | 5.6% | 336 GB |
| DeepSeek-R1 | 256 | 8 + 1 | 2,048 | 671B | 37.6B | 5.6% | 336 GB |
| DeepSeek-V3.1 | 256 | 8 + 1 | 2,048 | 671B | 37.6B | 5.6% | 336 GB |
| DeepSeek-V3.2 | 256 | 8 + 1 | 2,048 | 672B | 38.4B | 5.7% | 336 GB |
| GLM-5.2 | 256 | 8 + 1 | 2,048 | 743B | 41.3B | 5.5% | 372 GB |
| Inkling | 256 | 6 + 2 | 3,072 | 947B | 41.1B | 4.3% | 474 GB |
| Ling-1T | 256 | 8 + 1 | 2,048 | 1000B | 51.1B | 5.1% | 500 GB |
| Kimi K2 | 384 | 8 + 1 | 2,048 | 1.03T | 32.9B | 3.2% | 513 GB |
Introduced in Shazeer et al., “Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer” (2017).
Related
Feed-forward network (FFN) · SwiGLU · Parameters · Quantization · every term