← Lab /AI/ML

μP keeps optimal learning rates stable across model widths, cutting tuning cost

Using the maximal update parameterization (μP) yields stable optimal hyperparameters across model scales and reduces the need for hyperparameter tuning.

AI/ML EleutherAI 19 Sep 2024 Tooling Prototype evidence

Published as “The Practitioner's Guide to the Maximal Update Parameterization”

Why it matters

μP can reduce hyperparameter tuning effort and improve training stability for large language models.

Summary

The guide explains how to implement the maximal update parameterization (μP) in transformer models and provides a NanoGPT-based reference implementation. Using μP, the authors show that optimal learning rates stay constant when model width changes, eliminating costly hyperparameter searches. They validate this with a coordinate-check test that confirms activation magnitudes are width-invariant and a μTransfer test on openwebtext and Shakespeare data that demonstrates stable learning rates across four model widths. Evidence is based on small-scale experiments (2-layer GPT-2 models) with multiple seeds, showing the claim holds in these settings.

What they found 1

  1. Optimal learning rates remain stable across model widths when using μP.

    “Figure 11 shows the optimal learning rate remains stable as we vary model width for μP, unlike the SP models.”

Caveats 2

  • While adopting μP does not completely solve the problem of instability, it certainly does eliminate HP selection as a major source of instability.
  • We recommend re-tuning your HPs whenever you make a change to your model architecture (e.g. attention algorithm, nonlinearity, position embeddings, vocabulary size) or training procedure (e.g. learning rate schedule).

What’s new here 4

  • A simple NanoGPT-mup implementation of μP with example code.
  • Coordinate check test to verify width-invariant activations after each training step.
  • μTransfer test demonstrating stable optimal learning rates across model widths.
  • Concrete scaling rules for weight initialization and learning-rate adjustments in transformers.