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

MoEBERT:通过重要性导向自适应从BERT到混合专家模型

MoEBERT: from BERT to Mixture-of-Experts via Importance-Guided Adaptation

Georgia Institute of Technology(佐治亚理工学院);Microsoft(微软)

Simiao Zuo, Qingru Zhang, Chen Liang, Pengcheng He, Tuo Zhao, Weizhu Chen

摘要:

预先训练的语言模型在各种自然语言处理任务中表现出卓越的性能。然而,这些模型通常包含数亿个参数,这限制了它们的实用性,因为在现实世界的应用程序中的延迟要求。现有的方法通过知识蒸馏来训练小的压缩模型。然而,与预训练模型相比,这些小模型的性能显着下降,这是由于它们的模型容量减少。我们提出了MoEBERT,它使用了一个混合专家模型结构,以增加模型容量和推理速度。我们通过将预训练模型中的前馈神经网络适应多个专家来初始化MoEBERT。因此,预训练模型的表示能力在很大程度上得到了保留。在推理过程中,只有一个专家被激活,这样可以提高速度。我们还提出了一种分层蒸馏方法来训练MoEBERT。我们验证了MoEBERT在自然语言理解和问答任务上的效率和有效性。实验结果表明,该方法优于现有的特定任务的蒸馏算法。例如,我们的方法在MNLI(不匹配)数据集上的性能优于以前的方法超过2%。我们的代码可在https://github.com/SimiaoZuo/MoEBERT上公开获取。

英文摘要:

Pre-trained language models have demonstrated superior performance in various natural language processing tasks. However, these models usually contain hundreds of millions of parameters, which limits their practicality because of latency requirements in real-world applications. Existing methods train small compressed models via knowledge distillation. However, performance of these small models drops significantly compared with the pre-trained models due to their reduced model capacity. We propose MoEBERT, which uses a Mixture-of-Experts structure to increase model capacity and inference speed. We initialize MoEBERT by adapting the feed-forward neural networks in a pre-trained model into multiple experts. As such, representation power of the pre-trained model is largely retained. During inference, only one of the experts is activated, such that speed can be improved. We also propose a layer-wise distillation method to train MoEBERT. We validate the efficiency and effectiveness of MoEBERT on natural language understanding and question answering tasks. Results show that the proposed method outperforms existing task-specific distillation algorithms. For example, our method outperforms previous approaches by over 2% on the MNLI (mismatched) dataset. Our code is publicly available at https://github.com/SimiaoZuo/MoEBERT.

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

↑