What is PEFT?

PEFT (Parameter-Efficient Fine-Tuning) is a family of methods that adapts a pretrained model by training selected existing parameters or a comparatively small set of added parameters while most base weights remain frozen. Parameter efficiency does not by itself guarantee a fixed memory reduction or the quality of full fine-tuning.

Quick Facts

Full NameParameter-Efficient Fine-Tuning
CreatedVarious techniques from 2019-2023, unified by Hugging Face
SpecificationOfficial Specification

How It Works

PEFT is a method family, not one algorithm and not a synonym for the Hugging Face PEFT library. Additive methods insert bottleneck modules or learned soft prompts; selective methods update chosen existing parameters; reparameterized methods such as LoRA express an update through smaller trainable factors; hybrid approaches combine mechanisms or quantize the frozen base. These choices affect trainable state, activation memory, optimizer state, context use, inference work, mergeability, and backend support differently. A lower trainable-parameter count usually reduces gradient, optimizer, and checkpoint state, but peak training memory still includes base weights, activations, temporary buffers, runtime state, and safety headroom. Quality must be measured against the unchanged base and a full-tuning candidate when that comparison matters. A PEFT checkpoint is normally a base-dependent artifact rather than a standalone model, so release records need the immutable base, tokenizer, template, method configuration, data revisions, evaluation report, serving composition, and rollback target.

Key Characteristics

  • Covers additive, selective, reparameterized, and hybrid adaptation methods rather than one fixed architecture
  • Keeps most base parameters frozen while training a method-specific subset or newly introduced state
  • Reduces trainable and checkpoint state, but peak memory depends on weights, activations, sequence shape, precision, optimizer, and runtime
  • Produces behavior that must be evaluated by task slice, regression slice, safety policy, and repeated seed
  • Usually creates a base-dependent checkpoint whose compatibility includes model, tokenizer, template, framework, and method configuration
  • Has method-specific serving behavior: some updates can be merged, while modules and soft prompts may require runtime composition

Common Use Cases

  1. Comparing efficient adaptation methods under a fixed workload, device envelope, and evaluation protocol
  2. Maintaining independently versioned domain or task variants on an immutable shared base
  3. Running controlled adaptation experiments without storing a full model copy for every candidate
  4. Adapting language, vision, speech, or diffusion models when the framework supports the selected method
  5. Serving approved model variants with explicit compatibility checks, authorization, observability, and rollback

Example

loading...
Loading code...

Frequently Asked Questions

What is the difference between PEFT and full fine-tuning?

Full fine-tuning updates all or most base-model weights. PEFT trains selected existing parameters or added state while most base weights remain frozen. That usually reduces gradient, optimizer, and checkpoint state, but the actual quality, wall time, and peak-memory difference depends on the model, method, precision, sequence shape, optimizer, runtime, and device topology.

How should a PEFT method be selected?

Start with a workload contract: target behavior, base architecture, allowed training and serving backends, device envelope, latency, storage, and release constraints. Compare viable methods under the same data splits and evaluation protocol. LoRA is broadly supported, bottleneck modules add sequential computation, and soft-prompt methods change attention inputs; none is universally best.

Does training fewer parameters reduce peak memory by the same ratio?

No. Trainable parameters determine only part of training memory. Base weights, quantization metadata, activations, gradients, optimizer state, temporary kernels, communication buffers, runtime allocations, fragmentation, and headroom all contribute. Measure peak device and host memory on the intended sequence length, batch shape, precision, checkpointing policy, and hardware.

Does PEFT always match full fine-tuning quality?

No. Paper results are tied to their models, tasks, data, method configurations, and evaluation protocols. A PEFT candidate can outperform, match, or trail full fine-tuning, and it can improve one slice while regressing another. Compare candidates with repeated seeds, held-out task slices, general-capability regressions, safety checks, and serving-artifact tests.

Is a PEFT checkpoint a standalone model?

Usually not. A PEFT checkpoint commonly stores method-specific parameters and configuration and still requires the compatible base model. Treat the base revision and hash, tokenizer, chat template, framework versions, method configuration, adapter revision, evaluation report, and serving composition as one identity. Merging is method- and configuration-specific and creates a new artifact that needs validation.

Related Terms

Related Articles