What goes wrong when training MoE models, and what's the inference memory caveat?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Training instabilities - mostly downstream of one problem: routing is a discrete decision trained with gradient descent.
Full worked answer with diagram
Training instabilities - mostly downstream of one problem: routing is a discrete decision trained with gradient descent.
- Router collapse / load imbalance: the rich-get-richer loop. Early-favoured experts get more tokens, train faster, get better, attract more traffic - until a few experts absorb everything and the rest are dead weight. Standard fix: an auxiliary load-balancing loss penalising deviation from uniform expert utilisation per batch. But this creates a tension - the balancing loss actively fights the router's quality-driven preferences, and overweighting it hurts the model. (DeepSeek-V3 notably pushed an auxiliary-loss-free balancing scheme using learned per-expert bias adjustments, precisely to escape this tension.)
- Router logit blowup: router logits growing large destabilises training (saturated softmax, huge gradients) - mitigated by the router z-loss (from ST-MoE, Zoph et al.), penalising large logsumexp of router logits. MoE runs are empirically more spike- and divergence-prone than dense runs, requiring more careful precision handling (routers often kept in fp32).
- Non-differentiable top-k: gradients flow only through selected experts' gate weights; the "would another expert have been better?" counterfactual gets no direct signal - routing learning is noisy.
- Systems coupling: experts are sharded across devices (expert parallelism), so token routing becomes all-to-all network communication; load imbalance is now also a hardware stall problem. Capacity factors cap tokens per expert; overflow tokens get dropped (silently skipping computation) - a quality/throughput knob dense models don't have. Fine-tuning MoEs is also touchier (routers can destabilise on narrow distributions).
Going further: follow-up territory
The inference memory caveat: sparsity saves FLOPs, not memory. Every expert must be loaded and resident, because any token may route anywhere - a ~47B-total/13B-active model needs ~94 GB in fp16, the memory of a 47B dense model with the latency of ~13B. Consequences: MoE suits high-throughput batched serving on memory-rich, fast-interconnect clusters (where large batches keep all experts busy and per-token bandwidth for weights is amortised); it's a poor fit for single-GPU or on-device deployment, where a dense model of equal quality often deploys better. At small batch sizes the advantage narrows further - you stream lots of weights for few tokens.
Worth sketching. Drawing the feedback loop makes the fix and the cost of the fix land together.
flowchart LR
A["expert happens to be favoured early"] --> B["receives more tokens"]
B --> C["trains faster, gets better"]
C --> A
C --> D["remaining experts starve,<br/>become dead capacity"]
D --> F["fix: auxiliary load-balancing loss,<br/>or bias-adjusted balancing"]
F --> G["cost: the balancing term fights the<br/>router's quality-driven preference"]
What a good answer covers
- Training instabilities - mostly downstream of one problem
- Router collapse / load imbalance: the rich-get-richer loop
- Router logit blowup: router logits growing large destabilises training (saturated softmax, huge…
- Non-differentiable top-k: gradients flow only through selected experts' gate weights; the "would another…
- Systems coupling: experts are sharded across devices (expert parallelism), so token routing becomes…
Key terms: Router collapse / load imbalance · auxiliary load-balancing loss · Router logit blowup · router z-loss · Non-differentiable top-k · Systems coupling · Capacity factors
In the glossary: Router · MoE · Expert parallelism · Fine-tuning
Interviewer follow-ups to expect
Why does the load-balancing loss trade quality for stability?
What does expert parallelism do to inference latency tails?
When would you recommend dense over MoE despite MoE's training-compute win?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep