arXiv:2410.08527cs.CLcs.AI2024-10中稿 · TMLR被引 57

用小模型预训练损失预测大模型下游性能,误差低于10%。

Scaling Laws for Predicting Downstream Performance in LLMs

  • 先用小模型拟合计算量与损失的关系,再映射到下游任务表现。
  • 7B/13B模型预测误差仅5%/10%,优于直接用算力预测。
  • 支持多数据源混合训练,适合实际开发中的模型选型。

在大规模语言模型(LLM)训练前精确估计下游性能对开发流程至关重要。传统缩放定律依赖小规模采样模型的统计信息预测目标模型表现,但面临模型涌现能力带来的挑战。本文提出两阶段方法FLP:首先利用一系列完全收敛的小模型,建立计算资源(如FLOPs)与预训练损失之间的函数关系;随后通过具备涌现性能的中间模型,将预训练损失映射至下游任务性能。实验表明,仅使用最高达3B参数的小模型,FLP可准确预测7B和13B模型的表现,误差分别控制在5%和10%以内,显著优于直接基于FLOPs的预测方法。进一步提出的FLP-M则面向多数据源联合预训练场景,将幂律函数扩展至跨数据源的领域特定预训练损失预测,并采用双层神经网络建模多个领域损失与下游性能间的非线性关系。利用3B模型在特定数据比例下的训练结果及一系列更小采样模型,FLP-M可在多数基准上以10%以内误差有效预测3B和7B模型在不同数据混合下的表现。

原文摘要 · Abstract (English)

Precise estimation of downstream performance in large language models (LLMs) prior to training is essential for guiding their development process. Scaling laws analysis utilizes the statistics of a series of significantly smaller sampling language models (LMs) to predict the performance of the target LLM. For downstream performance prediction, the critical challenge lies in the emergent abilities in LLMs that occur beyond task-specific computational thresholds. In this work, we focus on the pre-training loss as a more computation-efficient metric for performance estimation. Our two-stage approach FLP consists of first estimating a function that maps computational resources (e.g., FLOPs) to the pre-training Loss using a series of fully-converged sampling models, followed by mapping the pre-training loss to downstream task Performance using the intermediate models with emerged performance. In our experiments, this FLP solution accurately predicts the performance of LLMs with 7B and 13B parameters using a series of sampling LMs up to 3B, achieving error margins of 5% and 10%, respectively, and significantly outperforming the FLOPs-to-Performance approach. Further, we present FLP-M, a fundamental approach for performance prediction that addresses the practical need to integrate datasets from multiple sources during pre-training. FLP-M extends the power law analytical function to predict domain-specific pre-training loss based on FLOPs across data sources, and employs a two-layer neural network to model the non-linear relationship between multiple domain-specific loss and downstream performance. By utilizing a 3B LLM trained on a specific ratio and a series of smaller sampling LMs, FLP-M can effectively forecast the performance of 3B and 7B LLMs across various data mixtures for most benchmarks within 10% error margins.

大模型性能预测缩放定律训练效率

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。