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

Compacter:高效的低秩超复数适配层

Compacter: Efficient Low-Rank Hypercomplex Adapter Layers

EPFL University(洛桑联邦理工学院);Idiap Research Institute(IDIAP研究所);DeepMind

Rabeeh Karimi Mahabadi, James Henderson, Sebastian Ruder

摘要:

通过微调使大规模预训练的语言模型适应下游任务是在NLP基准测试中实现最先进性能的标准方法。然而,使用数百万或数十亿个参数微调模型的所有权重是样本效率低下的,在低资源设置中不稳定,并且浪费,因为它需要为每个任务存储模型的单独副本。最近的工作已经开发了参数高效微调方法,但这些方法仍然需要相对大量的参数或低于标准的微调。在这项工作中,我们提出了紧凑,微调大规模的语言模型的方法,任务性能和可训练参数的数量之间有一个更好的权衡比以前的工作。Compactor通过构建适配器、低秩优化和参数化超复数乘法层的思想来实现这一点。具体来说,Compacter将特定于任务的权重矩阵插入到预训练模型的权重中,这些权重被有效地计算为共享的“慢”权重和每个Compacter层定义的“快”秩一矩阵之间的Kronecker乘积之和。通过只训练0.047%的预训练模型参数,Compacter在GLUE上的性能与标准微调相当,在SuperGLUE和低资源设置上的性能优于标准微调。我们的代码可在~ \url{https://github.com/rabeehk/compacter}上公开获得。

英文摘要:

Adapting large-scale pretrained language models to downstream tasks via fine-tuning is the standard method for achieving state-of-the-art performance on NLP benchmarks. However, fine-tuning all weights of models with millions or billions of parameters is sample-inefficient, unstable in low-resource settings, and wasteful as it requires storing a separate copy of the model for each task. Recent work has developed parameter-efficient fine-tuning methods, but these approaches either still require a relatively large number of parameters or underperform standard fine-tuning. In this work, we propose Compacter, a method for fine-tuning large-scale language models with a better trade-off between task performance and the number of trainable parameters than prior work. Compacter accomplishes this by building on top of ideas from adapters, low-rank optimization, and parameterized hypercomplex multiplication layers. Specifically, Compacter inserts task-specific weight matrices into a pretrained model's weights, which are computed efficiently as a sum of Kronecker products between shared "slow" weights and "fast" rank-one matrices defined per Compacter layer. By only training 0.047% of a pretrained model's parameters, Compacter performs on par with standard fine-tuning on GLUE and outperforms standard fine-tuning on SuperGLUE and low-resource settings. Our code is publicly available at~\url{https://github.com/rabeehk/compacter}.

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

↑