Research Papers 论文研究 7d ago Updated 7d ago 更新于 7天前 49

How to Allocate Your Tokens? Scaling Laws with Training Steps and Batch Size 如何分配你的Token?训练步长与批大小的缩放定律

Introduces a "three-term scaling law" that explicitly decomposes training compute into model size, total tokens, and the split between training steps and batch size. Demonstrates that this formulation accurately recovers the scaling behavior of optimal batch sizes across various training configurations. Shows that the law can be robustly fitted using significantly fewer training runs by leveraging data from suboptimal batch sizes. Validates the approach by deriving scaling laws for suboptimal ba 提出“三项定律”(Three-term Law),将缩放定律中的训练数据显式拆分为训练步数(Training Steps)和批量大小(Batch Size)。 该定律能准确恢复最优批量大小的缩放规律,并兼容次优批量大小的场景。 利用包含次优批量大小的训练运行数据,使得在显著减少训练实验数量的情况下仍能稳健地拟合缩放定律。 推导出的次优批量大小缩放定律与之前关于临界批量大小(Critical Batch Size)的经验发现相吻合。

65
Hot 热度
75
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • Introduces a "three-term scaling law" that explicitly decomposes training compute into model size, total tokens, and the split between training steps and batch size.
  • Demonstrates that this formulation accurately recovers the scaling behavior of optimal batch sizes across various training configurations.
  • Shows that the law can be robustly fitted using significantly fewer training runs by leveraging data from suboptimal batch sizes.
  • Validates the approach by deriving scaling laws for suboptimal batch sizes, aligning with established empirical findings on critical batch size.

Why It Matters

This research provides a more granular framework for optimizing training efficiency, allowing practitioners to better predict performance based on specific choices of batch size versus training steps. By enabling robust fitting with fewer experiments, it reduces the computational cost of hyperparameter tuning and scaling law derivation. This is particularly relevant for resource-constrained environments where exhaustive grid searches over batch sizes are prohibitive.

Technical Details

  • Three-Term Law: The core contribution is a scaling law that treats model size, total training tokens, and the ratio of batch size to training steps as distinct variables, rather than lumping them into a single compute budget.
  • Suboptimal Data Utilization: Unlike traditional scaling laws that often require optimal or near-optimal configurations, this method incorporates runs with suboptimal batch sizes, increasing data efficiency for model fitting.
  • Empirical Validation: The authors fit the proposed law on a large set of training runs, confirming it correctly predicts the scaling of the optimal batch size.
  • Critical Batch Size Alignment: The derived scaling laws for suboptimal configurations match previous empirical observations regarding the critical batch size phenomenon, reinforcing the theoretical consistency of the approach.

Industry Insight

  • Efficient Hyperparameter Search: Teams can reduce the number of required ablation studies for batch size selection by using this law to extrapolate from a smaller set of training runs, saving significant GPU hours.
  • Compute Allocation Strategy: The explicit separation of steps and batch size offers clearer guidance on how to allocate fixed compute budgets, helping engineers decide whether to increase parallelism (batch size) or duration (steps) for maximum performance.
  • Standardization of Scaling Metrics: As the field moves toward larger models, adopting more nuanced scaling laws like this one may become standard practice to ensure fair comparisons and efficient resource utilization across different hardware constraints.

TL;DR

  • 提出“三项定律”(Three-term Law),将缩放定律中的训练数据显式拆分为训练步数(Training Steps)和批量大小(Batch Size)。
  • 该定律能准确恢复最优批量大小的缩放规律,并兼容次优批量大小的场景。
  • 利用包含次优批量大小的训练运行数据,使得在显著减少训练实验数量的情况下仍能稳健地拟合缩放定律。
  • 推导出的次优批量大小缩放定律与之前关于临界批量大小(Critical Batch Size)的经验发现相吻合。

为什么值得看

本文通过解构训练数据为步数和批量大小,提供了更精细的模型缩放预测工具,有助于优化计算资源分配。对于AI从业者而言,理解这一规律可以在减少实验成本的同时,更准确地规划大规模模型的训练策略。

技术解析

  • 三项定律架构:传统的Chinchilla缩放定律通常关注模型参数、数据和计算总量。本研究提出的新定律明确区分了总数据量中的“训练步数”和“批量大小”两个维度,建立了三者之间的数学关系。
  • 数据拟合效率:通过纳入非最优批量大小的训练数据进行拟合,证明了该方法对数据噪声和不完美实验设置的鲁棒性。这意味着在实际工程中,无需进行 exhaustive search(穷举搜索)即可确定最佳配置。
  • 临界批量大小验证:研究结果重现了关于临界批量大小的经典经验法则,即批量大小存在一个随模型规模变化的阈值,超过该阈值后收益递减。这为新定律的理论一致性提供了实证支持。

行业启示

  • 训练策略优化:在规划大模型训练时,不应仅关注总Token数,而应结合“三项定律”动态调整批量大小与迭代步数的比例,以最大化单位算力的性能增益。
  • 降低实验成本:利用该定律可以通过较少的预训练实验快速外推最优超参数组合,大幅减少探索阶段的算力浪费,加速模型迭代周期。
  • 资源分配标准化:随着缩放定律的细化,行业可能趋向于建立更标准化的训练资源配置指南,特别是在混合精度训练和分布式训练场景中,批量大小的选择将成为关键的性能瓶颈指标。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Training 训练 LLM 大模型 Research 科学研究