根据样本损失动态调整权重,让大模型训练更高效
Dynamic Loss-Based Sample Reweighting for Improved Large Language Model Pretraining
- 按样本当前损失值在线调整权重,动态聚焦重要数据
- 在7B和1.4B模型上实现更快收敛与性能提升
- 首次给出损失重加权对优化收敛的影响理论分析
在海量异构数据上预训练大语言模型(LLM)是获得优异下游性能的关键。然而,现有训练方法对所有样本一视同仁,忽视了样本在训练过程中的重要性变化。现有重加权策略多基于群体层级重要性,无法利用细粒度实例级信息,且不随训练进程动态调整。本文提出新型动态实例级重加权算法,基于样本当前损失值在线调整权重,使模型在不同训练阶段聚焦更具信息量的样本。特别地,我们的框架可系统设计优先忽略冗余或无信息数据的策略,实验证明此类方法效果最佳。此外,我们构建了新的理论框架,首次形式化分析损失重加权对梯度优化收敛的影响,给出收敛边界分析。我们在多种任务上验证方法有效性,涵盖7B和1.4B参数的LLM预训练、小规模语言模型及线性回归问题,结果表明该方法能显著加快收敛并提升性能。
原文摘要 · Abstract (English)
Pretraining large language models (LLMs) on vast and heterogeneous datasets is crucial for achieving state-of-the-art performance across diverse downstream tasks. However, current training paradigms treat all samples equally, overlooking the importance or relevance of individual samples throughout the training process. Existing reweighting strategies, which primarily focus on group-level data importance, fail to leverage fine-grained instance-level information and do not adapt dynamically to individual sample importance as training progresses. In this paper, we introduce novel algorithms for dynamic, instance-level data reweighting aimed at improving both the efficiency and effectiveness of LLM pretraining. Our methods adjust the weight of each training sample based on its loss value in an online fashion, allowing the model to dynamically focus on more informative or important samples at the current training stage. In particular, our framework allows us to systematically devise reweighting strategies deprioritizing redundant or uninformative data, which we find tend to work best. Furthermore, we develop a new theoretical framework for analyzing the impact of loss-based reweighting on the convergence of gradient-based optimization, providing the first formal characterization of how these strategies affect convergence bounds. We empirically validate our approach across a spectrum of tasks, from pretraining 7B and 1.4B parameter LLMs to smaller-scale language models and linear regression problems, demonstrating that our loss-based reweighting approach can lead to faster convergence and significantly improved performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。