arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.06733cs.LGcs.AI
收藏

基于动态损失的样本重加权以改进大语言模型预训练

Dynamic Loss-Based Sample Reweighting for Improved Large Language Model Pretraining

The Ohio State University(俄亥俄州立大学);Technical University of Munich(慕尼黑工业大学);IBM Research(IBM研究院);University of Toronto(多伦多大学)

Daouda Sow, Herbert Woisetschläger, Saikiran Bulusu, Shiqiang Wang, Hans-Arno Jacobsen, Yingbin Liang

AI总结:

针对LLM预训练中样本权重未动态调整的问题,提出基于损失的动态实例级重加权算法,通过在线调整样本权重聚焦重要样本,经理论分析和实证验证,可提升预训练效率与性能。

摘要:

在海量且异构的数据集上预训练大语言模型(LLMs)对于在各种下游任务中实现最先进的性能至关重要。然而,当前的训练范式平等对待所有样本,忽视了训练过程中单个样本的重要性或相关性。现有的重加权策略主要关注组级数据重要性,未能利用细粒度的实例级信息,也没有随着训练的进展动态适应单个样本的重要性。在本文中,我们引入了用于动态、实例级数据重加权的新算法,旨在提高LLM预训练的效率和有效性。我们的方法基于每个训练样本的损失值在线调整其权重,允许模型在当前训练阶段动态关注更具信息性或更重要的样本。特别是,我们的框架使我们能够系统地设计重加权策略,降低冗余或无信息数据的优先级,我们发现这种策略效果最佳。此外,我们开发了一个新的理论框架,用于分析基于损失的重加权对基于梯度的优化收敛性的影响,首次正式表征了这些策略如何影响收敛边界。我们在从预训练7B和1.4B参数的LLMs到小规模语言模型和线性回归问题的一系列任务中进行了实证验证,证明我们的基于损失的重加权方法可以实现更快的收敛和显著改进的性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑