Skip to content
Last Dictionary

adapter

nounAlso: adapter module, adapter layer, adapters, bottleneck adapter

In plain wordsA small trainable add-on slotted into a large frozen AI model to teach it a new task or style, like a plug adapter that lets one device work in many countries.

  1. 1

    Parameter-efficient fine-tuning

    A small neural module inserted into a pretrained network and trained for a new task while the original weightsweights, n.: The learned numbers inside a neural network that set how strongly each part influences the next. The finished set of weights is, in effect, the trained model itself. stay frozen. The classic bottleneck adapter, placed after the attention and feed-forward sublayers of each transformertransformer, n.: The design behind today's chatbots and much of modern AI. It handles text by letting every word look at every other word and decide which of them matter for understanding it. block, projects the hidden state down to a small dimension, applies a nonlinearity, projects back up and adds the result through a residual connectionresidual connection, n.: A shortcut in a neural network that adds a block's input straight to its output, so each block only has to learn a correction. It is what makes networks hundreds of layers deep trainable.; initialized near zero, it starts out as an identity function. Because each task needs only its own adapter weights, one base model can serve many tasks, and adapters can be composed or stacked. Unlike LoRAlow-rank adaptation, n.: A cheap way to customize a big AI model: instead of changing all its billions of numbers, you train a small add-on of a few million numbers that slightly adjusts how it behaves. updates, such serial adapters add a little inference latency because they cannot be merged into existing weights.

    We trained one adapter per language and load them on top of the same frozen encoder.

  2. 2

    Loose usage

    Any small, separately stored set of trained parameters applied to a base model, especially a LoRA module (a 'LoRA adapter'); also, in multimodal modelsmultimodal large language model, n.: An AI language model that can also take in — and sometimes produce — pictures, sound or video, so you can show it a photo or speak to it, not just type., the projection layers that connect a vision or audio encoder to a language model.

Origin

Sylvestre-Alvise Rebuffi, Hakan Bilen and Andrea Vedaldi introduced residual adapters for learning many visual domains with one network in 2017. Neil Houlsby and colleagues at Google brought adapter modules to NLP in 2019, adapting BERT to 26 text-classification tasks with only a few percent extra parameters per task (3.6 percent on GLUE); the AdapterHub framework (2020) and later PEFT libraries spread the term.

Usage note

In everyday LLM engineering 'adapter' most often means a LoRA file, so readers should check which mechanism is meant.

Related

See also
  • parameter-efficient fine-tuningparameter-efficient fine-tuning, n.: A family of tricks for customizing a large AI model by training only a tiny fraction of its numbers, or a small add-on, leaving the rest untouched to save memory and money.
  • low-rank adaptationlow-rank adaptation, n.: A cheap way to customize a big AI model: instead of changing all its billions of numbers, you train a small add-on of a few million numbers that slightly adjusts how it behaves.
  • prefix tuningprefix tuning, n.: Customizing a frozen language model by learning a short sequence of invisible 'virtual words' that is placed in front of every input at every layer, steering what the model produces.
  • transfer learningtransfer learning, n.: Reusing what a model learned on one task to get a head start on another — like a pianist picking up the organ faster than a beginner. It lets models learn new jobs from little data.
  • residual connectionresidual connection, n.: A shortcut in a neural network that adds a block's input straight to its output, so each block only has to learn a correction. It is what makes networks hundreds of layers deep trainable.
  • fine-tuningfine-tuning, n.: Taking an AI model that has already learned a lot and training it a little more on a smaller, focused set of examples so it gets better at one job or behaves a certain way.
Contrast with
  • full fine-tuningfull fine-tuning, n.: Fine-tuning in which every one of a model's internal numbers is allowed to change — the most flexible option, but also the most expensive in memory and storage.

Sources

  1. Houlsby, N. et al. (2019). Parameter-Efficient Transfer Learning for NLP. ICML 2019. arXiv:1902.00751. arxiv.org/abs/1902.00751
  2. Rebuffi, S.-A., Bilen, H. & Vedaldi, A. (2017). Learning multiple visual domains with residual adapters. NeurIPS 2017.

Mentioned in

catastrophic forgettingcatastrophic forgetting, n.: When a neural network trained on something new gets suddenly and badly worse at what it could already do, because the new training rewrites the internal settings the old skills relied on., continual learningcontinual learning, n.: The ability of an AI to keep learning new things over time from a stream of experience, without forgetting what it already knew and without being retrained from scratch., low-rank adaptationlow-rank adaptation, n.: A cheap way to customize a big AI model: instead of changing all its billions of numbers, you train a small add-on of a few million numbers that slightly adjusts how it behaves., parameter-efficient fine-tuningparameter-efficient fine-tuning, n.: A family of tricks for customizing a large AI model by training only a tiny fraction of its numbers, or a small add-on, leaving the rest untouched to save memory and money., prefix tuningprefix tuning, n.: Customizing a frozen language model by learning a short sequence of invisible 'virtual words' that is placed in front of every input at every layer, steering what the model produces.