提出多幂律模型,可精准预测不同学习率调度下的训练损失曲线。
A Multi-Power Law for Loss Curve Prediction Across Learning Rate Schedules
- 基于学习率总和与衰减效应构建多幂律公式。
- 仅需少量调度数据即可准确预测未见调度的损失曲线。
- 自动发现优于余弦调度的新调度方案,适合高效训练优化。
大规模模型训练耗时耗资源,理解性能与超参数的定量关系至关重要。本文提出一种经验规律,描述大语言模型在常数、余弦、阶梯衰减等不同学习率调度下的预训练损失演化。该规律采用多幂律形式,结合基于学习率总和的幂律及额外幂律以捕捉学习率衰减带来的损失下降效应。我们在多种模型规模与架构上广泛验证该规律,证明仅需拟合少数调度,即可准确预测不同形状与周期的未见调度损失曲线。通过最小化预测的最终损失,我们找到一种优于广泛使用的余弦调度的新方案。该自动发现的调度与近期提出的Warmup-Stable-Decay(WSD)调度相似,但最终损失更低。结果有助于理解预训练动态并设计更高效的调度策略。
原文摘要 · Abstract (English)
Training large models is both resource-intensive and time-consuming, making it crucial to understand the quantitative relationship between model performance and hyperparameters. In this paper, we present an empirical law that describes how the pretraining loss of large language models evolves under different learning rate schedules, such as constant, cosine, and step decay schedules. Our proposed law takes a multi-power form, combining a power law based on the sum of learning rates and additional power laws to account for a loss reduction effect induced by learning rate decay. We extensively validate this law on various model sizes and architectures, and demonstrate that after fitting on a few learning rate schedules, the law accurately predicts the loss curves for unseen schedules of different shapes and horizons. Moreover, by minimizing the predicted final pretraining loss across learning rate schedules, we are able to find a schedule that outperforms the widely used cosine learning rate schedule. Interestingly, this automatically discovered schedule bears some resemblance to the recently proposed Warmup-Stable-Decay (WSD) schedule (Hu et al, 2024) but achieves a slightly lower final loss. We believe these results could offer valuable insights for understanding the dynamics of pretraining and designing learning rate schedules to improve efficiency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。