ToDi: Token-wise Distillation via Fine-Grained Divergence Control

Seongryong Jung, Suwan Yoon, DongGeon Kim, Hwanhee Lee
5/22/2025
cs.CL
distillation

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) offer impressive performance but are impractical for resource-constrained deployment due to high latency and energy consumption. Knowledge distillation (KD) addresses this by transferring knowledge from a large teacher to a smaller student model.

Show full abstract

However, conventional KD, notably approaches like Forward KL (FKL) and Reverse KL (RKL), apply uniform divergence loss across the entire vocabulary, neglecting token-level prediction discrepancies. By investigating these representative divergences via gradient analysis, we reveal that FKL boosts underestimated tokens, while RKL suppresses overestimated ones, showing their complementary roles. Based on this observation, we propose Token-wise Distillation (ToDi), a novel method that adaptively combines FKL and RKL per token using a sigmoid-based weighting function derived from the teacher-student probability log-ratio. ToDi dynamically emphasizes the appropriate divergence for each token, enabling precise distribution alignment. We demonstrate that ToDi consistently outperforms recent distillation baselines using uniform or less granular strategies across instruction-following benchmarks. Extensive ablation studies and efficiency analysis further validate ToDi's effectiveness and practicality.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jung2025todi,
  title  = {ToDi: Token-wise Distillation via Fine-Grained Divergence Control},
  author = {Seongryong Jung and Suwan Yoon and DongGeon Kim and Hwanhee Lee},
  year   = {2025},
  eprint = {2505.16297},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.16297v2}
}

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

Discussion