Scaling Laws for Fine-Grained Mixture of Experts
Mixture of Experts (MoE) models have emerged as a primary solution for reducing the computational cost of Large Language Models. In this work, we analyze their scaling properties, incorporating an expanded range of variables. Specifically, we introduce a new hyperparameter, granularity, whose adjustment enables precise control over the size of the experts. Building on this, we establish scaling laws for fine-grained MoE, taking into account the number of training tokens, model size, and granularity. Leveraging these laws, we derive the optimal training configuration for a given computational budget. Our findings not only show that MoE models consistently outperform dense Transformers but also highlight that the efficiency gap between dense and MoE models widens as we scale up the model size and training budget. Furthermore, we demonstrate that the common practice of setting the size of experts in MoE to mirror the feed-forward layer is not optimal at almost any computational budget.
Bio
Sebastian Jaszczur is a researcher and Ph.D. student at IDEAS NCBR and the University of Warsaw. In 2020, he started his research work on language models in general and on Mixture of Experts in particular, interning at Google Brain. There, he published “Sparse is Enough in Scaling Transformers” (Jaszczur et al., 2021). Later he joined IDEAS NCBR, where he started and led projects on Mixture of Tokens (Antoniak et al., 2023), MoE-Mamba (Pióro et al., 2024), and scaling laws in fine-grained MoE (Krajewski et al., 2024).