PromptKD: Distilling Student-Friendly Knowledge for Generative Language Models via Prompt Tuning

Gyeongman Kim, Doohyuk Jang, Eunho Yang

TL;DR

PromptKD is a novel knowledge distillation (KD) framework that makes large language models (LLMs) easier to compress by teaching them to provide "student-friendly" explanations. By tuning a tiny set of prompt tokens—just 0.0007% of the teacher's parameters—PromptKD achieves state-of-the-art performance on instruction-following tasks and effectively eliminates the common problem of exposure bias in generative models.

What Problem Does This Paper Address?

As large language models grow, so do the costs of running them. Model compression through Knowledge Distillation (KD)—where a small "student" model learns to mimic a large "teacher" model—is a standard solution. However, generative LLMs present a unique challenge: the "capacity gap."

Often, a massive teacher model is too smart. Its internal logic and output distributions are so complex that a much smaller student model struggles to keep up, leading to poor performance. While researchers have tried making teachers "student-friendly" for simple classification tasks, doing so for generative models usually requires fine-tuning the entire teacher model, which is computationally prohibitive for LLMs. Furthermore, generative models suffer from exposure bias, where small errors during training accumulate during real-world use, causing the model to drift off-track.

Methods

The authors propose PromptKD, a three-step iterative training process that uses prompt tuning to adapt the teacher's knowledge without needing to retrain the teacher itself.

  1. Pseudo-Target Generation: Instead of using perfect "ground truth" data, the student model generates its own response to a request. This ensures the training data reflects the types of errors the student actually makes, helping to mitigate exposure bias.
  2. Prompt Tuning for Adaptive Teaching: The system prepends a small set of trainable "soft prompt" tokens to the teacher's input. These prompts are tuned to minimize the difference between the teacher's and the student's output distributions on the student-generated response. Essentially, the prompt "tricks" the teacher into speaking the student's language. A regularization loss is used early on to keep the teacher from diverging too wildly.
  3. Student-Friendly Knowledge Distillation: Finally, the student model is trained to match the output of the teacher when that teacher is using the tuned prompt.
The three-step training procedure of PromptKD.
Figure 2 (Step 2): The teacher's prompt is updated based on guidance from the student to facilitate "adaptive teaching."

Datasets

The researchers evaluated PromptKD across five diverse instruction-following datasets to test its generalization:

  • Dolly: 15,000 human-written instruction-response pairs.
  • SelfInst: User-oriented instruction sets.
  • Vicuna: 80 questions used in the standard Vicuna evaluation.
  • S-NI (Super-NaturalInstructions): A large-scale benchmark for cross-task generalization.
  • UnNI (Unnatural Instructions): A dataset of machine-generated instructions.

Key Insights and Ideas

  • Prompting as a Distillation Tool: This is the first work to use prompt tuning specifically to extract student-friendly knowledge. It proves that you don't need to change a model's weights to change its "teaching style."
  • The "Student-Friendly" Advantage: By simplifying the teacher's output distribution, the student learns faster and more accurately. Qualitative analysis shows that the prompted teacher provides simpler, more direct answers that the student can easily replicate.
  • Solving Exposure Bias: Because the teacher adapts to the student's actual (imperfect) outputs during training, the student becomes much more robust during free-run generation.
  • Extreme Efficiency: PromptKD adds only about 11,000 parameters (0.0007% of a 1.5B parameter teacher). This makes it far more memory-efficient than other parameter-efficient methods like LoRA.

Key Results

PromptKD consistently outperformed existing KD baselines (like MiniLLM and GKD) across GPT-2, OPT, and Llama model families.

  • Performance: In many cases, the student model distilled via PromptKD actually surpassed the performance of the original teacher model on instruction-following benchmarks.
  • Exposure Bias: As shown in the analysis, PromptKD maintains an "Excess Accumulated Error" (ExAccErr) close to zero, significantly outperforming other methods that see errors skyrocket as generation length increases.
Figure 1: Comparison of instruction-following perfor- mance of KD methods using the GPT-2 model family. Owing to the student-friendly knowledge, our Promp- tKD outperforms others with only an additional 11K parameters. Dashed reference line represents the perfor- mance of the teacher model.

Limitations and Future Work

While highly effective, the authors note that PromptKD currently uses a relatively "naive" extraction approach (simple prompt tuning). They suggest that more sophisticated methods for extracting student-friendly knowledge could exist. Additionally, the current framework is designed for task-specific distillation (like instruction following). A major next step would be expanding this to task-agnostic distillation, allowing it to be used during the massive pre-training phase of LLMs.

Summary updated

BibTeX
@inproceedings{kim2024promptkd,
  author = {Gyeongman Kim and Doohyuk Jang and Eunho Yang},
  title = {{PromptKD: Distilling Student-Friendly Knowledge for Generative Language Models via Prompt Tuning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=nnX6D9Q3iS},
}
Figure