Compacter: Efficient Low-Rank Hypercomplex Adapter Layers

Rabeeh Karimi Mahabadi, James Henderson, Sebastian Ruder
6/8/2021
750 citations
cs.CL
lora-peft-merging

Official code: rabeehk/compacter (132 stars, Python, last commit 2022-08-18).

Abstract

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.

Show full abstract

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}.

View on arXivView PDF

Code Implementations(1)

rabeehk/compacterOfficial100%
13215Python, ShellJun 8, 20214 years ago

Similar Papers

Cite this paper

@article{mahabadi2021compacter,
  title  = {Compacter: Efficient Low-Rank Hypercomplex Adapter Layers},
  author = {Rabeeh Karimi Mahabadi and James Henderson and Sebastian Ruder},
  year   = {2021},
  eprint = {2106.04647},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.04647}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.04647.svg)](https://codeofpaper.com/paper/2106.04647)

Discussion