arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.10503cs.CLcs.LG
收藏

迷你模型适配:通过对齐浅层训练高效地将预训练模型扩展到新语言

Mini-Model Adaptation: Efficiently Extending Pretrained Models to New Languages via Aligned Shallow Training

Cohere AI(Cohere人工智能);University College London(伦敦大学学院);Johns Hopkins University(约翰斯·霍普金斯大学);Meta AI;Reka AI(Reka人工智能)

Kelly Marchisio, Patrick Lewis, Yihong Chen, Mikel Artetxe

AI总结:

本文提出迷你模型适配方法,通过构建浅层迷你模型高效训练新语言嵌入,在XNLI、MLQA和PAWS-X上以平均少2.3倍计算量达到标准跨语言迁移性能。

摘要:

先前的研究表明,可以通过学习一组新的嵌入来将预训练的掩码语言模型(MLMs)扩展到新语言,同时保持Transformer主体冻结。尽管只学习了一小部分参数,但这种方法在计算上并不高效,因为训练新的嵌入需要对整个模型进行完整的前向和后向传播。我们提出迷你模型适配,这是一种计算高效的替代方案,它从大模型的一小部分参数中构建一个浅层迷你模型。然后,可以在迷你模型上高效地训练新的语言特定嵌入,并将其插入到对齐的大模型中,以实现快速的跨语言迁移。我们探索了两种学习迷你模型的方法:MiniJoint,它使用一个带有中间层辅助MLM头的单一Transformer联合预训练主模型和迷你模型;以及MiniPost,它从一个常规预训练模型开始,通过提取并冻结几层来构建迷你模型,并在其上学习少量参数。在XNLI、MLQA和PAWS-X上的实验表明,迷你模型适配以平均少2.3倍的计算量达到了标准方法的性能。

英文摘要:

Prior work shows that it is possible to expand pretrained Masked Language Models (MLMs) to new languages by learning a new set of embeddings, while keeping the transformer body frozen. Despite learning a small subset of parameters, this approach is not compute-efficient, as training the new embeddings requires a full forward and backward pass over the entire model. We propose mini-model adaptation, a compute-efficient alternative that builds a shallow mini-model from a fraction of a large model's parameters. New language-specific embeddings can then be efficiently trained over the mini-model and plugged into the aligned large model for rapid cross-lingual transfer. We explore two approaches to learn mini-models: MiniJoint, which jointly pretrains the primary model and the mini-model using a single transformer with a secondary MLM head at a middle layer; and MiniPost, where we start from a regular pretrained model, build a mini-model by extracting and freezing a few layers, and learn a small number of parameters on top. Experiments on XNLI, MLQA and PAWS-X show that mini-model adaptation matches the performance of the standard approach using 2.3x less compute on average.

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

↑