6.1.4 · D5Scaling & Efficient Architectures
Question bank — Mixture-of-Experts (MoE) architecture
Prerequisites worth re-skimming before you start: Softmax and Gating Functions, Sparse vs Dense Models, Conditional Computation, Load Balancing and Auxiliary Losses.
Symbols recap (so no line below is a riddle)

True or false — justify
True or false: Adding more experts to an MoE layer increases the FLOPs each token costs.
False — per-token compute scales with the active count , not the total . Adding experts grows storable knowledge (memory/capacity) while leaving the evaluated experts unchanged.
True or false: An MoE model with 448M total params is roughly as fast per token as a 448M dense model.
False — it is roughly as fast as a dense model with only the active parameters (a few experts + shared layers), which can be an order of magnitude smaller than 448M.
True or false: With Top- and the gate value is always exactly 1.
True after re-normalization — with a single selected expert, (the set of chosen experts) has one element so . But that "1" still carries the router's gradient, so the router keeps learning even at .
True or false: The router is trained by a separate loss and gets no signal from the main task.
False — because the gate multiplies the expert output , the main task loss flows through into the router matrix . The auxiliary loss only adds a balancing pressure on top.
True or false: Every token in a sentence is sent to the same set of experts.
False — routing is per token (even per position). "Bank" in one sentence and "bank" in another can land on completely different experts; that per-token freedom is where specialization comes from.
True or false: Dropping tokens due to capacity limits means those tokens produce no output at all.
False — a dropped token skips the expert computation but still passes through via the residual connection, so it carries its input forward unchanged rather than vanishing.
True or false: The load-balancing loss uses the hard dispatch fractions alone.
False — it multiplies (fraction of tokens dispatched to expert ) by the soft average probability (mean router probability for expert ): . The factor is differentiable, so gradients can actually reshape the routing; from an argmax alone is non-differentiable.
True or false: A large capacity factor guarantees zero dropped tokens.
False — it only reduces the chance of overflow by raising each expert's cap . A pathologically skewed router could still exceed even a generous ; capacity factor trades memory/compute against drop risk, not a hard guarantee.
Spot the error
"Softmax over Top- is pointless because we only pick the best expert anyway."
Error: for you must blend outputs, so you need weights summing to 1; and softmax's smooth gradient is what lets the router learn — a bare argmax is non-differentiable.
"We compute for all experts, then zero out the non-selected ones with ."
Error: the whole point is to never evaluate the unselected experts. conceptually zeroes them, but in practice only the chosen experts are ever run — that omission is the FLOP saving.
"Since for unused experts, they receive no gradient and never train."
Error: an expert trains whenever it is selected for some token in the batch. Over many tokens most experts get selected sometimes, so all of them accumulate gradient — just not from every token.
"The factor in is a typo; it should be ."
Error: the is deliberate. At the uniform optimum , the sum is , and multiplying by makes the loss value independent of expert count, so has a consistent meaning across model sizes.
"Re-normalizing over is optional; using the raw for selected experts is fine."
Error: the raw over (the selected-expert set) generally sum to less than 1, so the output would be systematically scaled down. Re-normalizing keeps the gate weights a proper convex blend summing to 1.
"MoE removes the feed-forward block entirely and replaces it with routing."
Error: each expert is an independent FFN. MoE replaces one dense FFN with many FFN experts plus a router — it multiplies FFNs, it doesn't delete them.
Why questions
Why use a dot product for the router score instead of, say, Euclidean distance?
Here is the router's weight matrix and the pre-score for expert . A dot product measures alignment between the token and each expert's learned preference row of ; it is linear, cheap, and pairs naturally with softmax to turn "who aligns best" into normalized probabilities .
Why does MoE need load balancing when the language-modeling loss already drives learning?
Because a "rich-get-richer" feedback loop makes the router collapse onto a few experts, leaving most parameters dead. The main loss doesn't penalize this, so an explicit auxiliary loss is required to keep experts busy — without it the entire capacity advantage is lost.
Why does decoupling capacity from compute matter for Scaling Laws?
Model quality tracks parameters known, while cost tracks FLOPs per token. Dense models tie these together; MoE lets you climb the parameter axis of the scaling curve while holding the compute axis roughly fixed.
Why keep (the aux-loss weight) small, e.g. ?
The balancing loss is a gentle nudge, not the objective. Too large an would force uniform routing that ignores what each token actually needs, hurting quality; too small and collapse creeps back.
Why is softmax (soft) preferred over a hard argmax for the router even though only experts run?
The hard selection determines which experts run, but the softmax-derived gate weight gives a differentiable multiplier, letting gradients teach the router which expert should have been chosen and by how much.
Edge cases
What happens when (Top- selects all experts)?
The layer degenerates into a dense mixture: every expert runs, the selected set is all so re-normalization does nothing new, and you lose all the FLOP savings — you've paid for capacity without conditional computation.
What happens if two experts tie for the last Top- slot with identical ?
The framework applies a deterministic tie-break (e.g. lower index wins). Only can enter , so one of the tied experts is dropped for that token — a reminder that Top- is a hard, discrete cut.
What if a token's router logits are all equal, giving a flat softmax ?
Top- still picks experts (by tie-break), each getting gate after re-normalization. The token gets a uniform blend of experts — no specialization signal, but a valid output.
What happens in the very first training steps before the router has learned anything?
Routing is near-random, so tokens scatter roughly uniformly — which is actually healthy. The danger is later, once a small skill gap triggers the rich-get-richer collapse; that's precisely when the aux loss earns its keep.
What if an over-subscribed expert drops a token but its residual path is also weak/zero?
Then that token effectively loses this layer's transformation and passes through near-unchanged, degrading quality. This is why drop rate is monitored and capacity factor tuned — persistent drops silently hollow out the model.
What does expert capacity become if the capacity factor is set below 1?
falls below the average tokens-per-expert, so even perfectly balanced routing overflows and drops tokens every batch. Capacity factor is the floor for lossless routing under balance; deliberately trades quality for compute/memory savings.
Recall One-line self-test
Cover the answers, run every item in under 10 minutes, and flag any you justified with a bare "yes/no." Re-read the parent MoE note sections behind those flags.