arXiv:2409.12512cs.CL2024-09被引 3

提出在线知识蒸馏,让教师模型动态适应学生,提升生成效果。

Exploring and Enhancing the Transfer of Distribution in Knowledge Distillation for Autoregressive Language Models

  • 教师模型嵌入小型在线模块,与学生同步训练
  • 在多个数据集上超越主流方法,训练速度最高快4倍
  • 解决小模型蒸馏中分布不匹配问题,适合资源受限场景

知识蒸馏(KD)通过训练小型学生模型模仿大型教师模型来压缩模型。在自回归语言模型中,其成功主要依赖反向KL实现模式聚焦,以及学生生成输出(SGO)缓解暴露偏差。我们的理论分析和实验表明,反向KL虽能模拟教师分布的部分特征,却无法捕捉其大部分行为;而SGO计算开销大且优化困难,尤其当学生模型远小于教师时更为明显。根本原因在于教师分布固定不变,无法根据学生规模自适应调整。为此,我们提出在线知识蒸馏(OKD),让教师网络集成小型在线模块,与学生模型共同训练。该策略无需在线策略采样,仅需对教师在线模块进行微小参数更新,即可实现对学生分布的动态适应,从而提升蒸馏效果。大量实验证明,OKD在多种生成数据集、模型架构和规模下均达到或超过领先方法性能,训练时间最多缩短四倍。

原文摘要 · Abstract (English)

Knowledge distillation (KD) is a technique that compresses large teacher models by training smaller student models to mimic them. The success of KD in auto-regressive language models mainly relies on Reverse KL for mode-seeking and student-generated output (SGO) to combat exposure bias. Our theoretical analyses and experimental validation reveal that while Reverse KL effectively mimics certain features of the teacher distribution, it fails to capture most of its behaviors. Conversely, SGO incurs higher computational costs and presents challenges in optimization, particularly when the student model is significantly smaller than the teacher model. These constraints are primarily due to the immutable distribution of the teacher model, which fails to adjust adaptively to models of varying sizes. We introduce Online Knowledge Distillation (OKD), where the teacher network integrates small online modules to concurrently train with the student model. This strategy abolishes the necessity for on-policy sampling and merely requires minimal updates to the parameters of the teacher's online module during training, thereby allowing dynamic adaptation to the student's distribution to make distillation better. Extensive results across multiple generation datasets show that OKD achieves or exceeds the performance of leading methods in various model architectures and sizes, reducing training time by up to fourfold.

知识蒸馏自回归模型在线学习模型压缩

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