Introduction
In the development of Large Language Models (LLMs), "Scaling Laws" serve as critical blueprints, defining the relationship between compute budget ($C$), model parameters ($N$), and training data ($D$). While established frameworks like those from OpenAI and DeepMind provide foundational guidance, they often treat the global batch size ($B$) as a secondary heuristic. However, batch size is a primary lever in training efficiency; an suboptimal choice can lead to wasted hardware cycles or poor model generalization.
Researchers from Huawei Noah’s Ark Lab have addressed this gap by extending scaling laws to explicitly incorporate batch size and learning rate (LR). By training models ranging from 125M to 7B parameters on the Huawei Ascend infrastructure, they provide a roadmap for optimizing these hyper-parameters before commencing expensive, large-scale training runs.
Methodology and Baseline Scaling
The study was conducted in three distinct stages. First, the team established a baseline by training GPT-series models (125M to 2.6B parameters) on up to 300B tokens to define the standard $L(N, D)$ relationship.
Following the baseline, a systematic grid search was performed, varying batch sizes up to 32M tokens and testing multiple learning rate scaling schemes (original, square-root, and linear). Finally, the derived laws were extrapolated to predict the performance of 4.3B and 7B models, validating the "optimal" configurations against industry-standard heuristics.
Key Insights: The Gradient Noise Scale and Optimal Batch Size
A central concept in this research is the "Gradient Noise Scale." Increasing the batch size reduces gradient noise, which allows for higher learning rates and faster convergence in terms of optimizer steps. However, there exists a critical point ($B_{crit}$) where further increases in batch size yield diminishing returns in compute efficiency.
The study reveals that the optimal batch size ($B_{opt}$) is not a fixed value but scales sub-linearly with the amount of training data: $$B_{opt} \approx 3.24 \times 10^3 \cdot D^{0.264}$$
Furthermore, the researchers found that the optimal learning rate ($LR_{opt}$) scales sub-linearly with batch size ($LR_{opt} \propto B^\gamma$, where $0.75 < \gamma < 1$), eventually plateauing due to stability limits. This contradicts the common practice of purely linear LR scaling.
Empirical Results and Validation
The authors derived refined scaling coefficients for the loss function, suggesting that modern models are more "data-hungry" than previously thought, aligning with recent trends like Llama-3. For a fixed compute budget $C$, the optimal allocation follows the power laws illustrated below:
The derived loss function is expressed as: $$L(N, D) = 1.48 + \frac{314.35}{N^{0.331}} + \frac{460.51}{D^{0.286}}$$
The practical utility of these laws was demonstrated in extrapolation tests. A 4.49B model trained using the predicted optimal batch size (1M tokens) and data volume (303B tokens) achieved a 60.9% average accuracy across benchmarks like MMLU and HellaSwag. This outperformed a larger 6.8B model (58.8% accuracy) trained with standard heuristics under the same total compute budget.
Conclusion and Future Work
This research provides a rigorous empirical framework for selecting batch sizes and learning rates in LLM training. By showing that smaller models trained on more data with optimized batch sizes can outperform larger, less efficiently trained counterparts, the study offers significant cost-saving potential for the AI community. Future work may involve extending these laws to frontier-scale models (100B+) and exploring additional hyper-parameters such as AdamW $eta_2$ and complex decay schedules.
Summary updated