arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.05838cs.LGcs.AI
收藏

时间迁移:无限数据极限下的最优学习率与批量大小

Time Transfer: On Optimal Learning Rate and Batch Size In The Infinite Data Limit

Oleg Filatov, Jan Ebert, Jiangtao Wang, Stefan Kesselheim

AI总结:

本文研究无限数据极限下 LLM 的学习率与批量大小扩展,揭示临界批量随 token 预算增长,并证明 μP 可保持最优动态。

摘要:

大型语言模型(LLM)最优扩展中的主要挑战之一是超参数调优成本高昂,尤其是学习率 η 和批量大小 B。尽管 μP(Yang 等人,2022)等技术为无限模型规模极限下的最优 η 迁移提供了扩展规则,但无限数据规模极限下的最优扩展行为仍不清楚。我们填补了这一空白:首次观察到最优 η 扩展对预训练 token 预算 T、B 及其与临界批量大小 B_crit 关系的复杂依赖;我们测得 B_crit 随 T 演化为 B_crit ∝ T。此外,我们表明最优批量大小与 B_crit 正相关:即使学习率得到最优扩展,随时间推移保持批量大小固定也会变得次优。令人惊讶的是,我们的结果证明,观察到的最优 η 和 B 动态在 μP 模型扩展下得以保持,这挑战了 B_crit 仅依赖于损失值的传统观点。作为最优性的补充,我们考察了损失对学习率变化的敏感性,发现该敏感性随 T 增加而下降,并在 μP 模型扩展下保持恒定。我们希望这些结果能迈向数据与模型联合最优扩展统一图景的第一步。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑