Smaug: Fixing Failure Modes of Preference Optimisation with DPO-Positive
作者: Arka Pal, Deep Karkhanis, Samuel Dooley, Manley Roberts, Siddartha Naidu, Colin White
分类: cs.CL, cs.AI, cs.LG
发布日期: 2024-02-20 (更新: 2024-07-03)
💡 一句话要点
提出DPO-Positive以解决DPO在偏好优化中的失败模式问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 直接偏好优化 大型语言模型 损失函数设计 模型微调 自然语言处理
📋 核心要点
- 现有的直接偏好优化(DPO)方法在某些情况下可能导致模型对偏好示例的可能性降低,影响性能。
- 论文提出了DPO-Positive(DPOP),一种新的损失函数和训练过程,旨在避免DPO的失败模式。
- DPOP在多种数据集和下游任务中表现优异,尤其是在编辑距离较高的数据集上,且在独立基准测试中也显示出优势。
📝 摘要(中文)
直接偏好优化(DPO)在提升大型语言模型(LLMs)在推理、摘要和对齐等下游任务的表现方面非常有效。本文首先理论上证明了标准DPO损失可能导致模型对偏好示例的可能性降低,尤其是在偏好和不偏好类之间的相对概率增加时。接着,实证研究表明,在对常见数据集进行微调时,尤其是完成对之间编辑距离较低的数据集时,这一现象确实存在。基于这些见解,本文设计了DPO-Positive(DPOP),一种新的损失函数和训练过程,避免了这一失败模式。令人惊讶的是,DPOP在多种数据集和下游任务中超越了DPO及其他微调方法,尤其是在完成对之间编辑距离较高的数据集上。此外,DPOP调优的模型在独立于微调数据的基准测试中也优于DPO调优的模型。最后,利用DPOP,我们创建并开源了Smaug-34B和Smaug-72B,后者成为首个在HuggingFace Open LLM Leaderboard上平均准确率超过80%的开源LLM。
🔬 方法详解
问题定义:本文要解决的问题是现有的直接偏好优化(DPO)方法在微调大型语言模型时可能导致对偏好示例的可能性降低,尤其是在偏好和不偏好类之间的相对概率增加的情况下。
核心思路:论文的核心思路是设计DPO-Positive(DPOP),一种新的损失函数和训练过程,旨在避免DPO的失败模式。通过理论分析和实证研究,DPOP能够在微调过程中保持对偏好示例的高可能性。
技术框架:DPOP的整体架构包括数据预处理、损失函数设计、模型训练和评估四个主要模块。首先,通过对偏好和不偏好示例的对比,构建相应的数据集;其次,设计新的损失函数以优化模型的选择概率;最后,通过标准的评估指标对模型进行性能评估。
关键创新:DPOP的关键创新在于其新的损失函数设计,能够有效避免DPO在微调过程中出现的性能下降问题。这一设计与现有方法的本质区别在于,它关注于保持偏好示例的选择概率,而不仅仅是优化相对概率。
关键设计:在DPOP中,损失函数的设计考虑了偏好和不偏好示例之间的相对关系,并引入了新的参数设置,以确保模型在训练过程中能够有效学习到偏好示例的特征。
🖼️ 关键图片
📊 实验亮点
实验结果显示,DPOP在多种数据集和下游任务中均优于DPO及其他微调方法,特别是在编辑距离较高的数据集上。此外,DPOP调优的模型在独立基准测试MT-Bench中表现出色,超越了DPO调优的模型,显示出显著的性能提升。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、对话系统和文本生成等。通过提升大型语言模型在偏好优化方面的性能,DPOP可以帮助开发更智能的AI助手和更高效的文本生成工具,具有重要的实际价值和未来影响。
📄 摘要(原文)
Direct Preference Optimisation (DPO) is effective at significantly improving the performance of large language models (LLMs) on downstream tasks such as reasoning, summarisation, and alignment. Using pairs of preferred and dispreferred data, DPO models the relative probability of picking one response over another. In this work, first we show theoretically that the standard DPO loss can lead to a reduction of the model's likelihood of the preferred examples, as long as the relative probability between the preferred and dispreferred classes increases. We then show empirically that this phenomenon occurs when fine-tuning LLMs on common datasets, especially datasets in which the edit distance between pairs of completions is low. Using these insights, we design DPO-Positive (DPOP), a new loss function and training procedure which avoids this failure mode. Surprisingly, we find that DPOP outperforms DPO and other fine-tuning procedures across a wide variety of datasets and downstream tasks, including datasets with high edit distances between completions. Furthermore, we find that the DPOP-tuned model outperforms the DPO-tuned model (all else equal) on benchmarks independent of the fine-tuning data, such as MT-Bench. Finally, using DPOP, we create and open-source Smaug-34B and Smaug-72B, with the latter becoming the first open-source LLM to surpass an average accuracy of 80% on the HuggingFace Open LLM Leaderboard.