Table of Contents
Fetching ...

Towards Principled Design of Mixture-of-Experts Language Models under Memory and Inference Constraints

Seng Pei Liew, Kenta Shinzato, Yuyang Dong

TL;DR

The paper tackles how to design Mixture-of-Experts language models under memory and inference constraints beyond the conventional focus on total and active parameters. It introduces a five-variable MoE framework and demonstrates through ablations and scaling-law analyses that $N_{total}$ and expert sparsity $s:=n_{exp}/n_{topk}$ primarily determine performance, with an $n_{exp}$ penalty arising when budgets fix $N_{total}$ and $s$. It derives a disambiguated scaling law $L \propto {N_{total}}^{-0.052} {n_{exp}}^{0.023} {n_{topk}}^{-0.018}$ and advocates maximizing $N_{total}$ while minimizing $s$ and $n_{exp}$ within constraints, supported by an iterative optimization routine. The findings offer a rigorous, implementable guide for memory- and compute-constrained MoE design and are validated by comparing configurations under equivalent budgets.

Abstract

Modern Mixture-of-Experts (MoE) language models are designed based on total parameters (memory footprint) and active parameters (inference cost). However, we find these two factors alone are insufficient to describe an optimal architecture. Through a systematic study, we demonstrate that MoE performance is primarily determined by total parameters ($N_{total}$) and expert sparsity ($s:=n_{exp}/n_{topk}$). Moreover, $n_{exp}$ and $n_{topk}$ do not "cancel out" within the sparsity ratio; instead, a larger total number of experts slightly penalizes performance by forcing a reduction in core model dimensions (depth and width) to meet memory constraints. This motivates a simple principle for MoE design which maximizes $N_{total}$ while minimizing $s$ (maximizing $n_{topk}$) and $n_{exp}$ under the given constraints. Our findings provide a robust framework for resolving architectural ambiguity and guiding MoE design.

Towards Principled Design of Mixture-of-Experts Language Models under Memory and Inference Constraints

TL;DR

The paper tackles how to design Mixture-of-Experts language models under memory and inference constraints beyond the conventional focus on total and active parameters. It introduces a five-variable MoE framework and demonstrates through ablations and scaling-law analyses that and expert sparsity primarily determine performance, with an penalty arising when budgets fix and . It derives a disambiguated scaling law and advocates maximizing while minimizing and within constraints, supported by an iterative optimization routine. The findings offer a rigorous, implementable guide for memory- and compute-constrained MoE design and are validated by comparing configurations under equivalent budgets.

Abstract

Modern Mixture-of-Experts (MoE) language models are designed based on total parameters (memory footprint) and active parameters (inference cost). However, we find these two factors alone are insufficient to describe an optimal architecture. Through a systematic study, we demonstrate that MoE performance is primarily determined by total parameters () and expert sparsity (). Moreover, and do not "cancel out" within the sparsity ratio; instead, a larger total number of experts slightly penalizes performance by forcing a reduction in core model dimensions (depth and width) to meet memory constraints. This motivates a simple principle for MoE design which maximizes while minimizing (maximizing ) and under the given constraints. Our findings provide a robust framework for resolving architectural ambiguity and guiding MoE design.
Paper Structure (22 sections, 8 equations, 5 figures, 8 tables, 1 algorithm)

This paper contains 22 sections, 8 equations, 5 figures, 8 tables, 1 algorithm.

Figures (5)

  • Figure 1: Loss vs. Total Parameters. Each point represents a model with a specific configuration.
  • Figure 2: Comparison of loss between the $(128,8)$ and $(256,16)$ configurations with fitted scaling laws.
  • Figure 3: Goodness of fit for the selected scaling law in Section \ref{['sec:main_results']}.
  • Figure 4: Goodness of fit for the (128,8) configuration.
  • Figure 5: Goodness of fit for the (256,16) configuration.