HyperAIHyperAI

Command Palette

Search for a command to run...

段階的にスケールする:大規模Mixture-of-Expertsのための計算効率的なハイパーパラメータ転送

Nayeon Kim Hojin Lee Yunju Bak Jaesun Park Boseop Kim

概要

Mixture-of-Experts(MoE)アーキテクチャは、計算コストの比例的な増加を伴わずにモデル容量を大幅に拡大する。しかし、モデルサイズとトークン予算の両方が極端な規模に達する場合、特に学習率といったハイパーパラメータをスイープによって最適化することは、計算量の観点から依然として禁止的である。本論文では、大規模MoEモデルを訓練するための最適な学習率を、モデル幅にわたって転送し、その後数兆トークン規模の地平線へと外挿することによって推定する、計算効率の高い二段階のハイパーパラメータ転送フレームワークを提案する。第一に、Multi-head Latent Attention(MLA)とMuonオプティマイザを利用するMoEアーキテクチャに対してMaximal Update Parameterization(µP)の適応を定式化し、最適な学習率が幅を変えてスケールされたモデル間で一貫して転送可能であることを実証する。第二に、予測的なスケーリング則を確立することにより、この転送可能性をトークン次元に沿って拡張する。限られた予算で小規模なプロキシモデルから導出された最適値に線形回帰を適用することで、大規模な訓練地平線(例:10兆トークン)に対して理想的な学習率を高い忠実度(R2=0.95R^{2}=0.95R2=0.95)で外挿することに成功した。この結果は、小規模モデルでのプロキシ訓練が、大規模MoEの広範な訓練に最適な学習率を決定するのに十分であることを示している。提案手法を適用して、基盤モデル(総パラメータ数1550億、活性パラメータ数170億)をゼロから事前訓練したところ、安定した訓練と評価結果は、フルスケールのターゲットモデルに対する最適な設定が、最小限のアブレーションコストで正確に予測可能であることを検証するものである。

One-sentence Summary

Kakao Corp. and Upstage AI propose a compute-efficient hyperparameter transfer framework for large-scale MoE models, adapting µP with Multi-head Latent Attention and the Muon optimizer to transfer optimal learning rates across widths and then using a token scaling law (R2=0.95)( R ^ { 2 } = 0 . 9 5 )(R2=0.95) to extrapolate from small proxy models to trillion-token training, successfully pretraining a 155B-parameter model.

Key Contributions

  • A Maximal Update Parameterization (µP) adaptation is formulated for Mixture-of-Experts architectures with Multi-head Latent Attention and the Muon optimizer, demonstrating consistent transfer of optimal learning rates across width-scaled models.
  • A predictive scaling law extends this transferability along the token dimension, enabling extrapolation of the optimal learning rate to trillion-token training from small proxy models via linear regression with high fidelity (R²=0.95).
  • The two-step framework is validated by pretraining a 155B-parameter MoE foundation model (17B active) from scratch, where stable loss and competitive benchmarks confirm that optimal hyperparameters can be accurately predicted with minimal ablation cost.

Introduction

Mixture-of-Experts (MoE) architectures let large language models scale capacity and specialization while keeping per-token active computation low, but tuning their learning rates becomes expensive because optimal values depend on model size, token budget, and expert routing. Existing hyperparameter transfer methods such as Maximal Update Parameterization mainly address dense width scaling, so their reliability for MoE sparsity and large expert counts remains uncertain. The authors propose a two-step, compute-efficient framework that transfers hyperparameters across model width and expert count while extrapolating optimal learning rates from small proxy runs to long token horizons. They validate this approach by pretraining a 155B-total-parameter MoE model with 17B active parameters over 10 trillion tokens, avoiding costly multidimensional sweeps.

Method

The authors propose a two-step hyperparameter transfer framework designed to efficiently determine the optimal learning rate for large-scale Mixture-of-Experts (MoE) models. The first step adapts Maximal Update Parameterization (µP) to MoE architectures, enabling zero-shot transfer of the optimal learning rate across model widths. The second step establishes a scaling law that predicts how the optimal learning rate evolves with the token budget, allowing extrapolation from short proxy runs to full-scale training horizons.

The µP adaptation for MoE begins by classifying model parameters according to their behavior under width scaling. Since none of the parameters have shapes tied to fixed constants such as vocabulary size, scalar-like parameters are excluded. Vector-like parameters receive µP initialization only, while matrix-like parameters are subject to both µP initialization and learning rate scaling. Following prior findings that µP properties can be preserved by scaling learning rates solely for linear layers, the authors apply learning rate scaling exclusively to matrix-like hidden weights. Depth scaling is avoided due to known instabilities; only width scaling is considered, with the number of layers kept fixed. For attention, the head dimension remains constant while the number of heads scales proportionally with the hidden dimension.

When scaling MoE models, the number of active experts per token and the MoE intermediate dimension are held fixed, while the total number of experts and the hidden dimension increase. This strategy raises sparsity as a key scaling axis alongside width, coupling total scale, active scale, and sparsity. The coupling remains compatible with µP because changing the active ratio by increasing the number of experts does not alter the fan-in or fan-out of individual experts beyond the effect of width scaling. Moreover, running the proxy search at lower sparsity and transferring to a higher-sparsity target keeps the search itself computationally efficient while still targeting the desired sparse regime.

The second step tackles the problem that even with µP, direct learning rate search over trillions of tokens is prohibitive. The solution is to identify the optimal learning rate within a constrained token budget and extrapolate to the full target horizon. The framework deliberately decouples learning rate optimization from batch size, treating batch size as a system-level variable fixed to maximize GPU throughput. This makes the learning rate scaling law robust to the chosen batch size.

For short-token estimation, the authors train small proxy models over limited token horizons using a Warmup-Stable-Decay (WSD) scheduler as the long-horizon setup. To avoid the computational cost and bias of introducing decay early, proxy runs are terminated during the stable phase without decay, and Exponential Moving Average (EMA) is applied to the model weights. EMA smooths parameter trajectories and mimics the effect of learning rate decay, which is particularly effective in the large-batch regime used here (global batch size of 32M tokens). The EMA parameters θEMA(t)\theta_{\mathrm{EMA}}^{(t)}θEMA(t) are updated as

θEMA(t)=αθEMA(t1)+(1α)θ(t)\theta_{\mathrm{EMA}}^{(t)} = \alpha \cdot \theta_{\mathrm{EMA}}^{(t-1)} + (1 - \alpha) \cdot \theta^{(t)}θEMA(t)=αθEMA(t1)+(1α)θ(t)

with a smoothing factor α=0.6\alpha = 0.6α=0.6, ensuring that the most recent 20B tokens retain more than 1% influence. Checkpoints are saved via EMA at approximately 2B-token intervals, and those at every 10B tokens are used for analysis. For each token budget BBB, the validation loss L\mathcal{L}L is modeled as a second-order polynomial in log-transformed learning rate:

L(η)=a(logη)2+b(logη)+c.\mathcal{L}(\eta) = a (\log \eta)^2 + b (\log \eta) + c.L(η)=a(logη)2+b(logη)+c.

The vertex logη=b/2a\log \eta^* = -b / 2alogη=b/2a gives the estimated optimal learning rate η=exp(b/2a)\eta^* = \exp(-b / 2a)η=exp(b/2a) for that budget.

To extrapolate to long token horizons, the authors fit a linear regression in log-log space between the estimated optimal learning rate η\eta^*η and the token budget BBB:

log(η)=βlog(B)+γ.\log(\eta^*) = \beta \cdot \log(B) + \gamma.log(η)=βlog(B)+γ.

This regression model allows predicting the optimal learning rate for target budgets (e.g., 10T tokens) without additional computation. When batch size scheduling is used, only data points collected after the training dynamics stabilize following a batch size increase are included in the regression, ensuring a consistent optimization regime.

Experiment

The evaluation uses µP, the Muon optimizer, and a WSD scheduler with batch size scheduling on NVIDIA H200 GPUs. Experiments first validate that µP allows optimal learning rates to transfer across MoE model widths, and that this transfer persists across token budgets, with the optimal learning rate decreasing slightly as more tokens are processed. By extrapolating a linear fit from small proxy runs, the optimal learning rate for a 155B-parameter MoE model trained on 10T tokens is predicted and applied, resulting in stable training loss and a model that lies on the Pareto frontier, outperforming comparable open-weight models at similar or lower compute.

Matrix-like parameters in dense and MoE models receive learning rate scaling based on the ratio of fan-in to a base proxy model, while vector-like parameters are only subject to µP initialization. For multi-head latent attention (MLA), the low-rank projection dimensions remain fixed during width scaling, so the learning rate scaling factor for the corresponding up-projection matrices becomes one and has no effect. When scaling MoE models, increasing the total number of experts while keeping active experts per token and intermediate dimension fixed couples sparsity with width, preserving compatibility with µP-based hyperparameter transfer. Learning rate scaling is applied only to matrix-like hidden weights, with factors proportional to the ratio of fan-in to the base proxy model's fan-in. In MLA, fixed query and key-value low-rank dimensions cause the learning rate scaling for up-projection matrices to reduce to 1, nullifying its effect. MoE scaling increases total experts and hidden dimension while holding active experts per token and MoE intermediate dimension constant, coupling sparsity and width under the same µP rules. Vector-like parameters (e.g., embeddings, biases, expert FC2 weights) receive µP initialization but no learning rate scaling during width expansion.

In maximal update parameterization for mixture-of-experts models, parameters are classified by how their shape scales with model width. Matrix-like parameters, such as router weights and expert FC1 weights, use initialization variance and learning rates that scale inversely with fan-in, while vector-like parameters, including embeddings, biases, and expert FC2 weights, use fixed initialization and no learning rate scaling. This classification enables stable hyperparameter transfer when scaling width and sparsity jointly. Matrix-like parameters (router weights, expert FC1) receive both µP initialization and learning rate scaling inversely proportional to fan-in. Vector-like parameters (embeddings, biases, expert FC2) use a fixed initialization variance and a learning rate scaling factor of 1, meaning no adjustment with model width.

The evaluation studies width and sparsity scaling under maximal update parameterization for dense and mixture-of-experts models, including multi-head latent attention. Matrix-like parameters such as router weights and expert FC1 weights receive initialization and learning rate scaling based on fan-in, while vector-like parameters such as embeddings, biases, and expert FC2 weights use fixed initialization and no learning rate scaling. In MLA, fixed low-rank projection dimensions make the up-projection learning rate factor equal to one, and MoE scaling couples sparsity with width by increasing total experts while keeping active experts and intermediate dimensions fixed.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています