Abstract
Recent advancements in large language models (LLMs) have raised concerns about inference costs, increasing the need for research into model compression. While knowledge distillation (KD) is a prominent method for this, research on KD for generative language models like LLMs is relatively sparse, and the approach of distilling student-friendly knowledge, which has shown promising performance in KD for classification models, remains unexplored in generative language models. To explore this approach, we propose PromptKD, a simple yet effective method that utilizes prompt tuning - for the first time in KD - to enable generative language models to transfer student-friendly knowledge. Unlike previous works in classification that require fine-tuning the entire teacher model for extracting student-friendly knowledge, PromptKD achieves similar effects by adding a small number of prompt tokens and tuning only the prompt with student guidance. Extensive experiments on instruction-following datasets show that PromptKD achieves state-of-the-art performance while adding only 0.0007% of the teacher’s parameters as prompts. Further analysis suggests that distilling student-friendly knowledge alleviates exposure bias effectively throughout the entire training process, leading to performance enhancements.
Introduction
Large Language Models (LLMs) are powerful but prohibitively expensive to deploy. Knowledge Distillation (KD)—where a small "student" model learns from a large "teacher"—is a standard solution for model compression. However, a major hurdle exists: the capacity gap.
When a teacher is significantly more complex than the student, its knowledge can be "too advanced," leading to poor distillation results. While "student-friendly" KD (adapting the teacher to the student's level) has worked for simple classification tasks, it hasn't been successfully applied to generative LLMs. Previous attempts to adapt teachers required fine-tuning the entire massive teacher model, which is computationally exhausting and often impossible for researchers with limited hardware.
Methodology
PromptKD is a novel knowledge distillation framework that makes large teacher models "student-friendly" by using parameter-efficient prompt tuning. Instead of changing the teacher's core weights, PromptKD adds a few "soft prompt" tokens to the teacher's input. The process follows a three-step iterative loop:
 Source, p. 4
-
Pseudo-Target Generation: The student model generates a response to a given instruction. This "on-policy" generation helps the model see the types of errors it might make during actual inference, addressing the "exposure bias" problem.
- Prompt Tuning for Adaptive Teaching: PromptKD adds soft prompt tokens to the teacher's input. These prompts are trained to minimize the discrepancy between the teacher's and the student's output distributions for the pseudo-target. Essentially, the teacher learns a "student-friendly" way to frame its knowledge.
- Student-Friendly KD: The student then learns from this adapted teacher using reverse Kullback-Leibler (KL) divergence, which encourages the student to focus on the most likely "modes" of the teacher's distribution—a technique better suited for text generation than standard KD.
To ensure stability, the framework includes a regularization loss that prevents the teacher from drifting too far from its original, high-quality knowledge during the prompt tuning phase.
Experiments and Results
The researchers evaluated PromptKD across five diverse instruction-following datasets (Dolly, SelfInst, Vicuna, S-NI, and UnNI) across three model families: GPT-2, OPT, and Llama.
PromptKD consistently outperformed existing KD methods like MiniLLM and GKD across almost all datasets and model sizes. On the Dolly dataset, a GPT-2 (760M) student distilled via PromptKD achieved a ROUGE-L score of 26.9, significantly outperforming standard SFT (24.9). Notably, PromptKD achieves these gains by adding only 0.0007% of the teacher's parameters as prompts.
Discussion and Conclusion
A key insight of PromptKD is that you don't need to change a teacher's "brain" to make it a better teacher; you just need to change how it "speaks." By tuning only 11,000 parameters out of a 1.5B or 13B parameter teacher, PromptKD achieves better results than methods that modify the entire model. Furthermore, by using student-generated responses as targets during training, it effectively teaches the student how to recover from its own distribution, mitigating exposure bias.
Surprisingly, the distilled student models often outperformed the original teacher on several benchmarks. This suggests that the "student-friendly" adaptation might actually be cleaning up or simplifying the teacher's knowledge in a way that is more effective for specific tasks. Future work includes expanding this to task-agnostic KD and developing more sophisticated extraction techniques.
Summary updated