Book a free call

What Is Parameter-Efficient Fine-Tuning (PEFT)?

PEFT adapts a large language model by training a small set of extra weights while the rest stays frozen. It cuts cost without starting over.

Hertiv engineering teamReviewed by a senior engineer
6 min read
What Is Parameter-Efficient Fine-Tuning (PEFT)?
On this page

Short answer

Parameter-efficient fine-tuning, or PEFT, is a way to adapt a large language model to a new task by training only a small set of added weights while the rest of the model stays frozen. It gives most of the benefit of full fine-tuning at a fraction of the memory and compute cost, which makes it practical for teams without a large training budget.

What is parameter-efficient fine-tuning?

Parameter-efficient fine-tuning is a set of methods that adapt a large language model to a new task by training only a small fraction of its weights. The base model stays frozen, and the training updates a small add-on: a set of low-rank matrices, a few adapter layers, or a short trainable prefix.

Full fine-tuning updates every weight in the model, which for a large model means billions of numbers and a training run that needs serious hardware. PEFT updates a small slice instead, so the run fits on a single good graphics card and finishes in hours rather than days.

The result is a small file of trained weights that sits next to the frozen base model. At run time the two combine to produce the adapted behaviour, and the same base model can carry several different adapters for different tasks. For the broader idea, see what fine-tuning is.

How does LoRA work?

LoRA, short for low-rank adaptation, is the most widely used PEFT method. It leaves the model's weight matrices untouched and adds two small matrices to each one it adapts. Training updates only those small matrices, which is why the trainable count stays low.

Method What it trains When to use it
LoRA Small low-rank matrices per layer Most fine-tuning jobs, the default choice
QLoRA LoRA on a quantised base model When memory is tight
Adapters Small layers added between blocks When you need a stable, swap-in module
Prefix tuning Trainable vectors before the input When the task is narrow and fixed
Prompt tuning A few trainable tokens Simple classification-style tasks
Full fine-tuning Every weight in the model When the task needs deep change

The rank setting controls the size of the LoRA matrices. A higher rank trains more weights and can capture more of the task, but it also uses more memory and trains more slowly. Most teams start with a modest rank and raise it only if the results are weak. For the method in detail, see what LoRA is.

When is PEFT the right choice?

PEFT is the right choice when the task is a variation on what the base model already does well: a support bot that answers in your company's tone, a classifier that sorts tickets, or a summariser that follows your format. The base model already knows language; PEFT teaches it your task.

It is also the right choice when the budget is small. A team with one graphics card and a few thousand examples can run a LoRA job and get a usable model the same day. Full fine-tuning of the same model would need far more memory and time for a result that is often only slightly better.

PEFT is the wrong choice when the task needs knowledge the base model does not have, such as a private body of facts it never saw in training. In that case, retrieval from your own documents usually helps more than training. Training teaches style and format; it does not reliably teach new facts.

How do you run a PEFT job, step by step?

Running a PEFT job is a short pipeline: prepare examples, pick a base model, set the adapter, train, and check the result on held-out examples before it goes near real users.

  1. Collect examples. Gather a few hundred to a few thousand input-output pairs that show the behaviour you want, and hold back a fifth for testing.
  2. Pick a base model. Choose a model that already handles the general task, with a licence that allows your use.
  3. Set the adapter. Start with LoRA at a modest rank, and decide which layers to adapt.
  4. Train. Run a few epochs and watch the test loss, not just the training loss.
  5. Check the outputs. Read a sample of outputs on the held-out set and look for the errors that matter.
  6. Ship the adapter. Save the small adapter file next to the frozen base model and load both at run time.
  7. Monitor in use. Log real outputs and review a sample every week for drift or new failure modes.

The most common failure is training on examples that do not match the real task. If the examples are clean and the held-out set looks like real inputs, the model usually behaves. For a full guide to the wider process, see how to fine-tune an LLM.

What are the limits of PEFT?

PEFT cannot teach a model facts it never learned, and it cannot fix a base model that is wrong for the task. An adapter trained on a few hundred examples will shape style and format, but it will not turn a general model into a specialist on a subject it never saw.

The second limit is capacity. A low-rank adapter has only so many trainable weights, so a task that needs a large change may need a higher rank or a different method. If results stay weak after raising the rank and adding data, the task may need full fine-tuning or a different base model.

The third limit is evaluation. A small adapter can look good on the training set and fail on real inputs, because the training examples were too narrow. Always check on held-out examples that look like the real workload, and read the outputs yourself rather than trusting a single score.

Example (hypothetical): fine-tuning a support model

Example (hypothetical): a team wants a support model that answers in the company's tone. It collects 2,000 labelled support replies and holds back 400 for testing, leaving 1,600 for training.

With a batch size of 8, one pass over the training data takes 1,600 / 8 = 200 steps. The team trains for 3 passes, so the run is 200 x 3 = 600 steps. At about 2 seconds a step, the run takes 600 x 2 = 1,200 seconds, or 20 minutes.

On the 400 held-out replies, the model answers 340 in the right tone with the right facts, which is 340 / 400 = 85%. The team reads the 60 misses and finds that most are cases where the reply needs a price or a policy the model was never given, so it adds a retrieval step for those cases.

The lesson is that the training run is the cheap part. Collecting good examples and reading the misses takes far longer than the 20 minutes of training, and it is where the quality comes from.

What are the common mistakes?

The most common mistakes teams make with PEFT are training on examples that do not match the real task, skipping held-out testing, and expecting training to teach new facts.

  • Bad examples. Training on messy or unrepresentative examples teaches messy behaviour.
  • No held-out set. Without test examples, the team cannot tell whether the model learned or memorised.
  • Expecting new knowledge. Training teaches style and format; new facts need retrieval, not tuning.
  • Rank too low or too high. A tiny rank cannot capture the task, while a huge rank wastes memory.
  • Skipping output review. A single score hides the errors that matter; read the outputs.
  • Shipping without monitoring. Real inputs drift, and an adapter that was good last month may not be good now.

Key takeaways

  • PEFT trains a small adapter while the base model stays frozen
  • LoRA is the default method; QLoRA fits tight memory budgets
  • Training teaches style and format, not new facts
  • Always test on held-out examples that look like real inputs
  • The examples and the review matter more than the training run

Frequently asked questions

What does PEFT stand for?

PEFT stands for parameter-efficient fine-tuning. It is a family of methods that adapt a large language model by training only a small set of added weights, such as low-rank matrices or adapter layers, while the base model's weights stay frozen. The result is a small adapter file that combines with the base model at run time.

How is PEFT different from full fine-tuning?

Full fine-tuning updates every weight in the model, which needs a lot of memory and compute for a large model. PEFT updates only a small add-on, so it trains faster, uses less memory and produces a small file that can be swapped between tasks. Full fine-tuning can capture deeper changes, but PEFT is enough for most tasks.

What is LoRA in simple terms?

LoRA, or low-rank adaptation, adds two small matrices to each weight matrix it adapts and trains only those small matrices. The base model's weights stay frozen. At run time the small matrices combine with the base weights to produce the adapted behaviour. It is the most widely used PEFT method because it is simple and effective.

How much data do I need for PEFT?

A few hundred to a few thousand good examples is usually enough for a focused task such as tone, format or classification. The examples matter more than the count: they must look like the real inputs the model will see. Hold back a fifth of the examples for testing, so you can check the result honestly.

Can PEFT teach a model new facts?

Not reliably. Training shapes style, format and behaviour, but it does not reliably add knowledge the base model never learned. If the task needs facts from your own documents, retrieval from those documents usually works better than training. Use PEFT for how the model answers, and retrieval for what it knows.

When should I use full fine-tuning instead?

Use full fine-tuning when the task needs a deep change to the model's behaviour that a small adapter cannot capture, and you have the hardware and data to support it. Try PEFT first: if the held-out results stay weak after raising the rank and adding data, full fine-tuning or a different base model may be the next step.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Need a model tuned to your data without a big training bill? Talk to Hertiv.

A senior engineer replies within one business day. Or see our LLM Fine-Tuning service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call