Pretrained language models (PLMs) such as BERT adopt a training paradigm which first pretrain the model in general data and then finetune the model on task-specific data, and have recently achieved great success. However, PLMs are notorious for their enormous parameters and hard to be deployed on real-life applications. Knowledge distillation has been prevailing to address this problem by transferring knowledge from a large teacher to a much smaller student over a set of data. We argue that the selection of thee three key components, namely teacher, training data, and learning objective, is crucial to the effectiveness of distillation. We, therefore, propose a four-stage progressive distillation framework ERNIE-Tiny to compress PLM, which varies the three components gradually from general level to task-specific level. Specifically, the first stage, General Distillation, performs distillation with guidance from pretrained teacher, gerenal data and latent distillation loss. Then, General-Enhanced Distillation changes teacher model from pretrained teacher to finetuned teacher. After that, Task-Adaptive Distillation shifts training data from general data to task-specific data. In the end, Task-Specific Distillation, adds two additional losses, namely Soft-Label and Hard-Label loss onto the last stage. Empirical results demonstrate the effectiveness of our framework and generalization gain brought by ERNIE-Tiny.In particular, experiments show that a 4-layer ERNIE-Tiny maintains over 98.0%performance of its 12-layer teacher BERT base on GLUE benchmark, surpassing state-of-the-art (SOTA) by 1.0% GLUE score with the same amount of parameters. Moreover, ERNIE-Tiny achieves a new compression SOTA on five Chinese NLP tasks, outperforming BERT base by 0.4% accuracy with 7.5x fewer parameters and9.4x faster inference speed.


翻译:语言模型(PLM) (PLM) (BERT) 等先在一般数据中预设该模型,然后在具体任务数据中微调模型,最近取得了巨大成功。然而,PLM因其巨大的参数而臭名昭著,难以在实际任务应用程序中部署。知识蒸馏(PLM) 通过一组数据将知识从一个大教师转移到一个小得多的学生,从而解决这一问题。我们争辩说,选择三个关键组成部分,即教师、培训数据和学习目标,对于蒸馏的有效性至关重要。因此,我们建议建立一个四阶段渐进蒸馏框架ERIE-Tiny 和压缩程序PLM,该框架将三个组成部分从一般范围逐渐从一个参数到任务具体任务级别。具体来说,第一阶段是将知识蒸馏从一个受过预先训练的教师、地质数据和潜化潜化的潜化过程。然后,一般的提炼教师模型从预训练的教师到精化的不断改进的教师。 之后, 任务- 任务阶段- 更新阶段- 更新阶段- 更新阶段- 更新阶段- 更新阶段- 更新阶段- 更新阶段- 升级阶段- 更新阶段- 更新阶段- 更新到一般任务数据库数据,将一般任务基础数据到最后数据, 更新到最后数据, 更新阶段- 更新到最后数据,将一般任务数据 更新到最后数据 更新到升级 更新到升级 更新到总任务数据 升级数据 更新到基础数据。

0
下载
关闭预览

相关内容

专知会员服务
88+阅读 · 2021年6月29日
【AAAI2021】预训练语言模型最新进展,附113页ppt和视频
专知会员服务
64+阅读 · 2021年2月23日
BERT 瘦身之路:Distillation,Quantization,Pruning
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
已删除
将门创投
4+阅读 · 2019年4月1日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Knowledge Distillation from Internal Representations
Arxiv
4+阅读 · 2019年10月8日
Arxiv
5+阅读 · 2019年8月22日
VIP会员
相关VIP内容
专知会员服务
88+阅读 · 2021年6月29日
【AAAI2021】预训练语言模型最新进展,附113页ppt和视频
专知会员服务
64+阅读 · 2021年2月23日
相关资讯
BERT 瘦身之路:Distillation,Quantization,Pruning
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
已删除
将门创投
4+阅读 · 2019年4月1日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员