arXiv:2502.11766cs.CL2025-02被引 2

通过预对齐师生模型分布,提升知识蒸馏效果

Warmup-Distill: Bridge the Distribution Mismatch between Teacher and Student before Knowledge Distillation

  • 先用教师模型校准学生模型的低概率知识,提前对齐分布
  • 在7个基准上平均性能提升至少0.4分,数学任务最高+1.9%
  • 适合需要高效压缩大模型的应用场景

大型语言模型的广泛应用受限于高计算成本,知识蒸馏(KD)成为构建小型高效模型的关键。然而传统方法存在师生模型间概率分布不匹配问题,导致蒸馏效果差。例如基于KL散度的方法易产生模式平均与模式坍缩。现有研究多通过优化分布距离缓解此问题,但早期蒸馏阶段仍存在分布差异。为此,本文提出Warmup-Distill方法,在正式蒸馏前预先对齐师生模型分布。具体而言,利用学生模型内部知识检测其实际分布,并通过教师模型作为参考,修正低概率知识。该过程使学生模型的内部知识更贴近教师,扩展其分布范围,从而在后续蒸馏中学习更优。在7个基准上的实验表明,Warmup-Distill可生成更适配蒸馏的初始化学生模型,相比原始学生模型平均得分提升至少+0.4。尤其在数学任务上,蒸馏效果进一步提升,最高达+1.9%准确率。

原文摘要 · Abstract (English)

The widespread deployment of Large Language Models (LLMs) is hindered by the high computational demands, making knowledge distillation (KD) crucial for developing compact smaller ones. However, the conventional KD methods endure the distribution mismatch issue between the teacher and student models, leading to the poor performance of distillation. For instance, the widely-used KL-based methods suffer the mode-averaging and mode-collapsing problems, since the mismatched probabitliy distribution between both models. Previous studies mainly optimize this issue via different distance calculations towards the distribution of both models. Unfortunately, the distribution mismatch issue still exists in the early stage of the distillation. Hence, to reduce the impact of distribution mismatch, we propose a simple yet efficient method, named Warmup-Distill, which aligns the distillation of the student to that of the teacher in advance of distillation. Specifically, we first detect the distribution of the student model in practical scenarios with its internal knowledge, and then modify the knowledge with low probability via the teacher as the checker. Consequently, Warmup-Distill aligns the internal student's knowledge to that of the teacher, which expands the distribution of the student with the teacher's, and assists the student model to learn better in the subsequent distillation. Experiments on the seven benchmarks demonstrate that Warmup-Distill could provide a warmup student more suitable for distillation, which outperforms the vanilla student by as least +0.4 averaged score among all benchmarks. Noteably, with the assistance of Warmup-Distill, the distillation on the math task could yield a further improvement, at most +1.9% accuracy.

知识蒸馏大模型压缩师生对齐

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。