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

Zhaorui Yang, Tianyu Pang, Haozhe Feng, Han Wang, Wei Chen +2 more
2/21/2024
cs.CL

Official code: sail-sg/sdft (167 stars, last commit 2024-11-02).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

sail-sg/sdftOfficial100%

[ACL 2024] The official codebase for the paper "Self-Distillation Bridges Distribution Gap in Language Model Fine-tuning".

1676Shell, PythonFeb 20, 20241 years ago
language-modelself-distillationsupervised-finetuning

Similar Papers

Cite this paper

@article{yang2024selfdistillation,
  title  = {Self-Distillation Bridges Distribution Gap in Language Model Fine-Tuning},
  author = {Zhaorui Yang and Tianyu Pang and Haozhe Feng and Han Wang and Wei Chen and Minfeng Zhu and Qian Liu},
  year   = {2024},
  eprint = {2402.13669},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.13669v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.13669.svg)](https://codeofpaper.com/paper/2402.13669)

Discussion