HyperAIHyperAI

Command Palette

Search for a command to run...

단계적으로 확장하기: 대규모 혼합 전문가 모델을 위한 계산 효율적 하이퍼파라미터 전이

Nayeon Kim Hojin Lee Yunju Bak Jaesun Park Boseop Kim

초록

혼합 전문가(Mixture-of-Experts, MoE) 아키텍처는 계산 비용의 비례적 증가 없이 모델 용량을 획기적으로 확장한다. 그러나 모델 크기와 토큰 예산 모두가 극단적인 규모에 도달했을 때 하이퍼파라미터, 특히 학습률을 스위핑(sweeping)을 통해 최적화하는 것은 계산적으로 여전히 엄두를 내기 어렵다. 본 논문에서는 계산 효율적인 2단계 하이퍼파라미터 전이 프레임워크를 제안한다. 이 프레임워크는 모델 너비를 확장해 가며 학습률을 전이시키고, 이를 다시 수조 토큰 규모의 학습 지평으로 외삽하여 대규모 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