Skip to main content
QUICK REVIEW

[Paper Review] Staged Training for Transformer Language Models

Sheng Shen, Pete Walsh|arXiv (Cornell University)|Mar 11, 2022
Topic ModelingComputer Science4 citations
TL;DR

This paper proposes staged training for Transformer language models, where a small model is trained first and then incrementally grown in depth or width using learned operators that preserve both loss and training dynamics. By reusing prior compute and optimizing stage transitions via scaling laws, the method achieves up to 22% compute savings over training from scratch while matching or improving performance.

ABSTRACT

The current standard approach to scaling transformer language models trains each model size from a different random initialization. As an alternative, we consider a staged training setup that begins with a small model and incrementally increases the amount of compute used for training by applying a "growth operator" to increase the model depth and width. By initializing each stage with the output of the previous one, the training process effectively re-uses the compute from prior stages and becomes more efficient. Our growth operators each take as input the entire training state (including model parameters, optimizer state, learning rate schedule, etc.) and output a new training state from which training continues. We identify two important properties of these growth operators, namely that they preserve both the loss and the "training dynamics" after applying the operator. While the loss-preserving property has been discussed previously, to the best of our knowledge this work is the first to identify the importance of preserving the training dynamics (the rate of decrease of the loss during training). To find the optimal schedule for stages, we use the scaling laws from (Kaplan et al., 2020) to find a precise schedule that gives the most compute saving by starting a new stage when training efficiency starts decreasing. We empirically validate our growth operators and staged training for autoregressive language models, showing up to 22% compute savings compared to a strong baseline trained from scratch. Our code is available at https://github.com/allenai/staged-training.

Motivation & Objective

  • To reduce the high computational cost of training large-scale Transformer language models.
  • To address inefficiencies in standard training, where larger models are less compute-efficient initially and only become more efficient later.
  • To design growth operators that preserve both loss and training dynamics across model size increases.
  • To develop a principled schedule for stage transitions using scaling laws to maximize compute efficiency.
  • To empirically validate the method on GPT-2 style autoregressive models with measurable compute savings.

Proposed method

  • The method uses depth and width growth operators that take the full training state (weights, optimizer state, learning rate schedule) as input and output a new, larger model state.
  • The growth operators are designed to be loss-preserving and training-dynamics-preserving, ensuring the loss and rate of loss decrease remain consistent after growth.
  • The stage schedule is determined using scaling laws from Kaplan et al. (2020), which predict when training efficiency starts to decline and a new stage should begin.
  • A practical approximation of the optimal schedule is derived for real-world settings where exact scaling laws are unknown.
  • The approach is validated on GPT-2-style autoregressive language models using standard benchmarks like Wikitext-103 and LAMBADA.
  • The method enables training a large model with significantly less compute by reusing prior training stages and avoiding redundant computation.

Experimental results

Research questions

  • RQ1Can staged training with model growth reduce the total compute cost of training large Transformer language models?
  • RQ2What properties must growth operators satisfy to ensure stable and efficient training across stages?
  • RQ3How can the optimal stage transition schedule be determined to maximize compute savings?
  • RQ4To what extent can the full training state (including optimizer and learning rate) be preserved during model growth?
  • RQ5Does preserving training dynamics lead to better convergence and performance compared to naive growth methods?

Key findings

  • The proposed growth operators preserve both loss and training dynamics, ensuring that the rate of loss decrease after growth matches that of a model trained from scratch.
  • Using scaling laws to determine stage transitions leads to up to 22% compute savings compared to training from scratch.
  • Empirical results on GPT-2-style models show that the grown models achieve comparable or better validation loss and zero-shot perplexity with significantly reduced compute.
  • The method achieves 15% of the compute of a full GPT-2 base model while matching its 37.5 PPL on Wikitext-103, and 33% of the compute for equivalent LAMBADA accuracy.
  • Growing too early or too late results in loss of compute savings, confirming the importance of precise stage scheduling.
  • The approach is robust and generalizable, as it maintains performance across different model sizes and training objectives.

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.