MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
Zhiqing Sun Thanks: This work was done when the first author was an intern at Google Brain. Affiliation: Carnegie Mellon University {zhiqings, Hongkun Yu Affiliation: Google Brain {hongkuny, xiaodansong, renjieliu, Xiaodan Song Affiliation: Google Brain {hongkuny, xiaodansong, renjieliu, Renjie Liu Affiliation: Google Brain {hongkuny, xiaodansong, renjieliu, Yiming Yang Affiliation: Carnegie Mellon University {zhiqings, Denny Zhou Affiliation: Google Brain {hongkuny, xiaodansong, renjieliu,
Abstract
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 $\text{BERT}_{\text{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 $\text{BERT}_{\text{LARGE}}$ model. Then, we conduct knowledge transfer from this teacher to MobileBERT. Empirical studies show that MobileBERT is 4.3 $\times$ smaller and 5.5 $\times$ faster than $\text{BERT}_{\text{BASE}}$ while achieving competitive results on well-known benchmarks. On the natural language inference tasks of GLUE, MobileBERT achieves a GLUE scor
原文 arXiv:2004.02984;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2004.02984v2