LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
作者: Nicholas Lee, Thanakul Wattanawong, Sehoon Kim, Karttikeya Mangalam, Sheng Shen, Gopala Anumanchipalli, Michael W. Mahoney, Kurt Keutzer, Amir Gholami
分类: cs.CL
发布日期: 2024-03-22 (更新: 2024-07-13)
备注: ACL 2024
🔗 代码/项目: GITHUB
💡 一句话要点
提出LLM2LLM以解决低数据环境下的LLM微调问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 数据增强 微调 低数据环境 自然语言处理 合成数据 教师模型
📋 核心要点
- 现有的微调方法在低数据环境下表现不佳,导致模型性能受限,难以满足实际应用需求。
- LLM2LLM通过教师模型生成合成数据,增强初始种子数据集,专注于模型错误的样本,从而提高微调效果。
- 在GSM8K、CaseHOLD、SNIPS、TREC和SST-2等数据集上,LLM2LLM相较于常规微调实现了最高24.2%到52.6%的性能提升。
📝 摘要(中文)
预训练的大型语言模型(LLMs)在自然语言处理任务中表现出色,但在低数据环境下进行微调仍然具有挑战性。为此,本文提出LLM2LLM,一种有针对性的迭代数据增强策略,通过教师LLM增强小型种子数据集,生成用于特定任务微调的额外数据。LLM2LLM通过对初始种子数据微调基线学生LLM,评估并提取模型错误的数据点,利用教师LLM生成合成数据,重新整合进训练数据中。实验结果表明,LLM2LLM在低数据环境下显著提升了LLM的性能,超越了传统微调和其他数据增强基线,减少了对劳动密集型数据整理的依赖。
🔬 方法详解
问题定义:本文旨在解决在低数据环境下对大型语言模型(LLMs)进行有效微调的问题。现有方法在数据稀缺时难以达到满意的性能,限制了其在实际应用中的有效性。
核心思路:LLM2LLM的核心思路是利用教师LLM生成合成数据,增强初始种子数据集,特别关注模型在训练中错误预测的数据点,以此提升微调效果。
技术框架:LLM2LLM的整体架构包括三个主要阶段:首先对初始种子数据进行微调,接着评估模型并提取错误数据点,最后利用教师LLM生成合成数据并将其整合回训练数据中。
关键创新:LLM2LLM的创新在于其迭代数据增强策略,通过聚焦于模型错误的样本,显著提升了微调效果。这一方法与传统的微调方式本质上不同,后者通常依赖于固定的数据集。
关键设计:在实现过程中,LLM2LLM使用了特定的损失函数来优化模型对错误样本的学习,并通过教师模型生成多样化的合成数据,以确保训练数据的丰富性和挑战性。
🖼️ 关键图片
📊 实验亮点
实验结果显示,LLM2LLM在多个数据集上显著提升了模型性能,其中GSM8K数据集提升了24.2%,CaseHOLD提升了32.6%,SNIPS提升了32.0%,TREC提升了52.6%,SST-2提升了39.8%。这些结果表明LLM2LLM在低数据环境下的有效性,超越了传统微调和其他数据增强方法。
🎯 应用场景
LLM2LLM的研究成果具有广泛的应用潜力,尤其是在数据稀缺的领域,如医疗文本分析、法律文书处理和低资源语言的自然语言处理任务。通过减少对大量标注数据的依赖,该方法能够帮助研究人员和开发者在资源受限的情况下构建高性能的语言模型,推动相关领域的发展。
📄 摘要(原文)
Pretrained large language models (LLMs) are currently state-of-the-art for solving the vast majority of natural language processing tasks. While many real-world applications still require fine-tuning to reach satisfactory levels of performance, many of them are in the low-data regime, making fine-tuning challenging. To address this, we propose LLM2LLM, a targeted and iterative data augmentation strategy that uses a teacher LLM to enhance a small seed dataset by augmenting additional data that can be used for fine-tuning on a specific task. LLM2LLM (1) fine-tunes a baseline student LLM on the initial seed data, (2) evaluates and extracts data points that the model gets wrong, and (3) uses a teacher LLM to generate synthetic data based on these incorrect data points, which are then added back into the training data. This approach amplifies the signal from incorrectly predicted data points by the LLM during training and reintegrates them into the dataset to focus on more challenging examples for the LLM. Our results show that LLM2LLM significantly enhances the performance of LLMs in the low-data regime, outperforming both traditional fine-tuning and other data augmentation baselines. LLM2LLM reduces the dependence on labor-intensive data curation and paves the way for more scalable and performant LLM solutions, allowing us to tackle data-constrained domains and tasks. We achieve improvements up to 24.2% on the GSM8K dataset, 32.6% on CaseHOLD, 32.0% on SNIPS, 52.6% on TREC and 39.8% on SST-2 over regular fine-tuning in the low-data regime using a Llama-2-7B student model. Our code is available at https://github.com/SqueezeAILab/LLM2LLM .