GLaM

GLaM shows how sparse Mixture-of-Experts routing can be used as a large autoregressive language-model scaling route.

Metadata

FieldValue
PaperGLaM: Efficient Scaling of Language Models with Mixture-of-Experts
AuthorsNan Du, Yanping Huang, Andrew M. Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, Barret Zoph, Liam Fedus, Maarten Bosma, Zongwei Zhou, Tao Wang, Yu Emma Wang, Kellie Webster, Marie Pellat, Kevin Robinson, Kathleen Meier-Hellstern, Toju Duke, Lucas Dixon, Kun Zhang, Quoc V. Le, Yonghui Wu, Zhifeng Chen, Claire Cui
Year2021 preprint; 2022 conference
VenueICML 2022
arXiv2112.06905
PMLRPMLR 162:5547-5569
Statusfull note started

Question

Dense autoregressive language models scale by increasing parameters, data, and training compute. This creates a simple but expensive relationship:

GLaM asks:

The answer is a sparse Mixture of Experts decoder-only language model.

Main Claim

GLaM uses sparsely activated MoE layers inside an autoregressive language model so that total parameter capacity grows faster than per-token computation.

The durable architecture claim is:

This makes GLaM a bridge between GPT-3-style dense scaling and later sparse expert LLMs.

Architecture Contract

ComponentContract
Base modelautoregressive decoder-only language model
Token state
Dense pathself-attention and non-MoE Transformer layers
Sparse pathselected MoE feed-forward experts in some layers
Routertoken-level gate over experts
Expert selectionsparse top-2 expert activation
Outputnext-token distribution
Main comparisondense models under compute, quality, and energy constraints

The training objective remains the causal language-model objective:

The architecture change is in the conditional feed-forward path, not the output objective.

Sparse MoE Layer

Let a token hidden state be:

A dense Transformer FFN computes:

GLaM replaces some dense FFN layers with an expert pool:

The router computes expert scores:

For top-2 routing:

The MoE output is:

where is the normalized gate weight for selected expert .

The key scaling relation is:

Interleaving Dense and Sparse Layers

GLaM is not “all experts everywhere.” The important pattern is a dense Transformer backbone with MoE layers inserted in place of selected feed-forward blocks.

At a high level:

for sparse layers, while dense layers use:

This matters because the sparse route increases model capacity while retaining the familiar decoder-only Transformer interface.

Capacity, Active Compute, and Reporting

GLaM is easy to misread if total parameters and active computation are not separated.

QuantityMeaning
total parametersall expert parameters plus shared Transformer parameters
active parametersparameters used by selected experts for one token
FLOPs per tokencomputation actually used during forward pass
routing overheadgate, dispatch, expert batching, and combination cost
energy/training costsystem-level cost, not just architecture parameter count

The right reading contract is:

Relation to Prior MoE Papers

PaperWhat It Establishes
Sparsely-Gated MoEsparse expert routing and load balancing as a reusable layer
Switch Transformertop-1 sparse Transformer FFN routing for simpler scaling
GLaMlarge autoregressive LM scaling with sparse top-2 MoE layers

The lineage is:

Relation to GPT-3 and LLaMA

AxisGPT-3GLaMLLaMA
main routedense decoder-only scalingsparse expert decoder-only scalingefficient open dense decoder-only recipe
FFN pathdense FFNMoE FFN in selected layersdense SwiGLU-style FFN
capacityall active per tokenmany experts, sparse activationdense active parameters
reading focusin-context learning at scalecompute-efficient sparse scalingmodern open-weight implementation recipe

GLaM should not be read as replacing dense LLMs. It shows that sparse capacity is a serious architecture route when training and inference cost matter.

Evidence

Evidence TypeWhat It Supports
zero-shot and one-shot task suitesparse MoE language models can compete with large dense baselines
compute and energy reportingsparse activation can reduce training and inference cost relative to dense scaling claims
model-size familyMoE scaling behavior should be evaluated across multiple capacity points
dense baseline comparisonsquality claims depend on compute-matched or cost-aware comparisons

Evaluation Risks

  • Total parameter count can make the model look much larger than the active computation per token.
  • Energy and FLOP comparisons depend on hardware, implementation, utilization, and accounting boundaries.
  • Sparse MoE routing can create load imbalance and serving complexity not visible in simple FLOP counts.
  • Data quality, data mixture, and benchmark choice may explain part of the gain.
  • Expert specialization should be measured; it should not be assumed from the presence of experts.

Why It Belongs in Architecture Papers

GLaM belongs here because it changes the scaling contract of a language-model architecture:

It is also a useful bridge for reading later MoE LLMs, where the important questions are:

  • how many experts exist per MoE layer;
  • how many experts are active per token;
  • which layers are sparse;
  • how the router is trained and balanced;
  • whether reported compute includes routing, communication, and serving overhead.

Concepts