The concept of Critical Batch Size, as pioneered by OpenAI, has long served as a foundational principle for large-scale pre-training. However, with the paradigm shift towards the Warmup-Stable-Decay (WSD) learning rate scheduler, we observe that the original theoretical framework and its underlying mechanisms fail to align with new pre-training dynamics. To bridge this gap between theory and practice, this paper derives a revised E(S) relationship tailored for WSD scheduler, characterizing the trade-off between training data consumption E and steps S during pre-training. Our theoretical analysis reveals two fundamental properties of WSD-based pre-training: 1) B_min, the minimum batch size threshold required to achieve a target loss, and 2) B_opt, the optimal batch size that maximizes data efficiency by minimizing total tokens. Building upon these properties, we propose a dynamic Batch Size Scheduler. Extensive experiments demonstrate that our revised formula precisely captures the dynamics of large-scale pre-training, and the resulting scheduling strategy significantly enhances both training efficiency and final model quality.


翻译:由OpenAI开创的临界批量大小概念,长期以来一直作为大规模预训练的基础原则。然而,随着学习率调度器范式向Warmup-Stable-Decay(WSD)转变,我们观察到原有的理论框架及其内在机制已无法适应新的预训练动态。为弥合理论与实践之间的差距,本文推导出了一个专为WSD调度器定制的修正版E(S)关系式,用以刻画预训练过程中训练数据消耗量E与训练步数S之间的权衡。我们的理论分析揭示了基于WSD的预训练具有两个基本性质:1) B_min,即达到目标损失所需的最小批量大小阈值;2) B_opt,即通过最小化总token数来最大化数据效率的最优批量大小。基于这些性质,我们提出了一种动态批量大小调度器。大量实验表明,我们的修正公式精确捕捉了大规规模预训练的动力学特性,并且由此产生的调度策略显著提升了训练效率和最终模型质量。

0
下载
关闭预览

相关内容

在搭建网络模型时,需要随机初始化参数,然后开始训练网络,不断调整直到网络的损失越来越小。在训练的过程中,一开始初始化的参数会不断变化。当参数训练到比较好的时候就可以将训练模型的参数保存下来,以便训练好的模型可以在下次执行类似任务时获得较好的结果。
预训练视觉模型的参数高效微调
专知会员服务
32+阅读 · 2024年3月19日
针对预训练视觉模型的参数高效微调
专知会员服务
22+阅读 · 2024年2月7日
【ICML2023】POUF:面向提示的大型预训练模型无监督微调
专知会员服务
39+阅读 · 2023年5月18日
小米在预训练模型的探索与优化
专知会员服务
20+阅读 · 2020年12月31日
【总结】强化学习需要批归一化(Batch Norm)吗?
深度强化学习实验室
28+阅读 · 2020年10月8日
一大批中文(BERT等)预训练模型等你认领!
PaperWeekly
15+阅读 · 2019年6月25日
训练数据多少才够用
专知
16+阅读 · 2019年5月4日
BERT-预训练的强大
微信AI
61+阅读 · 2019年3月7日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
相关VIP内容
预训练视觉模型的参数高效微调
专知会员服务
32+阅读 · 2024年3月19日
针对预训练视觉模型的参数高效微调
专知会员服务
22+阅读 · 2024年2月7日
【ICML2023】POUF:面向提示的大型预训练模型无监督微调
专知会员服务
39+阅读 · 2023年5月18日
小米在预训练模型的探索与优化
专知会员服务
20+阅读 · 2020年12月31日
相关基金
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员