发现训练越久学习率应越低,可用规律精准迁移。
Scaling Optimal LR Across Token Horizons
- 发现最优学习率随训练长度(token horizon)下降,长训练需更小学习率。
- 提出学习率缩放规律,可从短训练推算长训练的最优学习率。
- 给出零成本迁移规则,适合大规模模型训练调参者使用。
当前顶尖大模型依赖于规模扩展——模型规模、数据集规模和集群规模的扩大。但对最大规模训练进行广泛超参数调优在经济上不可行,因此必须从较小实验中推断或转移近似最优的超参数。已有研究关注模型规模间的超参数迁移,但数据规模(即token训练时长)之间的迁移尚未被系统研究。本文通过大规模实证研究,揭示了最优学习率(LR)与训练时长(token horizon)之间的依赖关系:训练越久,最优学习率越低。进一步发现,最优学习率遵循可预测的缩放规律,且可通过短训练结果准确估计长训练所需的最优学习率。我们还提出了一个无需额外开销的迁移规则,可直接应用于现有实践。最后,我们证明了LLama-1使用的学习率过高,并估算由此带来的性能损失。因此,我们认为跨数据规模的超参数迁移是大模型训练中重要且被忽视的一环。
原文摘要 · Abstract (English)
State-of-the-art LLMs are powered by scaling -- scaling model size, dataset size and cluster size. It is economically infeasible to extensively tune hyperparameter for the largest runs. Instead, approximately optimal hyperparameters must be inferred or \textit{transferred} from smaller experiments. Hyperparameter transfer across model sizes has been studied in Yang et al. However, hyperparameter transfer across dataset size -- or token horizon -- has not been studied yet. To remedy this we conduct a large scale empirical study on how optimal learning rate (LR) depends on token horizon in LLM training. We first demonstrate that the optimal LR changes significantly with token horizon -- longer training necessitates smaller LR. Secondly we demonstrate the the optimal LR follows a scaling law, and that the optimal LR for longer horizons can be accurately estimated from shorter horizons via such scaling laws. We also provide a rule-of-thumb for transferring LR across token horizons with zero overhead over current practices. Lastly we provide evidence that LLama-1 used too high LR, and estimate the performance hit from this. We thus argue that hyperparameter transfer across data size is an important and overlooked component of LLM training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。