Hugging Face PEFT Documentation
by Hugging Face
Fine-tune a large model on one GPU, with LoRA and the thirty methods around it.
Overview
PEFT is Hugging Face's parameter-efficient fine-tuning library, and its documentation is the practical reference for adapting a large pretrained model without paying for full fine-tuning. The premise is stated plainly on the front page: fine-tune only a small number of extra parameters, get performance comparable to a fully fine-tuned model, and make training and storage feasible on consumer hardware. The docs back that with concrete numbers rather than claims, reporting full fine-tuning of Stable Diffusion v1.4 at 27.5GB of GPU memory against 15.5GB with PEFT-LoRA and 8.12GB with LoRA plus gradient checkpointing, and transformer models that run out of memory under full fine-tuning training successfully under LoRA. The structure is a Quicktour, a method overview page whose job is to orient you before you commit to a technique, then conceptual guides and task-specific how-tos. Method coverage is unusually deep: LoRA and QLoRA as the baseline; initialisation variants including PiSSA, OLoRA, EVA, CorDA, LoftQ, MiCA and LoRA-GA; scaling and decomposition variants rsLoRA and DoRA; inference-oriented aLoRA and QALoRA; alternative adapter families LoHa, LoKr, AdaLoRA, IA3, OFT and BOFT; soft-prompt methods prompt tuning, prefix tuning and P-tuning; and adapter composition through Arrow and GenKnowSub. PEFT is integrated with Transformers, Diffusers, Accelerate and TRL, so an adapter trained here drops into an existing training script. The repository has passed 21,000 GitHub stars.
At a Glance
- Topic
- Fine-Tuning
- Level
- Intermediate
- Format
- Documentation
- Cost
- Free
- Duration
- Reference docs; ~1 hour for the quicktour, a full day for the method guides
- Provider
- Hugging Face
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Wrap an existing Transformers model with a LoRA config in a few lines
- ✓Choose between LoRA, DoRA, IA3, OFT and soft-prompt methods for a task
- ✓Pick a LoRA initialisation such as PiSSA, OLoRA, EVA or LoftQ
- ✓Combine 4-bit quantisation with LoRA to train large models on one GPU
- ✓Merge adapter weights back into the base model for zero-latency inference
- ✓Load, swap and compose multiple task adapters over a single base model
- ✓Use PEFT inside TRL and Diffusers training scripts without rewriting them
Highlights
- •Documents the whole current method landscape rather than only LoRA: DoRA, PiSSA, EVA, CorDA, aLoRA, Arrow and more
- •States real memory numbers, 27.5GB full fine-tuning versus 8.12GB with LoRA and gradient checkpointing on Stable Diffusion
- •Adapters merge back into base weights, so there is no inference latency penalty in production
- •Integrated with Transformers, Diffusers, Accelerate and TRL, so you add a config rather than a new training loop
- •The method overview page exists specifically to stop you guessing which technique suits your model
Who It’s For
Best For
- ✓Engineers fine-tuning a large model on a single consumer or cloud GPU
- ✓Teams that need many task-specific variants of one base model
- ✓Practitioners moving from full fine-tuning to LoRA and needing the trade-offs
- ✓TRL or Diffusers users who need training to fit in available memory
Prerequisites
- •Working knowledge of Hugging Face Transformers and either Trainer or a custom PyTorch loop
- •Understanding of what fine-tuning does and why full fine-tuning is expensive
- •GPU access, since the memory tables assume you are training rather than only running inference
FAQ
What is Hugging Face PEFT Documentation?
Hugging Face's documentation for PEFT, the library that makes fine-tuning large models affordable by training a small set of extra parameters instead of all of them. It covers LoRA and QLoRA as the default path, then the full surrounding landscape of initialisation, decomposition, soft-prompt and adapter-composition methods, with real GPU memory comparisons and drop-in integration into Transformers, Diffusers, Accelerate and TRL.
Is Hugging Face PEFT Documentation free?
Hugging Face PEFT Documentation is free to access.
What level is Hugging Face PEFT Documentation for?
Hugging Face PEFT Documentation is aimed at a intermediate audience. Recommended background: Working knowledge of Hugging Face Transformers and either Trainer or a custom PyTorch loop, Understanding of what fine-tuning does and why full fine-tuning is expensive, GPU access, since the memory tables assume you are training rather than only running inference.
How long does Hugging Face PEFT Documentation take?
Expect roughly Reference docs; ~1 hour for the quicktour, a full day for the method guides. Most learners work through it at their own pace.
What will I learn from Hugging Face PEFT Documentation?
You'll learn: Wrap an existing Transformers model with a LoRA config in a few lines; Choose between LoRA, DoRA, IA3, OFT and soft-prompt methods for a task; Pick a LoRA initialisation such as PiSSA, OLoRA, EVA or LoftQ; Combine 4-bit quantisation with LoRA to train large models on one GPU; Merge adapter weights back into the base model for zero-latency inference; Load, swap and compose multiple task adapters over a single base model; Use PEFT inside TRL and Diffusers training scripts without rewriting them.
Topics
Sources
This page was written from 3 sources, 1 on domains other than huggingface.co.
- 1.huggingface.co — indexvendor
- 2.github.com — peft
- 3.huggingface.co — adaptervendor