Volume VII · A Committee of Specialists
More Experts, Not Bigger Ones
Eight experts and a token's choice of two gives twenty-eight possible committees. Cut the same budget into sixty-four smaller experts, let each token pick eight, and the number of possible committees passes four billion. Nothing was added to the parameter count or to the arithmetic. The menu simply got finer, and the finer menu is what the open 2026 flagships in this course order from.
The mental model
Slice the experts thinner and the router can compose a precise team for each token. Keep a few experts outside the vote, always on, to hold what every token needs. Then balance the load with a thermostat on the routing scores instead of a penalty on the loss.
Two diagnoses
The previous lecture ended on two weaknesses of the Mixtral layout, and the DeepSeekMoE paper of January 2024 gives them names. Knowledge hybridity: with only a handful of experts, each one has to cover many unrelated kinds of token, because every token has to be handled by someone and there are few someones. An expert that serves code, French and chemistry at once is a generalist, whatever the router's job description says. Knowledge redundancy: the knowledge every token needs, such as common words and basic syntax, has no home of its own, so several experts learn it separately and the model spends capacity on copies.
The authors answer each with one change. Against hybridity: more experts, each smaller, with more of them active. Against redundancy: set a few experts aside that every token always visits. Both changes are free in parameters and in arithmetic, and the following two sections show why.
Fine-grained segmentation
Take a layer with E experts, each a feed-forward network of hidden width h, with k active per token. Choose a factor m and split every expert into m pieces of width h/m. The layer now has mE experts, and the router activates mk of them.
The stored weights are unchanged and so is the arithmetic per token. What changes is the number of teams the router can form. The paper's own example is 16 experts with two active, which allows C(16, 2) = 120 pairings, against 64 experts with eight active after splitting each into four, which allows C(64, 8) = 4,426,165,368. Mixtral's eight-choose-two is 28.
The price is paid in hardware, not in parameters. Smaller experts mean smaller matrix multiplications, which keep a GPU less busy per byte read. More active experts per token mean more routing decisions and more destinations, so the all-to-all exchange that moves tokens to wherever their experts live carries more, smaller messages. Fine-grained segmentation is a modelling gain bought with systems work.
Shared experts: a seat nobody has to win
The second change takes some experts out of the competition. A shared expert has no router in front of it. Every token passes through it, always, and its output is simply added. The routed experts compete for the remaining capacity.
The gate gi is zero for every routed expert outside the token's top-k, so the second sum has only k nonzero terms. The first term, u, is the residual connection. Common knowledge now has a natural home, and the routed experts are free to learn what is particular, because the generalist work is already done.
The paper's smaller model shows the arrangement at working size. DeepSeekMoE 16B has 28 layers, keeps the first one dense, and in each later layer holds 2 shared and 64 routed experts, each one quarter the width of a standard feed-forward network. A token visits the 2 shared experts and 6 of the 64 routed ones. That is 8 active quarter-width experts, or two full-width networks of compute: the same as a top-2 layer over full-size experts. The model totals about 16.4 billion parameters with about 2.8 billion active per token.
The ablations point where the diagnosis predicts. Removing the shared expert and activating one more routed expert in its place raised the Pile loss from 1.808 to 2.414, so the shared expert was carrying something the routed ones did not duplicate. And masking the most-used routed experts hurt DeepSeekMoE more than it hurt a GShard baseline with 1.5 times the expert parameters, which the authors read as lower redundancy: when a routed expert disappears, nobody else was holding its knowledge.
DeepSeek-V3: the same idea at 256
DeepSeek-V3, the December 2024 report, applies both ideas at a scale where the arithmetic gets striking. It has 61 transformer layers at a hidden width of 7,168. The first three feed-forward layers are dense; every one after that is a mixture-of-experts layer with 1 shared expert and 256 routed experts, each with an intermediate width of 2,048, and 8 routed experts active per token. The attention in the same model is the latent attention of Lecture 4.
The published dimensions are enough to rebuild where the 671 billion parameters live. Assuming the standard gated layout of three matrices per expert, one expert holds 3 × 7,168 × 2,048 ≈ 44 million parameters.
| Quantity | Arithmetic | Result |
|---|---|---|
| Expert instances | 58 MoE layers × (256 routed + 1 shared) | 14,906 |
| Expert weights | 14,906 × 44.0M | ≈ 656B, about 98% of 671B |
| Experts that run per token | 58 layers × (8 routed + 1 shared) = 522 | ≈ 23.0B |
| Everything else active | 37B reported − 23.0B | ≈ 14B: attention, three dense layers, embeddings |
| Routed share active | 8 / 256 | 3.1% of the routed experts |
| Whole model active | 37B / 671B | 5.5% |
Almost all of the model is experts, and each token touches about one in thirty of them. The remainder, attention and the dense layers, is the always-on core; it is why the whole-model fraction of 5.5% sits above the routed fraction of 3.1%.
Two routing details in the report are worth keeping. The affinity score is a sigmoid of the token against each expert's centroid, replacing the softmax of DeepSeek-V2; the scores of the selected experts are then normalised to sum to one to give the gates. And each token is restricted to experts on at most four nodes, because the all-to-all traffic of § 16.2 crosses the slow links between machines, and the cost of a token grows with the number of machines it visits. That limit is a constraint on the mathematics imposed by the cluster, in the spirit of Volume V.
Kimi K2 and the dial
Kimi K2, from Moonshot AI in July 2025, takes the DeepSeek-V3 template and turns one dial. Its report's architecture table gives 61 layers with one dense, 384 experts with 8 active and 1 shared, 1.04 trillion parameters in total and 32.6 billion active. The report defines sparsity as total experts over active experts, which is 48 for K2 against 32 for DeepSeek-V3.
Why push? The report describes a scaling experiment: at a fixed number of activated parameters, adding experts consistently lowered both training and validation loss. It chose 48 as the point that balanced that gain against the infrastructure complexity of serving more experts. A second change moves the other way: K2 halves the attention heads from 128 to 64, because the heads buy little loss and cost a lot at length. The report puts the inference cost of doubling to 128 heads at 83% more FLOPs at a 128K context, against a validation-loss gain of roughly 0.5 to 1.2 per cent.
Kimi K3 was announced in July 2026 at 2.8 trillion parameters with roughly 16 of 896 experts active, which is about 1.8% unconfirmed. Its technical report had not appeared at the time of writing, so treat the exact counts as unverified and the direction as clear: the routed fraction keeps falling.
| Model | Routed experts | Active routed | Shared | Active share |
|---|---|---|---|---|
| Mixtral 8x7B (2024) | 8 | 2 | 0 | 25% |
| DeepSeekMoE 16B (2024) | 64 | 6 | 2 | 9.4% |
| Qwen3-235B-A22B (2025) | 128 | 8 | 0 | 6.3% |
| gpt-oss-120b (2025) | 128 | 4 | not stated | 3.1% |
| DeepSeek-V3 (2024) | 256 | 8 | 1 | 3.1% |
| Kimi K2 (2025) | 384 | 8 | 1 | 2.1% |
| Kimi K3 (2026) unconfirmed | 896 | ~16 | not disclosed | ~1.8% |
Balance without a penalty
Lecture 15 ended on a tension: the auxiliary loss that keeps experts evenly loaded sends gradients through the router that compete with the language-modelling gradient. A large coefficient guards against collapse and degrades the model; a small one lets collapse in. The Loss-Free Balancing paper, by Wang, Gao, Zhao, Sun and Dai (August 2024), proposes to remove the penalty and keep the balance, and DeepSeek-V3 adopts it.
The mechanism is a bias bi per expert, added to the affinity score si for the top-k selection only. The gate that weights the expert's output is still computed from the raw score.
after each step: bi ← bi − γ if expert i was overloaded, + γ if underloaded
The bias is not a trained parameter. No gradient touches it. It is a bookkeeping variable updated by a rule: look at each expert's load over the last step, compare it with the mean, and nudge the expert's bias down by a small fixed step if it was busy, up if it was idle. An overloaded expert becomes slightly harder to select; an idle one becomes slightly easier. It is a thermostat, and like a thermostat it sits outside the thing it regulates.
DeepSeek-V3's report gives the schedule. The bias step γ is 0.001 for the first 14.3 trillion training tokens and is set to 0.0 for the final 500 billion, freezing the biases once load has settled. A small complementary sequence-wise auxiliary loss, with a coefficient of 0.0001, is kept to stop a single sequence from loading experts wildly unevenly. And the report states that, because the balance holds, the model drops no tokens during training or inference — which retires the capacity-factor machinery of Lecture 15.
Why a controller can beat a loss
A loss term speaks to the router in gradients, and a gradient has to share the router's weights with the objective that actually matters. A bias speaks only to the selection step. The language-modelling gradient stays pure, the balancing signal stays out of its way, and the two never trade accuracy for evenness at a fixed exchange rate. The cost is that the rule is a heuristic with a tuning step of its own, which the report schedules by hand.
Five lines to read in any report
By 2026 the expert layer has a recognisable anatomy, and a technical report either gives its five numbers or leaves them blank. Read for these, in the spirit of the six questions in Lecture 23: the count of routed experts; how many are active per token; how many shared experts, if any; how many leading layers stay dense; and what keeps the load balanced, an auxiliary loss, a bias, or something else. DeepSeek-V3 answers all five: 256, 8, 1, three dense layers, and a bias with a small sequence-wise loss beside it.
What remains unsettled is also readable from the table. Whether a shared expert pays for its seat divides Qwen3 from DeepSeek. How far the routed fraction can fall before serving cost or training stability gives way is the question Kimi K3's unpublished report will answer. And whether auxiliary-loss-free balancing, or the global-batch balancing loss Qwen3 reports using, is the better way to spread the work is a live argument, not a closed one.
One consequence is already concrete. A model of 671 billion parameters held at two bytes each is 1.34 terabytes of weights before a single activation is stored, and ultra-sparse models grow total size faster than compute. Capacity is cheap in arithmetic and dear in bytes. Volume VIII asks what a weight is made of, and how few bits it can be stored in.
| Method | Mechanism | Seen in |
|---|---|---|
| Auxiliary loss on f·P | Gradient penalty on uneven dispatch | Switch; Lecture 15 |
| Global-batch balancing loss | The same kind of penalty, measured over the global batch rather than each micro-batch | Qwen3, per its report |
| Bias-term routing | Non-gradient bias on selection scores, stepped by observed load | DeepSeek-V3, with a small sequence-wise loss |
| Node-limited routing | Each token confined to experts on at most four machines | DeepSeek-V3; communication, not balance |
Read the primary source
- DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models — Dai et al., January 2024.
- Auxiliary-Loss-Free Load Balancing Strategy for Mixture-of-Experts — Wang et al., August 2024.
- DeepSeek-V3 Technical Report — 2024.
- Kimi K2: Open Agentic Intelligence — Moonshot AI, 2025.
- Qwen3 Technical Report — 2025.
- gpt-oss-120b and gpt-oss-20b Model Card — OpenAI, 2025.
- Mixtral of Experts — Mistral AI, 2024.