arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.04194cs.CLcs.AIcs.LG
收藏

最适合指令微调的数据是那些能适应的

The Best Instruction-Tuning Data are Those That Fit

University of Illinois Urbana–Champaign(伊利诺伊大学厄巴纳-香槟分校);University of Chicago(芝加哥大学)

Dylan Zhang, Qirun Dai, Hao Peng

AI总结:

GRAPE通过选择与目标模型分布最匹配的响应,提升大语言模型的微调效果,实验显示其在多个基准测试中表现优异。

摘要:

高质量的监督微调(SFT)数据对于从预训练大语言模型(LLMs)中激发强大能力至关重要。通常,指令会与来自其他LLMs的多个响应配对,这些响应往往不在目标模型的分布范围内。在大规模情况下,这可能导致边际收益递减,甚至损害模型的性能和鲁棒性。我们提出**GRAPE**,一种新的SFT框架,该框架考虑了目标模型的独特特性。对于每个指令,它会从各种LLMs中收集响应,并选择由目标模型测量概率最高的响应,表明其与目标模型的预训练分布最吻合;然后进行标准SFT训练。我们首先通过受控实验评估GRAPE,其中我们从UltraInteract中为每个问题采样各种解决方案,并在GRAPE选定的数据上微调常用LM,如LLaMA3.1-8B、Mistral-7B和Qwen2.5-7B。GRAPE在强基线上显著优于,包括从最强模型中进行知识蒸馏,绝对增益高达13.8%,平均基准测试性能,以及在3倍更多数据上训练,最大性能提升17.3%。GRAPE的强大性能在现实设置中得到了推广。我们实验了用于Tulu3和Olmo-2的后训练数据。GRAPE在4.5倍更多数据上训练的强基线模型上表现优于6.1%,在最先进的数据选择方法上平均表现优于3%。值得注意的是,使用1/3的数据和一半的epoch,GRAPE使LLaMA3.1-8B的性能超过了Tulu3-SFT的3.5%。

英文摘要:

High-quality supervised fine-tuning (SFT) data are crucial for eliciting strong capabilities from pretrained large language models (LLMs). Typically, instructions are paired with multiple responses sampled from other LLMs, which are often out of the distribution of the target model to be fine-tuned. This, at scale, can lead to diminishing returns and even hurt the models' performance and robustness. We propose **GRAPE**, a novel SFT framework that accounts for the unique characteristics of the target model. For each instruction, it gathers responses from various LLMs and selects the one with the highest probability measured by the target model, indicating that it aligns most closely with the target model's pretrained distribution; it then proceeds with standard SFT training. We first evaluate GRAPE with a controlled experiment, where we sample various solutions for each question in UltraInteract from multiple models and fine-tune commonly used LMs like LLaMA3.1-8B, Mistral-7B, and Qwen2.5-7B on GRAPE-selected data. GRAPE significantly outperforms strong baselines, including distilling from the strongest model with an absolute gain of up to 13.8%, averaged across benchmarks, and training on 3x more data with a maximum performance improvement of 17.3%. GRAPE's strong performance generalizes to realistic settings. We experiment with the post-training data used for Tulu3 and Olmo-2. GRAPE outperforms strong baselines trained on 4.5 times more data by 6.1% and a state-of-the-art data selection approach by 3% on average performance. Remarkably, using 1/3 of the data and half the number of epochs, GRAPE enables LLaMA3.1-8B to surpass the performance of Tulu3-SFT by 3.5%.

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

↑