Skip to main content
QUICK REVIEW

[论文解读] Load What You Need: Smaller Versions of Multilingual BERT

Amine Abdaoui, Camille Pradel|arXiv (Cornell University)|Oct 12, 2020
Topic Modeling参考文献 14被引用 9
一句话总结

本文通过减少支持的语言数量,提出更小、更高效的多语言 BERT 版本,重点针对参数最多的嵌入层。通过在特定语言子集上训练模型,作者实现了高达 45% 的参数减少,同时在 XNLI 上保持了相近的性能表现,优于 DistilM-BERT 等蒸馏模型,后者出现了 1.7%–6% 的准确率下降。

ABSTRACT

Pre-trained Transformer-based models are achieving state-of-the-art results on a variety of Natural Language Processing data sets. However, the size of these models is often a drawback for their deployment in real production applications. In the case of multilingual models, most of the parameters are located in the embeddings layer. Therefore, reducing the vocabulary size should have an important impact on the total number of parameters. In this paper, we propose to generate smaller models that handle fewer number of languages according to the targeted corpora. We present an evaluation of smaller versions of multilingual BERT on the XNLI data set, but we believe that this method may be applied to other multilingual transformers. The obtained results confirm that we can generate smaller models that keep comparable results, while reducing up to 45% of the total number of parameters. We compared our models with DistilmBERT (a distilled version of multilingual BERT) and showed that unlike language reduction, distillation induced a 1.7% to 6% drop in the overall accuracy on the XNLI data set. The presented models and code are publicly available.

研究动机与目标

  • 解决大尺寸多语言 BERT 模型在实际部署中计算成本过高的问题。
  • 探究减少支持语言数量是否能显著减小模型大小而不影响性能。
  • 开发针对特定语言需求定制的小型、高效多语言 BERT 变体。
  • 将语言减少与知识蒸馏作为模型压缩策略进行比较。
  • 提供公开可用的、针对特定语言语料优化的小型多语言 BERT 模型。

提出的方法

  • 作者通过仅选择与目标语料库相关的语言来训练更小的多语言 BERT 模型,从而减少词汇表大小。
  • 他们将重点放在嵌入层,因为该层在多语言 BERT 中包含绝大多数参数,是压缩的主要目标。
  • 模型在 XNLI 基准上进行微调,以评估其在跨语言自然语言蕴含任务上的性能。
  • 他们将语言减少模型的性能与 DistilM-BERT(多语言 BERT 的蒸馏版本)进行比较。
  • 训练和评估使用标准的 BERT 微调协议,在 XNLI 数据集上进行。
  • 最终模型已公开发布,以支持低资源环境下的研究与部署。

实验结果

研究问题

  • RQ1在多语言 BERT 中减少语言数量是否能显著减小模型大小,同时保持性能?
  • RQ2在准确率和参数效率方面,语言减少与知识蒸馏相比如何?
  • RQ3通过仅针对特定应用的相关语言进行优化,模型大小最多可减少多少?
  • RQ4更小、语言减少的模型性能是否仍能与 DistilM-BERT 等蒸馏模型保持竞争力?
  • RQ5能否在生产环境中有效训练并部署更小、任务特定的多语言 BERT 模型?

主要发现

  • 所提出的语言减少模型相比完整多语言 BERT,总参数数量最多减少了 45%。
  • 语言减少模型在 XNLI 基准上的性能与完整多语言 BERT 相当,准确率下降极小。
  • 与蒸馏方法不同,语言减少未导致准确率显著下降,而 DistilM-BERT 的整体准确率下降了 1.7% 至 6%。
  • 该方法在多个语言子集上均表现有效,证明当针对特定语言需求定制时,可显著减小模型大小而不损失性能。
  • 作者确认嵌入层是多语言 BERT 中参数膨胀的主要来源,因此语言减少是一种极为有效的压缩策略。
  • 发布的模型公开可用,使研究人员和实践者能够为特定应用场景部署更小、更高效的多语言模型。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。