用自对弈树搜索提升指令遵循能力,让模型更精准理解细微要求。
SPaR: Self-Play with Tree-Search Refinement to Improve Instruction-Following in Large Language Models
- 自对弈中用树搜索迭代优化回复,减少无关内容干扰。
- 三轮训练后,LLaMA3-8B在IFEval上超越GPT-4-Turbo。
- 适合想提升指令遵循精度的模型训练者,尤其擅长大模型优化。
指令遵循是语言模型的核心能力,需准确识别指令中的细微要求并体现在输出中。现有方法常直接采样多个独立回复构建偏好对,引入与指令遵循无关的内容差异(如同义表达),干扰模型学习关键区分点。为此,我们提出SPaR——一种结合树搜索自精炼的自对弈框架,生成无干扰、可比的偏好对。模型自我对弈时,利用树搜索策略优化先前回复,同时最小化不必要的变化。实验表明,经三轮SPaR引导训练的LLaMA3-8B,在IFEval基准上优于GPT-4-Turbo,且保持通用能力。SPaR还展现良好可扩展性,显著提升GLM-4-9B和LLaMA3-70B性能。我们还分析了树搜索推理规模对模型表现的影响。代码与数据已开源:https://github.com/thu-coai/SPaR。
原文摘要 · Abstract (English)
Instruction-following is a fundamental capability of language models, requiring the model to recognize even the most subtle requirements in the instructions and accurately reflect them in its output. Such an ability is well-suited for and often optimized by preference learning. However, existing methods often directly sample multiple independent responses from the model when creating preference pairs. Such practice can introduce content variations irrelevant to whether the instruction is precisely followed (e.g., different expressions about the same semantic), interfering with the goal of teaching models to recognize the key differences that lead to improved instruction following. In light of this, we introduce SPaR, a self-play framework integrating tree-search self-refinement to yield valid and comparable preference pairs free from distractions. By playing against itself, an LLM employs a tree-search strategy to refine its previous responses with respect to the instruction while minimizing unnecessary variations. Our experiments show that a LLaMA3-8B model, trained over three iterations guided by SPaR, surpasses GPT-4-Turbo on the IFEval benchmark without losing general capabilities. Furthermore, SPaR demonstrates promising scalability, greatly enhancing models like GLM-4-9B and LLaMA3-70B. We also identify how inference scaling in tree search would impact model performance. Our code and data are publicly available at https://github.com/thu-coai/SPaR.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。