LLM2LLM:通过新型迭代数据增强提升大语言模型性能
LLM2LLM: Boosting LLMs with Novel Iterative Data Enhancement
AI总结:
针对低数据场景下大语言模型微调效果不佳的问题,提出LLM2LLM迭代数据增强策略,通过教师模型生成错误样本的合成数据扩充训练集,显著提升多数据集上的微调性能。
摘要:
预训练大语言模型(LLM)是目前解决绝大多数自然语言处理任务的最优方法。尽管许多实际应用仍需微调才能达到令人满意的性能水平,但其中大量应用处于低数据场景,使得微调颇具挑战性。为解决这一问题,我们提出LLM2LLM,这是一种针对性的迭代数据增强策略,它利用教师LLM扩充小型种子数据集,生成可用于特定任务微调的额外数据。LLM2LLM的流程为:(1) 在初始种子数据上微调基线学生LLM;(2) 评估并提取模型预测错误的数据点;(3) 利用教师LLM基于这些错误数据点生成合成数据,再将其添加回训练数据中。该方法放大了LLM在训练过程中预测错误数据点的信号,并将其重新整合到数据集中,使模型聚焦于更具挑战性的样本。我们的结果表明,LLM2LLM显著提升了低数据场景下LLM的性能,优于传统微调和其他数据增强基线方法。LLM2LLM降低了对劳动密集型数据整理的依赖,为更具可扩展性和更高性能的LLM解决方案铺平了道路,使我们能够应对数据受限的领域和任务。在低数据场景下,使用Llama-2-7B学生模型时,我们的方法相比常规微调,在GSM8K数据集上提升最高达24.2%,在CaseHOLD上提升32.6%,在SNIPS上提升32.0%,在TREC上提升52.6%,在SST-2上提升39.8%。我们的代码可在https://github.com/SqueezeAILab/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 .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。