How it works
Instead of adjusting all the weights of the model, an adapter adds small modules (layers) inside the neural network and trains only those modules. The base model remains frozen, which saves memory and allows swapping adapters depending on the task. Each adapter learns a specific behavior without changing the model's general knowledge.
Practical example
A base language model can receive one adapter for code and another for customer support. Switching adapters changes the model's behavior without reloading the billions of weights of the base model, saving time and memory.
What it's for
It is one of the PEFT techniques and makes model sharing easier: you distribute a base model and several small adapters for different tasks. This is common in open model catalogs and allows cheap customization.
Difference between adapter and LoRA
LoRA is a specific low rank adapter technique. Adapter is a broader concept of an additional trainable layer, which can have different architectures and sizes.