Time Transfer: On Optimal Learning Rate and Batch Size In The Infinite Data Limit
Oleg Filatov, Jan Ebert, Jiangtao Wang, Stefan Kesselheim
TL;DR
The paper addresses optimal joint scaling of learning rate $\eta$ and batch size $B$ in the infinite data limit for pretraining transformers, using μP and μTransfer to test transfer across data horizons. It introduces a parametric fit for the optimal rate, $\eta^*(T,B)$, with a time-dependent critical batch size $B_{\mathrm{crit}}(T)$ that grows roughly as $B_{\mathrm{crit}} \propto T$, and shows that optimal batch size $B^*(T)$ increases with $T$ while remaining below $B_{\mathrm{crit}}(T)$; learning-rate sensitivity to suboptimal $\eta$ decreases as $T$ increases and is largely unchanged under μP. These results persist under μP scaling, suggesting a unified joint data-model scaling picture and hinting at invariants such as the noise scale that could govern hyperparameter transfer in the combined infinite data and model size limit. The findings have practical implications for hyperparameter tuning in large-scale pretraining and motivate future theoretical work to formalize joint data-horizon and width-based invariants for scalable learning.
Abstract
One of the main challenges in optimal scaling of large language models (LLMs) is the prohibitive cost of hyperparameter tuning, particularly learning rate $η$ and batch size $B$. While techniques like $μ$P (Yang et al., 2022) provide scaling rules for optimal $η$ transfer in the infinite model size limit, the optimal scaling behavior in the infinite data size limit remains unknown. We fill in this gap by observing for the first time an intricate dependence of optimal $η$ scaling on the pretraining token budget $T$, $B$ and its relation to the critical batch size $B_\mathrm{crit}$, which we measure to evolve as $B_\mathrm{crit} \propto T$. Furthermore, we show that the optimal batch size is positively correlated with $B_\mathrm{crit}$: keeping it fixed becomes suboptimal over time even if learning rate is scaled optimally. Surprisingly, our results demonstrate that the observed optimal $η$ and $B$ dynamics are preserved with $μ$P model scaling, challenging the conventional view of $B_\mathrm{crit}$ dependence solely on loss value. Complementing optimality, we examine the sensitivity of loss to changes in learning rate, where we find the sensitivity to decrease with increase of $T$ and to remain constant with $μ$P model scaling. We hope our results make the first step towards a unified picture of the joint optimal data and model scaling.
