Abstract
The computational expense of training Large Language Models (LLMs) has led to the rise of Mixture of Experts (MoE) architectures. However, the scaling behavior of MoEs has remained a subject of debate. This paper introduces "granularity" ($G$) as a critical hyperparameter, demonstrating that fine-grained experts allow MoE models to significantly outperform dense Transformers. By deriving a new joint scaling law, the researchers show that MoE efficiency actually improves as compute scales, offering potential savings of up to 40x at massive scales.
Introduction
Training state-of-the-art LLMs requires astronomical resources, often measured in millions of GPU hours. To mitigate these costs, Mixture of Experts (MoE) models have become a popular alternative to traditional "dense" Transformers. By activating only a sparse subset of parameters for each input token, MoEs aim to provide the representational power of a large model with the computational footprint of a smaller one.
Despite their promise, the research community has struggled to define how MoEs scale relative to dense models. Some empirical studies suggested a "diminishing returns" scenario where the efficiency gap narrows as models grow. This research challenges that notion, arguing that previous benchmarks relied on sub-optimal configurations. The key to unlocking MoE potential lies in the granularity of the experts.
The Granularity Framework
The authors introduce granularity ($G$) as a fundamental hyperparameter for MoE design. In a standard MoE architecture, granularity is typically set to $G=1$, where each expert is equivalent in size to a standard feed-forward network (FFN) layer.
By increasing $G$, a model splits these large experts into many smaller, "fine-grained" experts. While the total number of active parameters per token remains constant, the increased granularity provides the routing mechanism with more flexibility. This allows the model to more precisely allocate specialized parameters to specific tokens.
To manage this increased complexity, the researchers utilized Expert Choice routing. Unlike traditional Top-K routing, which can lead to load imbalance, Expert Choice routing ensures that each expert receives a balanced workload, maximizing the utility of the available parameters.
A New Joint Scaling Law
Through over 100 experiments—ranging from 129M to 3.7B parameters and trained on up to 130B tokens from the C4 (Colossal Clean Crawled Corpus) dataset—the authors derived a unified scaling law. This law accounts for model size ($N$), training data ($D$), and granularity ($G$):
$$\mathcal{L}(N, D, G) = c + \left(\frac{g}{G^\gamma} + a\right) \frac{1}{N^\alpha} + \frac{b}{D^\beta}$$
This formula reveals that model performance improves according to a power law as granularity increases. Crucially, this improvement eventually converges to a theoretical limit, suggesting that while more experts are better, there is an eventual point of saturation. The derived scaling laws showed a high degree of predictive power (RMSE = 0.015), allowing researchers to predict the performance of massive models from much smaller test runs.
The Widening Efficiency Gap
One of the most significant findings of this research is the reversal of previous scaling assumptions. The data shows that MoE models do not just maintain their advantage over dense Transformers—they become increasingly more efficient as the total compute budget grows.
For a compute budget of $10^{20}$ FLOPs, a compute-optimal MoE achieves the same loss as a dense Transformer using 20x more compute. When the budget is scaled to $10^{25}$ FLOPs, this efficiency gap expands to over 40x. This suggests that for the next generation of "frontier" models, the transition to fine-grained MoE architectures is not just beneficial, but perhaps necessary.
Optimal Configuration and Trade-offs
The research indicates that for any given compute budget, there is a "sweet spot" for granularity. As the total investment in training increases, the optimal configuration shifts toward higher granularity (more, smaller experts). However, this efficiency comes with practical challenges:
- Routing Overhead: While fine-grained experts are computationally efficient in terms of FLOPs, the "wall-clock" time can increase. The overhead of routing data to a large number of very small experts can eventually outweigh the algorithmic gains.
- Communication Costs: In distributed training environments, high granularity increases the frequency and complexity of data movement between GPUs, a factor that needs more empirical modeling in real-world systems.
- Fixed Parameters: The current study primarily fixed the expansion rate ($E$) at 64. Future research is needed to understand how varying the total number of experts relative to active ones affects these scaling laws.
Conclusion
The introduction of granularity as a scaling dimension provides a clearer roadmap for LLM development. By moving away from the $G=1$ standard and embracing fine-grained experts, researchers can achieve unprecedented compute efficiency. As we move toward larger models and more massive datasets, the scaling laws for fine-grained MoEs suggest that the gap between sparse and dense architectures will only continue to grow.
Summary updated