Skip to main content
QUICK REVIEW

[Paper Review] MiniLLM: On-Policy Distillation of Large Language Models

Yuxian Gu, Li Dong|arXiv (Cornell University)|Jun 14, 2023
Topic ModelingComputer Science19 citations
TL;DR

MiniLLM minimizes reverse Kullback–Leibler divergence to distill smaller generative LLMs from larger white-box teachers, improving instruction-following quality, calibration, and long-text generation across model sizes.

ABSTRACT

Knowledge Distillation (KD) is a promising technique for reducing the high computational demand of large language models (LLMs). However, previous KD methods are primarily applied to white-box classification models or training small models to imitate black-box model APIs like ChatGPT. How to effectively distill the knowledge of white-box LLMs into small models is still under-explored, which becomes more important with the prosperity of open-source LLMs. In this work, we propose a KD approach that distills LLMs into smaller language models. We first replace the forward Kullback-Leibler divergence (KLD) objective in the standard KD approaches with reverse KLD, which is more suitable for KD on generative language models, to prevent the student model from overestimating the low-probability regions of the teacher distribution. Then, we derive an effective on-policy optimization approach to learn this objective. The student models are named MiniLLM. Extensive experiments in the instruction-following setting show that MiniLLM generates more precise responses with higher overall quality, lower exposure bias, better calibration, and higher long-text generation performance than the baselines. Our method is scalable for different model families with 120M to 13B parameters. Our code, data, and model checkpoints can be found in https://github.com/microsoft/LMOps/tree/main/minillm.

Motivation & Objective

  • Motivate knowledge distillation for open, generative LLMs using white-box teachers.
  • Propose an optimization objective based on reverse KLD to avoid overestimating low-probability regions.
  • Develop practical training techniques to stabilize policy-gradient optimization for KD in LLMs.
  • Demonstrate scalability of MiniLLM across diverse model families and sizes (120M–13B).
  • Assess improvements in instruction-following quality, exposure bias, calibration, and long-text generation.

Proposed method

  • Replace forward KLD with reverse KLD in KD for generative LLMs.
  • Derive gradients for min_theta KL[q_theta || p] using Policy Gradient.
  • Introduce single-step regularization to reduce variance.
  • Implement teacher-mixed sampling to mitigate reward hacking.
  • Apply length normalization to correct generation length bias.
  • Train with PPO clipping and include a language modeling loss on pretraining data.

Experimental results

Research questions

  • RQ1Can reverse KLD-based distillation (MiniLLM) outperform standard forward-KLD KD for generative LLMs when a white-box teacher is available?
  • RQ2How does MiniLLM affect exposure bias, calibration, and long-text generation quality across model families and sizes?
  • RQ3What optimization strategies are essential to stabilize policy-gradient-based KD for LLMs?
  • RQ4Does MiniLLM scale from 120M to 13B parameters across GPT-2, OPT, and LLaMA families?
  • RQ5What is the impact of teacher-mix-in strength and pretraining loss on final performance and robustness?

Key findings

  • MiniLLM consistently outperforms standard KD baselines (word-level KD and sequence-level KD) across multiple datasets and model sizes.
  • Rouge-L scores indicate higher generation precision and better alignment with ground-truth across many settings.
  • MiniLLM exhibits lower exposure bias and improved calibration relative to KD and SeqKD baselines.
  • Distilled models with MiniLLM achieve strong long-text generation performance and maintain generation diversity (distinct 4-grams and LM loss remain stable).
  • The improvements from MiniLLM are stable across model families (GPT-2, OPT, LLaMA) and parameter scales (120M–13B).
  • Ablations show teacher-mixed sampling, length normalization, and single-step regularization are crucial for stability and performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.