Skip to main content
QUICK REVIEW

[Paper Review] Early Weight Averaging meets High Learning Rates for LLM Pre-training

Sunny Sanyal, Neerkaje, Atula|arXiv (Cornell University)|Jun 5, 2023
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

This paper proposes Early Weight Averaging via LAWA (LAtest Weight Averaging) to accelerate convergence and improve generalization in LLM pre-training with high learning rates. By averaging distant, late-stage checkpoints from a single high-LR training trajectory, LAWA achieves faster convergence and lower perplexity than conventional training, EMA, and SWA, especially effective in compute-efficient, early-stopping scenarios for both nanoGPT-2 and Pythia LLMs.

ABSTRACT

Training Large Language Models (LLMs) incurs significant cost; hence, any strategy that accelerates model convergence is helpful. In this paper, we investigate the ability of a simple idea checkpoint averaging along the trajectory of a training run to improve both convergence and generalization quite early on during training. Here we show that models trained with high learning rates observe higher gains due to checkpoint averaging. Furthermore, these gains are amplified when checkpoints are sampled with considerable spacing in training steps. Our training recipe outperforms conventional training and popular checkpoint averaging baselines such as exponential moving average (EMA) and stochastic moving average (SWA). We evaluate our training recipe by pre-training LLMs, where high learning rates are inherently preferred due to extremely large batch sizes. Specifically, we pre-trained nanoGPT-2 models of varying sizes, small (125M), medium (335M), and large (770M)on the OpenWebText dataset, comprised of 9B tokens. Additionally, we present results for publicly available Pythia LLMs, ranging from 1B to 12B, which were trained on the PILE-deduped dataset containing 207B tokens.

Motivation & Objective

  • To improve test generalization and convergence speed in LLM pre-training without increasing compute costs.
  • To investigate whether early checkpoint averaging amplifies gains when combined with high learning rates, especially under large-batch training.
  • To evaluate LAWA’s effectiveness across diverse model scales (125M–12B) and datasets (OpenWebText, PILE-deduped).
  • To compare LAWA against conventional training and established baselines like EMA and SWA in LLM pre-training.
  • To extend the applicability of weight averaging beyond NLP to other generative models, such as diffusion models.

Proposed method

  • LAWA performs checkpoint averaging over a sliding window of the latest weights from a single high-learning-rate training trajectory.
  • The method samples checkpoints at significant intervals (e.g., every 10K steps) to capture diverse, stable model states.
  • Averaging is applied to the final model weights, producing a single, improved model with enhanced generalization.
  • The approach is applied to both nanoGPT-2 (125M–770M) and Pythia (1B–12B) models trained on large-scale datasets (9B–207B tokens).
  • For diffusion models, LAWA is applied to UNet checkpoints trained with DDPM, improving FID scores over EMA-baselines.
  • The method avoids retraining or complex LR scheduling, enabling integration into standard training pipelines.
(a)
(a)

Experimental results

Research questions

  • RQ1Does early weight averaging yield greater improvements when applied to models trained with high learning rates?
  • RQ2Can distant, late-stage checkpoints from a single training run yield better generalization than standard averaging methods?
  • RQ3How does LAWA compare to EMA and SWA in terms of convergence speed and test perplexity across different LLM sizes?
  • RQ4Can LAWA improve zero-shot performance and enable earlier model deployment in compute-constrained settings?
  • RQ5Does LAWA generalize to other generative models, such as diffusion models for image generation?

Key findings

  • LAWA reduces validation perplexity by up to 0.087 on GPT2-large (770M) compared to original training (2.908 vs. 2.977), with gains amplified under high learning rates.
  • On nanoGPT-2-small (125M), LAWA achieves a validation loss of 2.917, outperforming EMA (2.949) and SWA (2.952).
  • For Pythia-1B, the LAWA checkpoint at 24K steps achieves higher Lambada accuracy than the original model at 48K steps, demonstrating early performance gains.
  • LAWA improves zero-shot performance across all Pythia models (1B–12B), with consistent gains until 105K steps (75% of total training), enabling earlier deployment.
  • In diffusion models, LAWA reduces FID by 1.5 points on ImageNet-128x128 compared to EMA-baselines, indicating broader applicability.
  • LAWA closely mimics the generalization behavior of low-learning-rate training, allowing high-LR training without performance trade-offs.
(b)
(b)

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.