Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations

Alexander Hägele, Elie Bakouch, Atli Kosson, Loubna Ben Allal, Leandro Von Werra +1 more
5/28/2024
cs.LG

Official code: epfml/schedules-and-scaling (94 stars, MIT, last commit 2024-10-30).

Abstract

Scale has become a main ingredient in obtaining strong machine learning models. As a result, understanding a model's scaling properties is key to effectively designing both the right training setup as well as future generations of architectures. In this work, we argue that scale and training research has been needlessly complex due to reliance on the cosine schedule, which prevents training across different lengths for the same model size. We investigate the training behavior of a direct alternative -- constant learning rate and cooldowns -- and find that it scales predictably and reliably similar to cosine. Additionally, we show that stochastic weight averaging yields improved performance along the training trajectory, without additional training costs, across different scales. Importantly, with these findings we demonstrate that scaling experiments can be performed with significantly reduced compute and GPU hours by utilizing fewer but reusable training runs. Our code is available at \url{https://github.com/epfml/schedules-and-scaling/}.

View on arXivView PDF

Code Implementations(1)

MIT

Code for NeurIPS 2024 Spotlight: "Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations"

948Python, Jupyter NotebookMay 29, 20241 years agoMIT

Cite this paper

@article{hgele2024scaling,
  title  = {Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations},
  author = {Alexander Hägele and Elie Bakouch and Atli Kosson and Loubna Ben Allal and Leandro Von Werra and Martin Jaggi},
  year   = {2024},
  eprint = {2405.18392},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.18392},
  url    = {http://arxiv.org/abs/2405.18392v3},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.18392.svg)](https://codeofpaper.com/paper/2405.18392)

Discussion