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 using the GPT-2 model family 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.
翻译:近期大型语言模型(LLMs)的进展引发了对其推理成本的关注,从而增加了对模型压缩研究的迫切需求。知识蒸馏(KD)是实现这一目标的重要方法,但针对LLMs等生成式语言模型的KD研究相对较少,且蒸馏学生友好知识(在分类模型KD中已展现出显著性能)的方法在生成式语言模型中尚未被探索。为探究这一方向,我们提出PromptKD——一种简洁高效的方法,首次在KD中利用提示微调技术,使生成式语言模型能够传递学生友好知识。不同于以往分类任务中需微调整个教师模型以提取学生友好知识的工作,PromptKD通过仅添加少量提示令牌并借助学生引导微调提示,实现了类似效果。基于GPT-2模型家族在指令遵循数据集上的大量实验表明,PromptKD仅增加教师模型参数量的0.0007%作为提示,即达到当前最优性能。进一步分析表明,蒸馏学生友好知识能在整个训练过程中有效缓解曝光偏差,从而提升模型性能。