24

Towards a Comprehensive Scaling Law of Mixture-of-Experts

Main:9 Pages
22 Figures
Bibliography:3 Pages
6 Tables
Appendix:18 Pages
Abstract

Mixture-of-Experts (MoE) models have become the consensus approach for enabling parameter-efficient scaling and cost-effective deployment in large language models. However, existing scaling laws for dense models are inapplicable to MoE models, which stems from three critical challenges: the multiplicity of influencing factors, their intricate coupling relationships and the non-monotonic nature of their performance impacts. They collectively necessitate a fine-grained investigation into MoE-specific scaling laws. In this work, we perform a systematic decomposition of MoE settings, identifying five key factors that influence model performance from both size and structural perspectives (data size (DD), total model size (NN), activated model size (NaN_a), number of active experts (GG) and the ratio of shared experts (SS)). Specifically, we design 446446 controlled experiments to characterize their marginal effects, ultimately constructing a comprehensive and precise joint MoE scaling law that considers all essential factors. Furthermore, we derive the theoretically optimal and practically efficiency-aware optimal configurations for GG, SS and Na/NN_a/N with detailed analyses. Our results demonstrate that the optimal settings for GG and SS are independent of both the model architecture and data size. With the scaling of NN, the optimal activation parameter ratio of Na/NN_a/N becomes sparser. Our proposed MoE scaling law could function as an accurate and insightful guidance to facilitate future MoE model design and training.

View on arXiv
Comments on this paper