huggingface

peft: Adapt Large Models with Fewer Trainable Parameters

Hugging Face PEFT adapts large pretrained models by training a small set of additional parameters instead of the full model. It integrates with Transformers, Diffusers, Accelerate, and TRL to support training and inference across varied hardware setups.

ActivePythonApache-2.0AIMachine LearningLibrary
Stars
21.9k
Forks
2.6k
Stars, last 30 days
+97
Last commit
today
Contributors
100+

Our take

Activeregular commits and releases

Health score

69/100

How it is scored
Activity
73
Community
87
Issues
70
Pull requests
45

+97 stars in the last 30 days

  • More contributors than 78% of the projects we track
  • Merges more pull requests than 77% of the projects we track
  • Slower to merge pull requests than 86% of the projects we track

PEFT is a mature, actively maintained choice for Hugging Face model adaptation, with broad ecosystem integration and a permissive Apache-2.0 license.

Good fit if

  • You work with pretrained models in Transformers or Diffusers and want to fine-tune adapters rather than all model parameters.
  • Smaller adapter checkpoints and reduced training resource use matter to your workflow.
  • You value an active project with regular releases, a broad contributor base, and prompt issue and pull-request handling.

Look elsewhere if

  • You need a complete training platform rather than a library to integrate into your Python workflow.
  • You depend on functionality available only in PEFT when using Transformers' built-in adapter integration, such as merging adapters into the base model.
  • Your models or workflows are outside the supported PEFT methods and integrations, and you cannot configure them yourself.
All health signals
Last commit2026-10-29 (today)
Commits, last 90 days100+
Releases, last 12 months8 (latest v0.21.2, 2026-10-01)
Contributors100+ (top contributor: 34% of commits)
Issues closed, last 90 days23+ (typically closed in 3 days)
Pull requests merged, last 90 days57 (typically merged in 4 days)
Project age3 years

Checked on 2026-10-29 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

21,892

Forks

2,670

Change since Nov 15, 2026: +3 stars·+1 forks

Overview

Hugging Face PEFT is a Python library for parameter-efficient fine-tuning of large pretrained models. Built to work with Hugging Face Transformers, Diffusers, Accelerate, and TRL, it helps teams adapt models for downstream tasks while reducing the compute and storage costs of updating every parameter.

It is aimed at developers and researchers who need to fine-tune or serve adapted models with smaller resource budgets, or manage multiple task-specific adapters. Its integrations cover language and diffusion workflows, with Accelerate supporting distributed work across GPUs, TPUs, and Apple Silicon.

Key Features

  • Apply methods such as LoRA, soft prompts, and IA3 to pretrained models.
  • Wrap a Transformers model with a PEFT configuration and inspect the trainable parameter count.
  • Save and load adapter checkpoints separately from the base model.
  • Load and switch between adapters through Transformers integration.
  • Use PEFT with Diffusers for parameter-efficient diffusion model training.
  • Combine PEFT with Accelerate for distributed training and inference.
  • Use adapters with TRL workflows, including preference optimization and RLHF training.

Use Cases

  • Fine-tune a language model for a specialized dataset when full-model training is too costly.
  • Keep separate compact adapters for different tasks or datasets while sharing one base model.
  • Train diffusion model adaptations, such as LoRA-based customization, with lower memory requirements.
  • Add parameter-efficient tuning to distributed or reinforcement-learning workflows built with Accelerate or TRL.

What you need

Detected in the repository

  • Python (from pyproject.toml)
  • A test suite and automated checks on GitHub Actions

License in plain words

Apache-2.0permissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the license, the NOTICE file and a note of your changes
  • Share your changes: no
  • Includes an explicit patent grant from the contributors:

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install from pip:

pip install peft

See the README and documentation for setup and usage details.

Alternatives

  • axolotl: Axolotl is an end-to-end post-training framework with data and training workflows, while PEFT focuses on parameter-efficient adapter methods and integrations.
  • litgpt: LitGPT provides configurable workflows for pretraining, fine-tuning, evaluation, and serving, while PEFT focuses on parameter-efficient tuning methods.
  • LlamaFactory: LlamaFactory offers CLI and web workflows for fine-tuning and model export, while PEFT is a library centered on adapter methods and integrations.
ProjectLanguageLicenseStarsStatus
peftPythonApache-2.021.9kActive
axolotlPythonApache-2.012.6kActive
litgptPythonApache-2.013.7kActive
LlamaFactoryPythonApache-2.075.3kActive

Considerations

PEFT is a Python library, not a standalone training service. The README demonstrates it alongside PyTorch and Transformers, and the hardware needed depends on the base model and workload; PEFT reduces requirements but does not remove them. The README also notes that Transformers' built-in integration does not provide every PEFT capability, including adapter merging. The Apache-2.0 license permits broad use, subject to its license terms and obligations.

Found this useful?

Share it with someone who would like peft.

Comparisons