peft logo

peft

Free

🤗 PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.

Model APIsFreeFree tier
Type
Open Source
Company
Hugging Face

About peft

🤗 PEFT (Parameter-Efficient Fine-Tuning) is a library developed by Hugging Face for efficiently adapting large pretrained models to various downstream applications without fine-tuning all of a model's parameters. By only fine-tuning a small number of extra model parameters, PEFT significantly decreases computational and storage costs while yielding performance comparable to fully fine-tuned models. This makes it more accessible to train and store large language models (LLMs) on consumer hardware. The library is integrated with the Transformers, Diffusers, and Accelerate libraries, providing a faster and easier way to load, train, and use large models for inference. PEFT includes quickstart guides, how-to guides for tasks like image classification, causal language modeling, and automatic speech recognition, as well as conceptual guides and technical references.

Key Features

Only fine-tunes a small number of extra parameters, reducing computational and storage costs
Yields performance comparable to fully fine-tuned models
Integrated with Hugging Face Transformers, Diffusers, and Accelerate libraries
Enables training and storing large language models on consumer hardware
Includes quickstart, how-to guides, conceptual guides, and technical reference documentation
Supports various PEFT methods like LoRA and soft prompting

Pros & Cons

Pros
  • Significantly reduces computational and storage costs compared to full fine-tuning
  • Performance nearly matches full fine-tuning for many tasks
  • Makes fine-tuning large models accessible on consumer hardware
  • Seamlessly integrates with popular Hugging Face libraries
  • Open source and free to use

Best For

Image classificationCausal language modelingAutomatic speech recognitionAdapting large pretrained models for various downstream applications

Alternatives to peft