arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.02923cs.CL
收藏

中间层直接偏好优化

Intermediate direct preference optimization

Money Forward, Inc.(Money Forward公司)

Atsushi Kojima

AI总结:

本文提出 intermediate DPO,在 K 个中间层计算并平均偏好损失作为辅助训练目标,实验显示其在 ultrafeedback 上优于传统 DPO 与 SFT。

摘要:

我们提出中间层直接偏好优化(DPO)方法,在选定的中间层计算 DPO 损失,将其作为微调大语言模型(LLM)的辅助损失。传统 DPO 方法通过使用最终层的 logits 计算 DPO 损失来微调监督微调(SFT)模型。在我们的中间层 DPO 方法中,使用来自 K 个选定中间层的 logits 计算多个 DPO 损失,并取平均以得到中间层 DPO 损失。为训练中间层 DPO 模型,最终损失通过对 DPO 损失与中间层 DPO 损失进行加权求和得到。推理期间,中间层 DPO 模型与传统 DPO 模型类似,使用最终层 logits 进行解码。在使用 ultrafeedback 数据集的实验中,采用 GPT-4 评估中间层 DPO 模型的性能。结果表明,在一个 32 层 SFT 模型的第 22 层计算中间层 DPO 损失所训练出的中间层 DPO 模型,相对于传统 DPO 模型和 SFT 模型分别取得 52.5% 和 67.5% 的胜率,证明了所提方法的有效性。此外,我们还报告了所选中间层位置、层数与性能之间的关系。

英文摘要:

We propose the intermediate direct preference optimization (DPO) method to calculate the DPO loss at selected intermediate layers as an auxiliary loss for finetuning large language models (LLMs). The conventional DPO method fine-tunes a supervised fine-tuning (SFT) model by calculating the DPO loss using logits from the final layer. In our intermediate DPO approach, DPO losses are calculated using the logits from K-selected intermediate layers and averaged to obtain the intermediate DPO loss. For training the intermediate DPO model, the final loss is obtained by calculating the weighted sum of the DPO and intermediate DPO losses. During inference, the intermediate DPO model decodes using the final layer logits similarly to the conventional DPO model. In experiments using the ultrafeedback dataset, the performance of the intermediate DPO model was evaluated using GPT-4. As a result, the intermediate DPO model trained using the intermediate DPO loss calculated at the 22nd layer of a 32-layer SFT model achieved win rates of 52.5% and 67.5% against the conventional DPO and SFT models, respectively, demonstrating the effectiveness of the proposed method. Furthermore, we report the relationships among the position of the selected intermediate layers, the number of layers, and performance.

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

↑