Language Model Distillation: A Temporal Difference Imitation Learning Perspective

Zishun Yu, Shangzhe Li, Xinhua ZhangarXiv 2025 · DOI

Introduction

Large Language Models (LLMs) have revolutionized natural language processing but remain computationally prohibitive for many real-world applications. Knowledge distillation—training a smaller "student" model to mimic a larger "teacher"—is a common solution. However, standard methods like Behavior Cloning (BC) often suffer from "exposure bias," where minor student errors accumulate over time, leading the model into states it cannot recover from. While Reinforcement Learning (RL) and Temporal Difference (TD) learning offer theoretical solutions to this compounding error problem, their application to LLMs is hindered by the massive action space of large vocabularies.

The Bellman Distill (BD) Framework

This paper introduces Bellman Distill (BD), a framework that frames distillation as an Inverse Reinforcement Learning (IRL) problem. By adapting Inverse soft Q-learning (IQL), BD focuses on long-term value rather than just immediate token matching.

Exploiting Distributional Sparsity

The primary challenge in applying TD learning to LLMs is the vocabulary size. BD overcomes this by exploiting the inherent sparsity in LLM probability distributions. As shown in Figure 1, a tiny fraction of the vocabulary typically accounts for the vast majority of the probability mass.

Distributional sparsity in LLMs: the top 50 tokens often account for over 96% of the total probability.

BD utilizes a Top-p Soft Bellman Operator, which restricts policy evaluation to these high-probability "top-p" tokens. This reduction makes the computation tractable while maintaining theoretical convergence guarantees. Furthermore, BD operates "offline" using pre-collected teacher responses, making it significantly more efficient than "online" RL methods.

Experimental Setup

The researchers evaluated BD across three model families: GPT-2 (1.5B teacher), OPT (6.7B teacher), and Qwen-2.5 (3B teacher), with student models ranging from 120M to 1.3B parameters. Training was conducted on the databricks-dolly-15K instruction-following dataset, supplemented by general language corpora like OpenWebText to preserve broad capabilities. Evaluation benchmarks included DollyEval, SelfInst, and the Vicuna benchmark.

Results and Discussion

BD consistently outperformed standard Knowledge Distillation (KD) and Sequence-level KD (SeqKD) across various benchmarks.

Performance and Win Rates

In head-to-head evaluations judged by GPT-4o-mini, BD demonstrated a clear advantage over existing baselines. It achieved a 64.1% win rate against standard KD and a 59.7% win rate against SeqKD.

Win rates of Bellman Distill (BD) against standard KD, SeqKD, and MiniLLM across benchmarks.

Efficiency Gains

Beyond performance, BD offers substantial efficiency improvements. Compared to MiniLLM, a state-of-the-art online distillation method, BD achieved comparable or superior results while being approximately 10x faster to train. For instance, distilling a Qwen-2.5 model required only 0.8 hours with BD, compared to 10.7 hours for MiniLLM.

Conclusion and Future Work

Bellman Distill successfully bridges the gap between advanced imitation learning theory and the practical constraints of LLM distillation. By focusing on long-term value through a computationally efficient top-p Bellman operator, it mitigates exposure bias without the overhead of online data generation. Future research may explore handling mismatched vocabularies between teacher and student models and further optimizing the trade-offs between offline efficiency and online exploration.

Summary updated

BibTeX
@misc{yu2025language,
  author = {Zishun Yu and Shangzhe Li and Xinhua Zhang},
  title = {{Language Model Distillation: A Temporal Difference Imitation Learning Perspective}},
  year = {2025},
  eprint = {2505.20335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.20335},
}
Figure