Back to LLMs Mind Map
中文·English
LLMsID: moe-load-balance

MoE Load Balancing

负载均衡损失
🎯Core Definition
without constraints, the gate makes tokens pile onto a few experts, causing load imbalance and routing collapse (a few experts absorb nearly all signal). Mitigations: the auxiliary balance loss Laux=αNi=1NfiPi\mathcal{L}_{\text{aux}} = \alpha \cdot N \sum_{i=1}^{N} f_i P_i, where fif_i is expert ii's fraction of tokens (actual utilization) and PiP_i its mean routing probability — minimizing the product encourages uniform routing; plus a per-expert capacity cap (capacity factor: max tokens per expert = capacity factor × average load), where overflow tokens are dropped or routed through a residual path (recompute/residual connection).
💡Use Cases
a standard component of every top-k MoE training run (Switch Transformer, Mixtral, DeepSeek-V3); the capacity cap is also needed at inference to bound per-batch compute and prevent a hot expert from bloating latency.
Key Problems Solved
imbalance idles some experts and overloads others, wasting memory and compute; expert collapse reduces MoE to a few effective experts, no better than a Dense model of the same size; the balance loss gives every expert a training signal, and the capacity cap makes training/inference deterministic.
🎯5 High-Frequency Exam Points
1
What are f_i, P_i, α, and N in the load-balancing loss?
2
Why does imbalance occur — what is expert/routing collapse?
3
What is the capacity factor — effects of it being too large or small?
4
How are overflow tokens handled?
5
Trade-offs of the aux-loss weight α being too large or small?
📖 In-depth Guide:📄 moe-architecture
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "MoE Load Balancing"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardMoE Routing Top-kNext CardDense vs MoE

🔗 More LLMs Knowledge Cards

Agent & Tool CallingAlignment Tax & Preference DataScaled Dot-Product AttentionAttention Variants MHA/MQA/GQA