Large pre-trained language models such as BERT have shown their effectiveness in various natural language processing tasks. However, the huge parameter size makes them difficult to be deployed in real-time applications that require quick inference with limited resources. Existing methods compress BERT into small models while such compression is task-independent, i.e., the same compressed BERT for all different downstream tasks. Motivated by the necessity and benefits of task-oriented BERT compression, we propose a novel compression method, AdaBERT, that leverages differentiable Neural Architecture Search to automatically compress BERT into task-adaptive small models for specific tasks. We incorporate a task-oriented knowledge distillation loss to provide search hints and an efficiency-aware loss as search constraints, which enables a good trade-off between efficiency and effectiveness for task-adaptive BERT compression. We evaluate AdaBERT on several NLP tasks, and the results demonstrate that those task-adaptive compressed models are 12.7x to 29.3x faster than BERT in inference time and 11.5x to 17.0x smaller in terms of parameter size, while comparable performance is maintained.


翻译:在各种自然语言处理任务中,如BERT等经过预先培训的大型语言模型显示了其有效性。然而,由于参数大小巨大,难以在需要利用有限资源快速推断的实时应用中应用。现有的方法将BERT压缩成小型模型,而这种压缩是任务独立的,即对所有不同的下游任务而言,同样的压缩BERT。我们根据任务导向的BERT压缩工作的必要性和好处,提出了一种新的压缩方法AdaBERT, 利用可区分的神经结构搜索来自动压缩BERT进入任务适应的小模型。我们纳入了以任务为导向的知识蒸馏损失,以提供搜索提示和效率意识损失作为搜索限制,从而在任务适应的BERT压缩工作效率和效果之间实现良好的交换。我们评估了几项任务导向的压缩任务,结果显示这些任务适应性压缩模型比BERT在延长时间中的速度要快12.7x至29.3x,在参数大小方面比BERT要快11.5x小至17.0x。

0
下载
关闭预览

相关内容

专知会员服务
61+阅读 · 2020年3月19日
【强化学习资源集合】Awesome Reinforcement Learning
专知会员服务
98+阅读 · 2019年12月23日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
53+阅读 · 2019年9月29日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Deep Compression/Acceleration:模型压缩加速论文汇总
极市平台
14+阅读 · 2019年5月15日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
Arxiv
1+阅读 · 2021年3月16日
Arxiv
0+阅读 · 2021年3月15日
Arxiv
8+阅读 · 2020年10月9日
Arxiv
5+阅读 · 2019年10月31日
Arxiv
3+阅读 · 2018年6月24日
VIP会员
最新内容
非对称优势:美海军开发低成本反无人机技术
专知会员服务
4+阅读 · 今天4:39
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
5+阅读 · 今天2:48
《军事模拟:将军事条令与目标融入AI智能体》
专知会员服务
8+阅读 · 今天2:43
【NTU博士论文】3D人体动作生成
专知会员服务
6+阅读 · 4月24日
以色列军事技术对美国军力发展的持续性赋能
专知会员服务
8+阅读 · 4月24日
《深度强化学习在兵棋推演中的应用》40页报告
专知会员服务
13+阅读 · 4月24日
《多域作战面临复杂现实》
专知会员服务
9+阅读 · 4月24日
《印度的多域作战:条令与能力发展》报告
专知会员服务
4+阅读 · 4月24日
相关资讯
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Deep Compression/Acceleration:模型压缩加速论文汇总
极市平台
14+阅读 · 2019年5月15日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
相关论文
Arxiv
1+阅读 · 2021年3月16日
Arxiv
0+阅读 · 2021年3月15日
Arxiv
8+阅读 · 2020年10月9日
Arxiv
5+阅读 · 2019年10月31日
Arxiv
3+阅读 · 2018年6月24日
Top
微信扫码咨询专知VIP会员