PEFT

Hugging Face's library of state-of-the-art parameter-efficient fine-tuning methods for large models.

Library
PyPI
v0.20.0
21,559stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
91/100Excellent
Development Activity100
Maintenance96
Community76
Maturity52
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture86
Code Quality87
Innovation88
Learning Curve76

PEFT (Parameter-Efficient Fine-Tuning) lets you adapt large pretrained models — language models, diffusion models, and more — to new tasks by training only a small fraction of their parameters instead of the full model. Methods like LoRA, prefix tuning, prompt tuning, and IA3 wrap a base model with lightweight adapter layers, cutting GPU memory and storage requirements dramatically (checkpoints shrink from gigabytes to megabytes) while achieving accuracy comparable to full fine-tuning.

PEFT is built and maintained by Hugging Face and integrates directly with Transformers (model.add_adapter), Diffusers (LoRA adapters for Stable Diffusion), Accelerate (distributed training), and TRL (RLHF fine-tuning), so it slots into workflows teams are likely already using rather than requiring a separate training stack.

What You Get

  • Implementations of state-of-the-art PEFT methods (LoRA, prefix tuning, prompt tuning, P-tuning, IA3, and more) under src/peft/tuners
  • A simple get_peft_model() wrapping API that turns any compatible Transformers/Diffusers model into a PEFT-trainable model
  • Direct integration with Transformers (add_adapter/load_adapter/set_adapter), Diffusers, Accelerate, and TRL
  • Support for combining PEFT with quantization (e.g. QLoRA) to fine-tune large LLMs on consumer-grade GPUs
  • Small, portable adapter checkpoints (often single-digit MBs) instead of full multi-gigabyte model copies per task

Common Use Cases

  • Fine-tuning a multi-billion-parameter LLM on a single consumer or prosumer GPU using LoRA or QLoRA
  • Training and swapping multiple task-specific adapters against one shared frozen base model to save storage
  • Fine-tuning Stable Diffusion or other diffusion models with LoRA adapters for custom styles or subjects
  • Applying RLHF/DPO fine-tuning to LLMs via TRL with PEFT adapters to keep training memory manageable

Under The Hood

Architecture - PEFT’s core lives in src/peft/tuners/ (one module per method — LoRA, prefix tuning, prompt tuning, IA3, and others — each implementing how adapter parameters are injected into and merged with a base model’s layers), src/peft/utils/ (shared helpers for parameter freezing, saving/loading adapters, and config handling), and src/peft/optimizers/ (PEFT-aware optimizer utilities). The PeftModel/get_peft_model() entry points wrap an arbitrary Transformers or Diffusers model, replacing target layers with adapter-augmented equivalents while keeping the base model’s weights frozen.

Tech Stack - Nearly pure Python (99.6% of the codebase) built directly on PyTorch, with tight integration points into transformers, diffusers, accelerate, and bitsandbytes (for quantized fine-tuning) rather than reimplementing model internals. A small amount of CUDA/C++ exists for specific low-level ops.

Code Quality - 63 test files exercise the tuners, config serialization, and integration points; the project has a fast, steady release cadence (32 releases, ~44 commits/month) reflecting active maintenance by a large contributor base (325 contributors) led by the Hugging Face team.

API Design - The core workflow is deliberately small: define a LoraConfig (or equivalent), call get_peft_model(model, peft_config), then train and save_pretrained() as usual — familiar to anyone who already uses Transformers’ Trainer. model.print_trainable_parameters() gives an immediate, concrete sense of how much compute is being saved, which lowers the barrier to trusting the technique on a first try.

Used by 9 apps in this directory

Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,081

Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.

View details
65
Repo Health
81
Technical
63
Dependency
Built with
Python59%
Jupyter Notebook21%
Updated 2 days ago
Python
88%
Apache 2.0

ART

AI Development

10,603

Give your LLM agents on-the-job training—ART lets you apply GRPO reinforcement learning to any multi-step agentic workflow with minimal code changes.

View details
85
Repo Health
82
Technical
72
Dependency
Built with
Python88%
Cuda10%
Updated today
Python
100%
Apache 2.0

ClearML

Devops · Automation

6,827

Auto-magical MLOps platform that tracks experiments, versions data, orchestrates pipelines, and serves models with just two lines of code.

View details
94
Repo Health
79
Technical
69
Dependency
Built with
Python100%
Updated yesterday
Python
91%
MIT

Gemma Multimodal Fine-Tuner

AI Development

1,498

An Apple-Silicon-native LoRA fine-tuning tool for Gemma on text, image, and audio data — with a wizard CLI, live browser-based training visualizer, and streaming from GCS/BigQuery for datasets too large for local disk.

View details
51
Repo Health
68
Technical
76
Dependency
Built with
Python91%
Updated 6 days ago
C++
52%
MIT

GPT4All

AI Development · AI Assistants

77,403

Run large language models privately on your laptop — no GPU, no cloud, no data leaving your device.

View details
53
Repo Health
80
Technical
74
Dependency
Built with
C++52%
QML30%
Updated 1 years ago
Python
61%
Apache 2.0

marimo

Developer Tools · Data Engineering

22,393

A reactive Python notebook that eliminates hidden state, runs reproducibly, and deploys as a web app or script — stored as pure Python, built for the AI era.

View details
90
Repo Health
91
Technical
66
Dependency
Built with
Python61%
TypeScript37%
Updated today
Go
91%
MIT

NornicDB

Databases · AI Development

842

A single graph+vector+temporal database for AI workloads — Neo4j-compatible, sub-millisecond hybrid search, and built-in memory decay.

View details
79
Repo Health
82
Technical
72
Dependency
Built with
Go91%
Updated yesterday
Rust
63%
MIT

PostgresML

Databases · AI Development

6,817

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
65
Dependency
Built with
Rust63%
JavaScript11%
Updated 1 years ago
Python
76%
Apache 2.0

Second Me

Productivity · AI Assistants

15,668

Train a locally hosted AI twin on your own memories—then connect it to the world through a decentralized identity network.

View details
41
Repo Health
75
Technical
67
Dependency
Built with
Python76%
TypeScript19%
Updated 10 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search