arXiv:2502.04194cs.CLcs.AI2025-02NeurIPS被引 50

用目标模型自身偏好筛选指令数据,显著提升微调效果。

The Best Instruction-Tuning Data are Those That Fit

  • 根据目标模型打分选择最匹配的回复,确保数据分布一致。
  • 在多个基准上平均提升13.8%,最高达17.3%性能增益。
  • 只需1/3数据和一半训练轮数,就超越大模型微调结果。

高质量监督微调(SFT)数据对激发预训练大语言模型(LLM)的能力至关重要。传统方法将指令与多个其他LLM生成的回复配对,这些回复常偏离目标模型的预训练分布,大规模使用会导致收益递减甚至损害模型性能与鲁棒性。本文提出**GRAPE**框架,考虑目标模型的独特特征:针对每条指令,从多个LLM收集回复,并选择由目标模型打分最高的那个,即最符合其预训练分布的回复;随后进行标准SFT训练。我们在控制实验中,从UltraInteract中为每道题采样多种解答,对LLaMA3.1-8B、Mistral-7B、Qwen2.5-7B等主流模型进行微调。GRAPE显著优于强基线,包括从最强模型蒸馏的方法,在多个基准上平均提升13.8%,使用3倍数据时最大提升达17.3%。该方法在真实场景也表现优异:在Tulu3和Olmo-2的后训练数据上,比使用4.5倍数据的基线高6.1%,比现有数据选择方法高3%。尤为突出的是,仅用1/3数据和一半训练轮数,GRAPE使LLaMA3.1-8B在性能上超过Tulu3-SFT 3.5%。

原文摘要 · Abstract (English)

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%.

指令微调数据筛选大模型优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。