发现大模型微调最优超参数有可预测规律,大幅减少试错成本。
Predictable Scaling Laws of Optimal Hyperparameters for LLM Continued Pre-training

- 通过小规模实验发现超参数随计算量变化的稳定规律。
- 利用验证损失反推等效预训练算力,精准预测最优学习率和批量大小。
- 不依赖特定模型架构,适合各类大模型从任意检查点继续训练。
大语言模型持续预训练的效果高度依赖于学习率、批量大小等超参数配置。当前方法多依赖经验或网格搜索,易引发训练不稳定且成本高昂。本文首次通过实证发现,最优超参数在整个持续预训练过程中遵循稳定且可预测的缩放规律。基于此,提出两阶段新框架:(1) 通过训练小规模代理模型,利用标准损失-算力缩放定律,建立算力与最优超参数之间的量化关系;(2) 利用初始检查点的验证损失,通过逆缩放定律估算其等效预训练算力(即从零开始达到相同损失所需的算力),结合计划算力预算,预测目标训练的最优超参数。实验表明,该方法可将超参数搜索开销降低高达90%,同时性能媲美或优于基线。该方法不依赖模型架构,适用于从任意检查点出发的多样化持续预训练场景。
原文摘要 · Abstract (English)
The efficacy of continued pre-training for Large Language Models (LLMs) hinges upon hyperparameter configurations, such as learning rate and batch size. However, current practices often rely on heuristics or grid searches, leading to training instability and excessive costs. In this work, we first empirically discover that optimal hyperparameters follow stable and predictable scaling laws throughout the continued pre-training process. Leveraging these insights, we propose a novel framework to establish quantitative relationships between compute budget and optimal hyperparameters for a given checkpoint. Our approach has two stages: (1) \textit{Empirical Law Discovery}, where we train small-scale proxy models to derive functions mapping compute budget to optimal hyperparameters via standard loss-compute scaling laws; and (2) \textit{State-Aware Hyperparameter Prediction}, where we evaluate an initial checkpoint's validation loss and use the inverse scaling law to estimate its \textit{equivalent pre-training compute} -- the compute needed to achieve the same loss from scratch. Combining this with the planned compute budget, we predict optimal hyperparameters for the target run. Empirical results demonstrate that our method reduces the hyperparameter search overhead by up to 90\% while achieving comparable or superior performance relative to baselines. This model-agnostic framework generalizes across architectures, providing a principled and efficient methodology for diverse continued pre-training scenarios starting from any given point.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。