DistiLLM-2: A Contrastive Approach Boosts the Distillation of LLMs

Jongwoo Ko, Tianyi Chen, Sungnyun Kim, Tianyu Ding, Luming Liang +2 more
3/1/2025

No official code found. Best implementation: jongwooko/distillm-2 (70 stars, last commit 2025-06-27).

Abstract

Despite the success of distillation in large language models (LLMs), most prior work applies identical loss functions to both teacher- and student-generated data. These strategies overlook the synergy between loss formulations and data types, leading to a suboptimal performance boost in student models. To address this, we propose DistiLLM-2, a contrastive approach that simultaneously increases the likelihood of teacher responses and decreases that of student responses by harnessing this synergy. Our extensive experiments show that DistiLLM-2 not only builds high-performing student models across a wide range of tasks, including instruction-following and code generation, but also supports diverse applications, such as preference alignment and vision-language extensions. These findings highlight the potential of a contrastive approach to enhance the efficacy of LLM distillation by effectively aligning teacher and student models across varied data types.

View on arXivView PDF

Code Implementations(1)

Official PyTorch implementation of DistiLLM-2: A Contrastive Approach Boosts the Distillation of LLMs (ICML 2025 Oral)

708Shell, PythonMar 10, 20251 years ago

Similar Papers

Cite this paper

@article{ko2025distillm,
  title  = {DistiLLM-2: A Contrastive Approach Boosts the Distillation of LLMs},
  author = {Jongwoo Ko and Tianyi Chen and Sungnyun Kim and Tianyu Ding and Luming Liang and Ilya Zharkov and SeYoung Yun},
  year   = {2025},
  eprint = {2503.07067},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2503.07067},
  journal = {ICML 2025 2025}
}

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/2503.07067.svg)](https://codeofpaper.com/paper/2503.07067)

Discussion