peft

PEFT provides parameter-efficient fine-tuning methods for adapting pretrained machine learning models.

github.com/huggingface/peft
peft homepage screenshot

About peft

PEFT is an open-source Python library from Hugging Face for parameter-efficient fine-tuning, which adapts large pretrained models to new tasks. Instead of updating all of a model's parameters, PEFT methods train only a small number of added parameters. The project states that this reduces computational and storage costs.

A typical workflow installs the package with pip, wraps a base model and a PEFT configuration such as LoRA using get_peft_model, trains the model, saves it, and later loads it for inference with PeftModel. The project reports memory figures for one setup: an A100 80GB GPU, more than 64GB of CPU RAM, and the ought/raft/twitter_complaints dataset. The source does not say how these results apply to other hardware or tasks. It describes recent PEFT techniques as achieving performance comparable to full fine-tuning, not identical results.

Key features

  • Trains a small number of added parameters instead of all model parameters
  • LoRA configuration applied to a base model with get_peft_model
  • Saving adapter weights with save_pretrained
  • Loading adapters for inference with PeftModel.from_pretrained
  • Reporting trainable parameter counts with print_trainable_parameters
  • Integration with Transformers, Diffusers, and Accelerate
Best for: Machine learning practitioners and researchers who fine-tune large pretrained models and want to reduce compute and storage requirements.
Good for
  • The project states that PEFT reduces computational and storage costs compared with full fine-tuning.
  • The memory table lists lower GPU memory for LoRA than for full fine-tuning on the models shown, such as 14.4GB compared with 47.14GB for bigscience/T0_3B.
  • It is integrated with Transformers, Diffusers, and Accelerate.
Watch out for
  • The memory figures apply only to the hardware and dataset described in the source.
  • The source describes PEFT performance as comparable to full fine-tuning, not identical to it.
  • In the offloading example, LoRA with DeepSpeed CPU offloading uses 52GB of CPU memory for bigscience/mt0-xxl, so lower GPU memory can mean higher CPU memory use.

peft at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

peft alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in ML Training & Optimization

Well-known listings from the same topic.

All 75

peft FAQ

How do I install PEFT?
The source shows installation with pip install peft.
How is a PEFT model saved and loaded again?
The model is saved with save_pretrained, and a saved PEFT model is loaded for inference with PeftModel.from_pretrained applied to the base model.
Does PEFT train all of a model's parameters?
No. PEFT methods fine-tune only a small number of extra model parameters instead of all of the model's parameters.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing