Holistic Scaling Laws for Optimal Mixture-of-Experts Architecture Optimization
Organizations: College of Computer Science and Artificial Intelligence, Fudan University · Hi Lab, Xiaohongshu Inc. · Project Numina · School of Data Science, Fudan University
Abstract
Scaling laws govern macroscopic resource allocation for LLMs, yet precise architectural configurations for Mixture-of-Experts (MoE) models remain guided by heuristics. Existing MoE scaling studies either incorporate MoE-specific variables into scaling formulas, causing fitted coefficients to grow rapidly without proportional experimental support, or fix all non-MoE factors, implicitly assuming global architecture does not influence local MoE scaling. We propose a reusable framework for holistic MoE architectural optimization. We first show that MoE architectures decouple FLOPs per token (), active parameters (), and total parameters (), which serve as distinct proxies for computation, weight access, and parameter storage. We therefore establish a joint constraint triad of , active parameters (), and total parameters () for rigorous MoE characterization. To tame the resulting search space, we employ mathematical decoupling: structural constraints and a rank-preserving property of the hidden dimension factorize the optimization into an two-phase search. Through extensive validation across 670+ MoE models spanning to FLOPs, we derive globally applicable scaling laws mapping any compute budget to its optimal architecture. A key finding is that the near-optimal configuration band widens with scale, providing a quantitative basis for trade-offs between scaling law recommendations and engineering constraints. Our work delivers actionable blueprints for optimal MoE design under arbitrary compute budgets.
Figures & tables
| Symbol | Description |
|---|---|
| Overall Resource Metrics | |
| Total floating-point operations (FLOPs) per token during the forward pass | |
| Active parameter count per token, excluding embeddings | |
| Total parameter count of the model, excluding embeddings | |
| Total compute budget allocated for model training | |
| Structural Parameters | |
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Metric | Pearson | Spearman | Kendall | |
|---|---|---|---|---|
| Value | 0.9793 | 0.9758 | 0.9111 | 0.9590 |
| -value | – |
| (FLOPs) | ||||||
|---|---|---|---|---|---|---|
| Pearson | 0.9603 | 0.9908 | 0.9533 | 0.9845 | 0.9928 | 0.9883 |
| (GFLOPs) | Attention share | (B) | Loss |
|---|---|---|---|
| 3.02 | 1.9% | 5.28 | 2.125 |
| 3.03 | 0.5% | 9.90 | 2.102 |
| 3.01 | 0.2% | 10.02 | 2.226 |
| (EFLOPs) | (GFLOPs) | (Billion Tokens) |
|---|---|---|
| 1 | ||
| 3 | ||
| 10 | ||
| 30 | ||
| 100 | ||
| 300 |
| Parameter | Different Compute Scales | |||||
|---|---|---|---|---|---|---|
| Overall Resource Metrics | ||||||
| (GFLOPs) | 0.2672 | 0.4856 | 0.9345 | 1.6983 | 3.2681 | 5.9390 |
| Structural Parameters | ||||||
| 64 | 64 | 64 | 128 | 128 | 128 | |
| 4 | 8 | 8 | 8 | 8 | 16 | |
| 1248 | 8 | 3744 | 8 | 1832 | 16 | |
| 1312 | 7 | 3936 | 9 | 1520 | 16 | |
| 1376 | 6 | 4128 | 10 | 1304 | 16 | |
| 1440 | 5 | 4320 | 11 | 1152 | 16 | |
| 1472 | 5 | 4416 | 11 | 1088 | 16 | |
| 1536 | 4 | 4608 | 12 | 984 | 16 |
| (FLOPs) | (GFLOPs) | (B) | (B) | FP16 storage (GB) |
|---|---|---|---|---|
| 0.2672 | 0.025 | 0.49 | 1.0 | |
| 0.4856 | 0.049 | 0.95 | 1.9 | |
| 0.9345 | 0.100 | 2.08 | 4.2 | |
| 1.6983 | 0.192 | 3.99 | 8.0 | |
| 3.2681 | 0.388 | 8.25 | 16.5 | |
| 5.9390 | 0.732 | 16.16 | 32.3 |
Mixture-of-Experts Models
Mixture-of-experts models use input-dependent routing to activate specialized subnetworks, increasing model capacity without running every parameter for each input.
See all 454 papers