arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.01351cs.CLcs.AIcs.LG

少即是多:用于语言模型压缩的任务感知逐层蒸馏

Less is More: Task-aware Layer-wise Distillation for Language Model Compression

Georgia Institute of Technology(佐治亚理工学院);Microsoft(微软)

Chen Liang, Simiao Zuo, Qingru Zhang, Pengcheng He, Weizhu Chen, Tuo Zhao

AI总结:

针对逐层蒸馏中学生容量不足且教师表示冗余的问题,本文提出TED,通过任务感知滤波器逐层选择有用知识并对齐师生隐藏表示,在持续预训练和微调中均显著优于现有方法。

摘要:

逐层蒸馏是将大型模型(即教师模型)压缩为小型模型(即学生模型)的强大工具。学生通过在每个中间层模仿教师的隐藏表示来从教师那里蒸馏知识。然而,逐层蒸馏存在困难。由于学生的模型容量小于教师,它往往会欠拟合。此外,教师的隐藏表示包含冗余信息,而学生在目标任务的学习中并不一定需要这些信息。为应对这些挑战,我们提出了一种新颖的任务感知逐层蒸馏(Task-aware layEr-wise Distillation,TED)。TED设计了任务感知滤波器,以在每一层对齐学生与教师的隐藏表示。这些滤波器从隐藏表示中选择对目标任务有用的知识。因此,TED缩小了两个模型之间的知识差距,并帮助学生在目标任务上更好地拟合。我们在两种场景下评估TED:持续预训练和微调。在这两种场景中,TED相较现有蒸馏方法均展现出显著且一致的改进。代码可在 https://github.com/cliang1453/task-aware-distillation 获取。

英文摘要:

Layer-wise distillation is a powerful tool to compress large models (i.e. teacher models) into small ones (i.e., student models). The student distills knowledge from the teacher by mimicking the hidden representations of the teacher at every intermediate layer. However, layer-wise distillation is difficult. Since the student has a smaller model capacity than the teacher, it is often under-fitted. Furthermore, the hidden representations of the teacher contain redundant information that the student does not necessarily need for the target task's learning. To address these challenges, we propose a novel Task-aware layEr-wise Distillation (TED). TED designs task-aware filters to align the hidden representations of the student and the teacher at each layer. The filters select the knowledge that is useful for the target task from the hidden representations. As such, TED reduces the knowledge gap between the two models and helps the student to fit better on the target task. We evaluate TED in two scenarios: continual pre-training and fine-tuning. TED demonstrates significant and consistent improvements over existing distillation methods in both scenarios. Code is available at https://github.com/cliang1453/task-aware-distillation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑