Predictable Scale: Part I, Step Law -- Optimal Hyperparameter Scaling Law in Large Language Model Pretraining

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Li, Houyi, Zheng, Wenzhen, Wang, Qiufeng, Zhang, Hanshan, Wang, Zili, Xuyang, Shijie, Fan, Yuantao, Ding, Zhenyu, Wang, Haoying, Ding, Ning, Zhou, Shuigeng, Zhang, Xiangyu, Jiang, Daxin
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915450945798144
author Li, Houyi
Zheng, Wenzhen
Wang, Qiufeng
Zhang, Hanshan
Wang, Zili
Xuyang, Shijie
Fan, Yuantao
Ding, Zhenyu
Wang, Haoying
Ding, Ning
Zhou, Shuigeng
Zhang, Xiangyu
Jiang, Daxin
author_facet Li, Houyi
Zheng, Wenzhen
Wang, Qiufeng
Zhang, Hanshan
Wang, Zili
Xuyang, Shijie
Fan, Yuantao
Ding, Zhenyu
Wang, Haoying
Ding, Ning
Zhou, Shuigeng
Zhang, Xiangyu
Jiang, Daxin
contents The impressive capabilities of Large Language Models (LLMs) across diverse tasks are now well established, yet their effective deployment necessitates careful hyperparameter optimization. Although existing methods have explored the influence of hyperparameters on model performance, a principled and generalizable framework across model architectures and data recipes remains absent. In this study, we conduct an unprecedented empirical investigation training over 3,700 LLMs from scratch across 100 trillion tokens, consuming nearly one million NVIDIA H800 GPU hours to establish a universal Scaling Law for hyperparameter optimization in LLM Pre-training, called Step Law. We empirically observe that, under fixed model size ($N$) and dataset size ($D$), the hyperparameter landscape exhibits convexity with a broad optimum, substantially reducing the complexity of hyperparameter search. Building on this insight, we formally define and empirically validate the Step Law: The optimal learning rate follows a power-law relationship with $N$ and $D$, while the optimal batch size is primarily influenced by $D$ and remains largely invariant to $N$.Notably, our estimated optima deviate from the global best performance found via exhaustive search by merely 0.094\% on the test set. To our best known, Step Law is the first that unifies different model shapes and structures, such as Mixture-of-Experts models and dense transformers, as well as establishes optimal hyperparameter scaling laws across diverse data recipes. We contribute a universal, plug-and-play optimal hyperparameter tool for the community, which is expected to advance efficient LLM training at scale. All experimental code, data and checkpoints are publicly available at https://github.com/step-law/steplaw
format Preprint
id arxiv_https___arxiv_org_abs_2503_04715
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Predictable Scale: Part I, Step Law -- Optimal Hyperparameter Scaling Law in Large Language Model Pretraining
Li, Houyi
Zheng, Wenzhen
Wang, Qiufeng
Zhang, Hanshan
Wang, Zili
Xuyang, Shijie
Fan, Yuantao
Ding, Zhenyu
Wang, Haoying
Ding, Ning
Zhou, Shuigeng
Zhang, Xiangyu
Jiang, Daxin
Machine Learning
Artificial Intelligence
F.2.2; I.2.7
The impressive capabilities of Large Language Models (LLMs) across diverse tasks are now well established, yet their effective deployment necessitates careful hyperparameter optimization. Although existing methods have explored the influence of hyperparameters on model performance, a principled and generalizable framework across model architectures and data recipes remains absent. In this study, we conduct an unprecedented empirical investigation training over 3,700 LLMs from scratch across 100 trillion tokens, consuming nearly one million NVIDIA H800 GPU hours to establish a universal Scaling Law for hyperparameter optimization in LLM Pre-training, called Step Law. We empirically observe that, under fixed model size ($N$) and dataset size ($D$), the hyperparameter landscape exhibits convexity with a broad optimum, substantially reducing the complexity of hyperparameter search. Building on this insight, we formally define and empirically validate the Step Law: The optimal learning rate follows a power-law relationship with $N$ and $D$, while the optimal batch size is primarily influenced by $D$ and remains largely invariant to $N$.Notably, our estimated optima deviate from the global best performance found via exhaustive search by merely 0.094\% on the test set. To our best known, Step Law is the first that unifies different model shapes and structures, such as Mixture-of-Experts models and dense transformers, as well as establishes optimal hyperparameter scaling laws across diverse data recipes. We contribute a universal, plug-and-play optimal hyperparameter tool for the community, which is expected to advance efficient LLM training at scale. All experimental code, data and checkpoints are publicly available at https://github.com/step-law/steplaw
title Predictable Scale: Part I, Step Law -- Optimal Hyperparameter Scaling Law in Large Language Model Pretraining
topic Machine Learning
Artificial Intelligence
F.2.2; I.2.7
url https://arxiv.org/abs/2503.04715