arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.11928cs.CL
收藏

Extract then Distill:高效且有效的任务无关BERT蒸馏

Extract then Distill: Efficient and Effective Task-Agnostic BERT Distillation

Tsinghua University(清华大学);Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院)

Cheng Chen, Yichun Yin, Lifeng Shang, Zhi Wang, Xin Jiang, Xiao Chen, Qun Liu

摘要:

与任务无关的知识蒸馏是一个师生框架,已被证明是有效的BERT压缩。虽然在NLP任务上取得了很好的结果,但它需要大量的计算资源。在本文中,我们提出提取然后蒸馏(ETD),一个通用的和灵活的策略,以重用教师的参数,高效和有效的任务不可知蒸馏,它可以适用于任何规模的学生。具体来说,我们介绍了两个变种的ETD,ETD-Rand和ETD-Impt,提取教师的参数在一个随机的方式,并通过以下的重要性度量分别。这样,学生在蒸馏过程开始时就已经掌握了一些知识,这使得蒸馏过程收敛得更快。我们证明了ETD在GLUE基准和SQuAD上的有效性。实验结果表明:(1)与未采用ETD策略的基线算法相比,ETD算法可以节省70%的计算量。此外,当使用相同的计算资源时,它实现了比基线更好的结果。(2)ETD是通用的,并且已被证明对不同的蒸馏方法有效(例如,TinyBERT和MiniLM)和不同大小的学生。源代码将在发布时公开提供。

英文摘要:

Task-agnostic knowledge distillation, a teacher-student framework, has been proved effective for BERT compression. Although achieving promising results on NLP tasks, it requires enormous computational resources. In this paper, we propose Extract Then Distill (ETD), a generic and flexible strategy to reuse the teacher's parameters for efficient and effective task-agnostic distillation, which can be applied to students of any size. Specifically, we introduce two variants of ETD, ETD-Rand and ETD-Impt, which extract the teacher's parameters in a random manner and by following an importance metric respectively. In this way, the student has already acquired some knowledge at the beginning of the distillation process, which makes the distillation process converge faster. We demonstrate the effectiveness of ETD on the GLUE benchmark and SQuAD. The experimental results show that: (1) compared with the baseline without an ETD strategy, ETD can save 70\% of computation cost. Moreover, it achieves better results than the baseline when using the same computing resource. (2) ETD is generic and has been proven effective for different distillation methods (e.g., TinyBERT and MiniLM) and students of different sizes. The source code will be publicly available upon publication.

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

↑