Supervised fine-tuning (SFT) is a commonly used technique to adapt large language models (LLMs) to downstream tasks. In practice, SFT on a full dataset is computationally expensive and sometimes suffers from overfitting or bias amplification. This facilitates the rise of data curation in SFT, which prioritizes the most valuable data to optimze. This work studies the online batch selection family that dynamically scores and filters samples during the training process. However, existing popular methods often (i) rely merely on the utility of data to select a subset while neglecting other crucial factors like diversity, (ii) rely on external resources such as reference models or validation sets, and (iii) incur extra training time over full-dataset training. To address these limitations, this work develops \textbf{UDS (Utility-Diversity Sampling)}, a framework for efficient online batch selection in SFT. UDS leverages the nuclear norm of the logits matrix to capture both data utility and intra-sample diversity, while estimating inter-sample diversity through efficient low-dimensional embedding comparisons with a lightweight memory buffer of historical samples. Such a design eliminates the need for external resources and unnecessary backpropagation, securing computational efficiency. Experiments on multiple benchmarks demonstrate that UDS consistently outperforms state-of-the-art online batch selection methods under varying data budgets, and significantly reduces training time compared to full-dataset fine-tuning. Code is available at https://github.com/gfyddha/UDS.


翻译:监督微调是一种常用的技术,用于使大语言模型适应下游任务。在实践中,对整个数据集进行监督微调计算成本高昂,有时还会出现过拟合或偏差放大的问题。这促进了监督微调中数据筛选的兴起,即优先选择最有价值的数据进行优化。本研究探讨了在线批次选择方法族,其在训练过程中动态地对样本进行评分和筛选。然而,现有的流行方法通常(i)仅依赖数据的效用选择子集,而忽视了多样性等其他关键因素;(ii)依赖外部资源,如参考模型或验证集;以及(iii)相比全数据集训练会产生额外的训练时间。为了解决这些局限性,本研究提出了**UDS(效用-多样性采样)**,一个用于监督微调中高效在线批次选择的框架。UDS利用对数矩阵的核范数来捕获数据效用和样本内多样性,同时通过与一个轻量级历史样本内存缓冲区进行高效的低维嵌入比较来估计样本间多样性。这种设计消除了对外部资源和不必要反向传播的需求,确保了计算效率。在多个基准测试上的实验表明,在不同数据预算下,UDS始终优于最先进的在线批次选择方法,并且与全数据集微调相比,显著减少了训练时间。代码可在 https://github.com/gfyddha/UDS 获取。

0
下载
关闭预览

相关内容

【ICML2023】SEGA:结构熵引导的图对比学习锚视图
专知会员服务
23+阅读 · 2023年5月10日
论文浅尝 | Know-Evolve: Deep Temporal Reasoning for Dynamic KG
开放知识图谱
36+阅读 · 2018年3月30日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关基金
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员