arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.13669cs.CL
收藏

自蒸馏弥合语言模型微调中的分布差距

Self-Distillation Bridges Distribution Gap in Language Model Fine-Tuning

Zhejiang University(浙江大学);Sea AI Lab(Sea AI实验室);Tencent TEG(腾讯TEG)

Zhaorui Yang, Tianyu Pang, Haozhe Feng, Han Wang, Wei Chen, Minfeng Zhu, Qian Liu

AI总结:

本文提出自蒸馏微调(SDFT),利用模型自身生成的蒸馏数据弥合任务数据与LLM的分布差距,在Llama-2-chat上缓解灾难性遗忘并保持性能与安全对齐。

摘要:

大型语言模型(LLMs)的迅猛发展彻底改变了自然语言处理领域,但针对特定任务对其进行微调时,往往面临在性能与保持通用指令遵循能力之间取得平衡的挑战。本文提出,任务数据集与LLMs之间的分布差距是导致这一问题的根本原因。为解决该问题,我们引入了自蒸馏微调(SDFT),一种新颖的方法,通过利用模型自身生成的蒸馏数据集来引导微调,使其匹配原始分布,从而弥合分布差距。在Llama-2-chat模型上跨多个基准的实验结果表明,与普通微调相比,SDFT有效缓解了灾难性遗忘,同时在下游任务上取得相当或更优的性能。此外,SDFT展现出维持LLMs有用性和安全对齐的潜力。我们的代码可在https://github.com/sail-sg/sdft获取。

英文摘要:

The surge in Large Language Models (LLMs) has revolutionized natural language processing, but fine-tuning them for specific tasks often encounters challenges in balancing performance and preserving general instruction-following abilities. In this paper, we posit that the distribution gap between task datasets and the LLMs serves as the primary underlying cause. To address the problem, we introduce Self-Distillation Fine-Tuning (SDFT), a novel approach that bridges the distribution gap by guiding fine-tuning with a distilled dataset generated by the model itself to match its original distribution. Experimental results on the Llama-2-chat model across various benchmarks demonstrate that SDFT effectively mitigates catastrophic forgetting while achieving comparable or superior performance on downstream tasks compared to the vanilla fine-tuning. Moreover, SDFT demonstrates the potential to maintain the helpfulness and safety alignment of LLMs. Our code is available at https://github.com/sail-sg/sdft.

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

↑