Adapters
A library that adds parameter-efficient fine-tuning methods, such as LoRA and adapters, to more than 20 Hugging Face Transformers models with minimal extra code.
Adapters is an add-on library for Hugging Face's Transformers that integrates more than ten parameter-efficient fine-tuning methods into more than twenty Transformer models. It provides a unified interface for efficient fine-tuning and modular transfer learning, supporting full-precision or quantized training such as Q-LoRA, adapter merging through task arithmetic, and composing multiple adapters together.
A pretrained adapter can be loaded onto a base model and activated directly, or an existing model can be adapted in place by initializing it and adding a new adapter, such as a LoRA configuration, for training with a regular training loop. The library replaced an older adapter-transformers package, with previously trained adapters remaining compatible. It requires Python 3.9+ and PyTorch 2.0+, and is Apache 2.0 licensed.