---
title: "Parameter-Efficient Fine-Tuning using 🤗 PEFT"
description: "Hugging Face's PEFT library brings parameter-efficient fine-tuning methods (LoRA, Prefix Tuning, Prompt Tuning, P-Tuning) to Transformers and Accelerate."
url: "https://swe.quest/articles/parameter-efficient-fine-tuning-using-peft-5c28b9ec4e65b0a1"
canonical: "https://huggingface.co/blog/peft"
source: "Hugging Face"
published: "2023-02-10"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["model-training","llms","python"]
---

# Parameter-Efficient Fine-Tuning using 🤗 PEFT

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-02-10, 5 min read, Announcement. Original: [https://huggingface.co/blog/peft](https://huggingface.co/blog/peft)

## Summary

Hugging Face's PEFT library brings parameter-efficient fine-tuning methods (LoRA, Prefix Tuning, Prompt Tuning, P-Tuning) to Transformers and Accelerate. Most pretrained weights stay frozen and only a small set of extra parameters is trained, which gives performance comparable to full fine-tuning at a fraction of the compute and storage cost. A LoRA config on mt0-large trains about 0.19% of the parameters, and the saved adapters are only a few MB (19MB for T0\_3B) instead of 40GB per-task checkpoints. Example use cases include tuning T0\_3B on 11GB consumer GPUs with DeepSpeed offload, INT8 tuning of OPT-6.7b in Colab with bitsandbytes, and Stable Diffusion Dreambooth, plus code for training, saving and loading adapters.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- transformer models
- fine-tuning basics ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- Hugging Face Transformers

## Keywords

PEFT, LoRA, Hugging Face Transformers, Accelerate, DeepSpeed, bitsandbytes, Prompt Tuning, Stable Diffusion

## Related posts

- [Fine-tuning 20B LLMs with RLHF on a 24GB consumer GPU](https://swe.quest/articles/fine-tuning-20b-llms-with-rlhf-on-a-24gb-consumer-gpu-7ad6c7bb6c14c3cf.md): Hugging Face · 2023-03-09 · Hard · 11 min read · Model training, LLMs, Machine learning, Python
  Combining trl with peft and bitsandbytes makes RLHF fine-tuning of a 20B-parameter LLM feasible on a single 24GB consumer GPU.
- [Beyond LoRA: Can you beat the most popular fine-tuning technique?](https://swe.quest/articles/beyond-lora-can-you-beat-the-most-popular-fine-tuning-technique-ce7bf6b22fef0efd.md): Hugging Face · 2026-06-18 · Medium · 13 min read · Model training, LLMs, Evaluation
  LoRA accounts for roughly 95–98% of PEFT usage across Hugging Face Hub model cards and image-generation checkpoints, but controlled benchmarks in the PEFT library show it is often not the best tradeoff.
- [What is LLM fine-tuning?](https://swe.quest/articles/what-is-llm-fine-tuning-818b56b81ea17fe8.md): Modal · 2024-12-10 · Medium · 13 min read · Model training, LLMs
  Fine-tuning adjusts a pretrained LLM's weights for a specific task or domain, often matching larger models' quality at lower cost and latency.
- [LoRA Explained: Faster, More Efficient Fine-Tuning with Docker](https://swe.quest/articles/lora-explained-faster-more-efficient-fine-tuning-with-docker-c2d6a36ff181eafe.md): Docker · 2025-10-09 · Medium · 8 min read · Model training, LLMs, Privacy
  Gemma 3 270M can be specialized into a compact PII-masking assistant using LoRA, which freezes the base weights and trains only small low-rank adapters, cutting compute and memory needs while avoiding catastrophic forgetting.
- [Make LLM Fine-tuning 2x faster with Unsloth and 🤗 TRL](https://swe.quest/articles/make-llm-fine-tuning-2x-faster-with-unsloth-and-trl-5db8c0b6a40cf74e.md): Hugging Face · 2024-01-10 · Medium · 5 min read · Model training, LLMs, Performance engineering, Python
  Unsloth speeds up QLoRA fine-tuning of Llama and Mistral-family models by rewriting PyTorch modules as Triton kernels with manually derived backpropagation.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
