arXiv:2502.11779cs.CL2025-02被引 1

用自对齐困惑度选最优生成策略,提升微调效果

Efficient Response Generation Strategy Selection for Fine-Tuning Large Language Models Through Self-Aligned Perplexity

  • 提出自对齐困惑度,衡量生成答案与目标模型风格匹配度
  • 在小样本上测试即可选出最优生成策略,避免全量试错
  • 特别适合需要高质量推理数据的LLM微调场景

微调大语言模型通常依赖大量输入-输出对。然而,同一问题可能有多个有效回答,这些回答常通过蒸馏教师模型获得,且受教师模型或提示策略影响而不同。已有研究发现,训练数据的生成方式显著影响微调模型性能。本文提出一种可扩展的近似方法:仅评估少量生成数据,即可判断其对特定目标模型的适用性。核心思想是:有效的输出应与目标模型风格一致。传统困惑度在刻画熟悉度上表现不佳,为此我们引入自对齐困惑度(Self-Aligned Perplexity),衡量候选输出与目标模型自身风格和推理模式的契合程度。基于此,可在小样本上识别最优生成策略,并用于构建完整训练集。实验表明,在多种聚焦推理的任务上,使用所选策略生成的数据能带来显著性能提升,尤其在不同生成策略导致结果差异较大的情况下。代码已开源:https://github.com/XuanRen4470/SPPL。

原文摘要 · Abstract (English)

Fine-tuning large language models (LLMs) typically relies on producing large sets of input-output pairs. Yet for a given question, there can be many valid outputs. In practice, these outputs are often derived by distilling knowledge from teacher models, and they can vary depending on the specific teacher model or prompting strategy employed. Recent findings show that how these training outputs are generated can significantly affect the performance of the fine-tuned model, raising an important question: how do we pick the best data generation method from among numerous possibilities? Rather than exhaustively training and evaluating on each candidate, this paper proposes a scalable approximate method that assesses a small subset of generated data to estimate its suitability for a specific target LLM. Our central idea is that effective outputs should be familiar to the target LLM. While previous work measures familiarity with perplexity, we find that perplexity might be suboptimal in characterizing familiarity through empirical analyses and practical observations. To address this, we introduce self-aligned perplexity, a novel metric capturing how closely candidate outputs adhere to the target LLM's own style and reasoning patterns. In this way, we can identify the most effective generation strategy on a small sample, then apply it to produce the complete training set. We demonstrate that training on data generated by the chosen method yields significant improvements across diverse reasoning-focused benchmarks, particularly in cases where different candidate methods lead to highly divergent training outcomes. Our implementation is publicly available at https://github.com/XuanRen4470/SPPL.

LLM微调生成策略困惑度自对齐

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