arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2004.02984cs.CLcs.LG
收藏

MobileBERT:一种用于资源受限设备的紧凑型任务无关BERT

MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices

Carnegie Mellon University(卡内基梅隆大学);Google Brain(谷歌大脑)

Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, Denny Zhou

摘要:

自然语言处理(NLP)最近通过使用具有数亿个参数的巨大预训练模型取得了巨大成功。然而,这些模型的模型尺寸大且延迟高,因此无法部署到资源有限的移动设备。在本文中,我们提出了MobileBERT压缩和加速流行的BERT模型。与最初的BERT一样,MobileBERT是任务不可知的,也就是说,它可以通过简单的微调通用地应用于各种下游NLP任务。基本上,MobileBERT是BERT_LARGE的精简版,同时配备了瓶颈结构以及精心设计的自我关注和前馈网络之间的平衡。为了训练MobileBERT,我们首先训练了一个专门设计的教师模型,一个倒瓶颈合并的BERT_LARGE模型。然后,我们进行知识转移从这个老师到MobileBERT。实证研究表明,MobileBERT比BERT_BASE小4.3倍,快5.5倍,同时在知名基准测试中取得了有竞争力的结果。在GLUE的自然语言推理任务中,MobileBERT在Pixel 4手机上的GLUE得分为77.7(比BERT_BASE低0.6),延迟为62 ms。在SQuAD v1.1/v2.0问答任务中,MobileBERT的开发F1得分为90.0/79.2(比BERT_BASE高1.5/2.1)。

英文摘要:

Natural Language Processing (NLP) has recently achieved great success by using huge pre-trained models with hundreds of millions of parameters. However, these models suffer from heavy model sizes and high latency such that they cannot be deployed to resource-limited mobile devices. In this paper, we propose MobileBERT for compressing and accelerating the popular BERT model. Like the original BERT, MobileBERT is task-agnostic, that is, it can be generically applied to various downstream NLP tasks via simple fine-tuning. Basically, MobileBERT is a thin version of BERT_LARGE, while equipped with bottleneck structures and a carefully designed balance between self-attentions and feed-forward networks. To train MobileBERT, we first train a specially designed teacher model, an inverted-bottleneck incorporated BERT_LARGE model. Then, we conduct knowledge transfer from this teacher to MobileBERT. Empirical studies show that MobileBERT is 4.3x smaller and 5.5x faster than BERT_BASE while achieving competitive results on well-known benchmarks. On the natural language inference tasks of GLUE, MobileBERT achieves a GLUEscore o 77.7 (0.6 lower than BERT_BASE), and 62 ms latency on a Pixel 4 phone. On the SQuAD v1.1/v2.0 question answering task, MobileBERT achieves a dev F1 score of 90.0/79.2 (1.5/2.1 higher than BERT_BASE).

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

↑