PEFT (Parameter-Efficient Fine-Tuning) is an open-source Python library made by Hugging Face. Fine-tuning means further training a pretrained model on new data so that it does a specific task; doing this for every parameter of a large language model needs a lot of GPU memory and storage. PEFT methods instead train only a small number of extra parameters and leave the original weights unchanged.
A developer wraps a base model from the Transformers library with a PEFT configuration, for example LoRA (Low-Rank Adaptation, which adds small trainable matrices to some layers), and trains as usual. In the README example only about 0.12% of a 3-billion-parameter model's parameters are trained. The result is a small adapter file that is loaded on top of the base model for inference. The library implements dozens of methods, including LoRA, DoRA, IA3 and prompt tuning, and works with the Transformers, Diffusers and Accelerate libraries.
PEFT is free and open source under the Apache-2.0 license, installed with pip install peft.