Scaling Law for Language Models Training Considering Batch Size

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Shuai, Xian, Wang, Yiding, Wu, Yimeng, Jiang, Xin, Ren, Xiaozhe
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916503000973312
author Shuai, Xian
Wang, Yiding
Wu, Yimeng
Jiang, Xin
Ren, Xiaozhe
author_facet Shuai, Xian
Wang, Yiding
Wu, Yimeng
Jiang, Xin
Ren, Xiaozhe
contents Large language models (LLMs) have made remarkable advances in recent years, with scaling laws playing a critical role in this rapid progress. In this paper, we empirically investigate how a critical hyper-parameter, i.e., the global batch size, influences the LLM training prdocess. We begin by training language models ranging from 125 million to 2.6 billion parameters, using up to 300 billion high-quality tokens. Through these experiments, we establish a basic scaling law on model size and training data amount. We then examine how varying batch sizes and learning rates affect the convergence and generalization of these models. Our analysis yields batch size scaling laws under two different cases: with a fixed compute budget, and with a fixed amount of training data. Extrapolation experiments on models of increasing sizes validate our predicted laws, which provides guidance for optimizing LLM training strategies under specific resource constraints.
format Preprint
id arxiv_https___arxiv_org_abs_2412_01505
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Scaling Law for Language Models Training Considering Batch Size
Shuai, Xian
Wang, Yiding
Wu, Yimeng
Jiang, Xin
Ren, Xiaozhe
Computation and Language
Machine Learning
Large language models (LLMs) have made remarkable advances in recent years, with scaling laws playing a critical role in this rapid progress. In this paper, we empirically investigate how a critical hyper-parameter, i.e., the global batch size, influences the LLM training prdocess. We begin by training language models ranging from 125 million to 2.6 billion parameters, using up to 300 billion high-quality tokens. Through these experiments, we establish a basic scaling law on model size and training data amount. We then examine how varying batch sizes and learning rates affect the convergence and generalization of these models. Our analysis yields batch size scaling laws under two different cases: with a fixed compute budget, and with a fixed amount of training data. Extrapolation experiments on models of increasing sizes validate our predicted laws, which provides guidance for optimizing LLM training strategies under specific resource constraints.
title Scaling Law for Language Models Training Considering Batch Size
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2412.01505