Skip to content
AI.info

Advanced techniques

Fine-Tuning and Parameter-Efficient Adaptation

Compare full fine-tuning, partial unfreezing, adapters, and low-rank updates while controlling data, compute, and forgetting risks.

By the end you can

Fine-tuning is a spectrum, not a binary switch

A pretrained model contains a hierarchy of reusable and source-specific behavior. Adaptation can update a small output head, the upper blocks, all parameters, or a compact set of inserted parameters. Each of those choices changes sample efficiency, memory use, storage, and the risk of overwriting useful knowledge. Full fine-tuning offers maximum freedom, but it can be wasteful or unstable when target data is small. Partial fine-tuning preserves more of the source representation. Parameter-efficient methods freeze most pretrained weights and learn a smaller set of task-specific parameters, which is attractive when many tasks share one base model. The right method depends on more than training cost. It depends on how far the target domain is from pretraining, on whether multiple task variants must coexist, and on whether deployment can load separate full checkpoints.

Adapter modules put a number on the compact end. Neil Houlsby and seven colleagues transferred BERT to 26 diverse text classification tasks with them in 2019. “The parameters of the original network remain fixed”, and only the inserted ones train. On GLUE those adapters added “only 3.6% parameters per task”, and new tasks “can be added without revisiting previous ones”. By contrast “fine-tuning trains 100% of the parameters per task”. Twenty-six tasks, one frozen base, and nothing to revisit when the twenty-seventh arrives.

Adaptation depth should match target mismatch, label volume, and operational constraints.

Comparison

Four adaptation strategies and their tradeoffs

A useful experiment orders these strategies from least invasive to most flexible. Two published measurements fix the ends of that order, and neither end wins outright.

A 65-billion-parameter model can be finetuned on a single 48GB GPU. That is the compact end priced in hardware. Tim Dettmers and three colleagues backpropagated gradients through a frozen 4-bit quantized model into LoRA adapters, and published QLoRA at NeurIPS in 2023. Their abstract opens: “We present QLoRA, an efficient finetuning approach that reduces memory usage enough to finetune a 65B parameter model on a single 48GB GPU while preserving full 16-bit finetuning task performance.” The Guanaco family that came out of it reached 99.3% of ChatGPT's performance level on the Vicuna benchmark, after 24 hours of finetuning on one GPU. More than 1,000 models were finetuned for the study.

The flexible end keeps an advantage the compact end does not erase. LoRA and full finetuning were compared head to head on programming and mathematics. Instruction finetuning on ~100K prompt-response pairs, continued pretraining on ~20B tokens. The result appeared in Transactions on Machine Learning Research in August 2024: “Our results show that, in the standard low-rank settings, LoRA substantially underperforms full finetuning. Nevertheless, LoRA better maintains the base model's performance on tasks outside the target domain.” Dan Biderman and eleven colleagues ran it. LoRA also forgot less than weight decay or dropout, and the explanation they give is dimensional: full finetuning learned perturbations of rank 10–100× greater than typical LoRA configurations. So the compact end is not simply the cheap version of the flexible one. It learns less and it forgets less. Which half of that sentence matters depends on whether the product still needs the capabilities outside the target domain.

FigureComparison · 4 columns

Linear probe

Freeze the encoder and train only a target head.

  • Fast representation diagnostic
  • Lowest forgetting risk
  • Limited ability to reshape features
  • Good first baseline

Partial fine-tuning

Unfreeze selected upper layers or blocks.

  • Balances reuse and adaptation
  • Requires a principled unfreezing plan
  • Lower memory than full updates
  • Useful for moderate domain shift

Full fine-tuning

Update the complete pretrained model.

  • Maximum target flexibility
  • Highest optimizer-state and checkpoint cost
  • Greater overfitting and forgetting risk
  • Needs strong regularization and evaluation

Parameter-efficient adaptation

Learn adapters, prompts, or low-rank updates while freezing most weights.

  • Small task-specific state
  • Convenient for many variants
  • Performance depends on placement and rank
  • Base-model compatibility must be managed

Case

LoRA’s ten-thousandfold cut in trainable parameters

On GPT-3 175B, low-rank adaptation trains ten thousand times fewer parameters than the same model fine-tuned with Adam. Edward J. Hu and seven colleagues measured that, and presented LoRA at ICLR 2022. Against the Adam baseline, the method “can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times”. Quality held. LoRA performs “on-par or better than fine-tuning in model quality on RoBERTa, DeBERTa, GPT-2, and GPT-3”. Four model families, and no quality penalty for the cut.

Visual

A layer-wise adaptation plan

Lower layers often receive smaller updates because they may encode more general structure. That is usually presented as a design intuition. It was in fact written down as a rule, with a divisor and a schedule, and measured.

The divisor is 2.6. Each layer gets a learning rate 2.6 times smaller than the layer above it. Jeremy Howard and Sebastian Ruder specified that in ULMFiT at ACL 2018, along with the pace at which layers are opened. Discriminative fine-tuning, in their section on “Target task LM fine-tuning”, first chooses the learning rate ηL of the last layer by fine-tuning only that layer, then uses η(l−1) = η(l)/2.6 for each layer below it. Gradual unfreezing, a paragraph inside “Target task classifier fine-tuning”, unfreezes the last layer, fine-tunes all unfrozen layers for one epoch, then unfreezes the next lower frozen layer and repeats. The stated reason is the failure mode this whole lesson circles: “Rather than fine-tuning all layers at once, which risks catastrophic forgetting, we propose to gradually unfreeze the model starting from the last layer as this contains the least general knowledge” — Howard and Ruder, section “Gradual unfreezing”.

The schedule bought something measurable. On six text classification tasks the method outperformed the state of the art, “reducing the error by 18-24% on the majority of datasets”. And “with only 100 labeled examples, it matches the performance of training from scratch on 100× more data”. A divisor of 2.6 per layer and one further layer opened per epoch remain design choices rather than laws. But they are published choices with numbers attached. That is a different object from a hunch.

FigureLayers · 3 layers
  1. 01

    Target head

    Usually initialized for the new task and trained most aggressively.

  2. 02

    Upper representation blocks

    Adapt task-specific abstractions with a moderate learning rate.

  3. 03

    Lower representation blocks

    Update cautiously or keep frozen when low-level features transfer well.

Discriminative fine-tuning names its divisor — 2.6 per layer down — and gradual unfreezing names its pace: one further layer per epoch.

Analogy

The renovation that preserves the building

Converting a strong office building into a medical clinic is mostly a question of how deep the work goes. Replacing furniture and signage resembles training a new head. Reworking a few upper floors resembles partial fine-tuning. Altering the foundation is full-model adaptation: sometimes necessary, but expensive and risky. Modular additions are like adapters, because they change function while preserving most of the original structure.

Then the analogy breaks. A floor stays where the plan puts it. A network’s representations are distributed, so a small parameter update can affect many behaviors, and the apparent location of a change does not guarantee a local effect.

Adapt as deeply as needed, but prove that each deeper intervention earns its disruption.

Example

Symptoms that adaptation is going wrong

Fine-tuning failures often look like ordinary validation noise until the right comparisons are present.

One of those comparisons inverts. Over ten distribution-shift datasets, fine-tuning averaged “2% higher accuracy ID but 7% lower accuracy OOD than linear probing”. Ananya Kumar and four colleagues measured that at ICLR 2022, and named the mechanism: the lower layers “change simultaneously and distort the pretrained features”. Probing first and then fine-tuning recovered both ends. That order was “1% better ID, 10% better OOD than full fine-tuning”.

Seed variance has a number too, and the explanation usually attached to it is wrong. BERT was fine-tuned with 25 random seeds per dataset. Under the default recipe of Devlin et al. (2019), the development-set standard deviation was 25.6 Matthews correlation points on CoLA (mean 45.6, maximum 64.6), 4.5 points on RTE (mean 50.9, max 67.5) and 3.9 on MRPC (mean 84.0, max 91.2). Marius Mosbach and two colleagues ran those seeds for ICLR 2021. Their abstract states the problem plainly: “Despite the strong empirical performance of fine-tuned models, fine-tuning is an unstable process: training the same model with multiple random seeds can result in a large variance of the task performance.” Their revised recipe cut those standard deviations to 1.8, 2.7 and 0.8 respectively, significant at p < 0.001 by Levene's test. And the cause was neither catastrophic forgetting nor a small target dataset. It was vanishing gradients in the lower layers. A “failed run”, in their definition, is one ending at or below a majority classifier — which is the shape a large standard deviation actually takes on a results table.

  • The training metric improves rapidly while target-domain validation degrades after a few updates.
  • Performance on source-like or previously supported tasks collapses after target adaptation.
  • Different random seeds produce large swings — 25.6 standard-deviation points on CoLA under the default BERT recipe — and the fix is an optimization fix, not more target data.
  • The linear probe is strong but full fine-tuning is worse, suggesting destructive adaptation or poor optimization.
  • A parameter-efficient method matches quality but full fine-tuning is still chosen without a deployment reason.
  • The model memorizes annotation style, templates, or narrow lexical cues in the target data.

Key idea

Fine-tuning can specialize by forgetting

Improving the target task may reduce capabilities that are not represented in the target validation set. This is especially important for general-purpose encoders and generative models. A narrow supervised dataset can pull the model toward its local conventions and away from broader behavior.

Ten examples and less than twenty cents were enough to strip a deployed model's safety alignment, through the vendor's own fine-tuning interface. Xiangyu Qi and six colleagues showed it at ICLR 2024: “For instance, we jailbreak GPT-3.5 Turbo's safety guardrails by fine-tuning it on only 10 such examples at a cost of less than $0.20 via OpenAI's APIs, making the model responsive to nearly any harmful instructions.” Those ten were adversarially designed. But the finding that matters for ordinary teams is the second one: fine-tuning on benign, commonly used datasets also degraded safety alignment, though to a lesser extent. No adversarial intent is required to ship the regression.

Maintain a regression suite that includes retained source skills, safety constraints, calibration, and target slices. If the product needs several specialties, separate adapters or task routing may be safer than repeatedly overwriting one full checkpoint.

A target score does not measure what adaptation erased: 10 examples and under $0.20 were enough to take GPT-3.5 Turbo's guardrails off.

Steps

An adaptation ladder that avoids premature full fine-tuning

Run the ladder with the same target splits and the same regression suite throughout. Each rung has to beat the rung below it on four measurements: target slices, retained capabilities outside the target domain, the spread across random restarts, and the cost of storing and serving whatever it produces. Beating the rung below on the aggregate target metric that motivated the climb is not enough.

FigureProcess · 6 steps
  1. 1. Establish zero-shot or frozen behavior

    Measure the pretrained model before target updates.

  2. 2. Train a target head

    Test whether existing representations already separate the task.

  3. 3. Unfreeze gradually

    Open upper blocks and use conservative learning rates.

  4. 4. Test a parameter-efficient method

    Compare quality, memory, and task-switching cost.

  5. 5. Attempt full fine-tuning only if needed

    Use regularization, early stopping, and regression tests.

  6. 6. Select by total system value

    Include storage, serving, retraining, and retained capabilities.

Key idea

Adaptation artifacts need their own inventory

A base model, a full fine-tuned checkpoint, an adapter, and a merged checkpoint are not interchangeable artifacts. Each has its own training dataset, target modules, optimizer state, evaluation record, and compatibility boundary.

Store the base-model identifier, tokenizer or preprocessing version, adapter rank, target layers, merge procedure, and safety evaluation. If several adapters can be loaded together, test composition explicitly. Independent success does not guarantee that their updates combine safely.

One field in that record now carries legal weight. Spend more than a third of the original model's training compute on your adaptation, and you may become the provider of the model in law. The European Commission set that criterion out in its guidelines on the obligations of providers of general-purpose AI models, published 18 July 2025 ahead of the 2 August 2025 application date. Fine-tuning counts there as one way of modifying such a model. The test sits in a section titled “Downstream modifiers as providers of general-purpose AI models”. It reads: “Based on the considerations above, an indicative criterion for when a downstream modifier is considered to be the provider of a general-purpose AI model is that the training compute used for the modification is greater than a third of the training compute of the original model”. Where the original model's training compute is unknown, the fallback is a third of 10^25 FLOP for a model with systemic risk, and a third of 10^23 FLOP otherwise. Skadden, Arps, Slate, Meagher & Flom LLP reads the same section as biting where “the modification leads to a significant change in the model”. So the compute you spent on an adaptation, divided by the compute of the base you started from, is not only an efficiency statistic. It belongs in the inventory beside the rank and the target modules.

Treat every adaptation as a versioned dependency — documented base, scope, rollback path, and the training-compute ratio that can make you the provider.

Position

On ten shift datasets, full fine-tuning averaged lower accuracy out of distribution than a linear probe

Which of the four strategies in this lesson does a team reach for when it says it is fine-tuning? Full fine-tuning, usually. It asks for no rank, no unfreezing schedule and no argument. The ladder set out here exists because that reflex is a decision taken without a measurement. The measurement is in the lesson.

Averaged over ten distribution-shift datasets, fine-tuning came out 2% higher in-distribution and 7% lower out-of-distribution than a linear probe. One pretrained model, adapted two ways: better on the data it was tuned for, worse under shift, because updating the lower layers distorts the features that made the model worth starting from. Probing first and then fine-tuning recovered both ends, gaining 1% in-distribution and 10% out-of-distribution over full fine-tuning. Ananya Kumar and four colleagues ran that comparison. Those are averages over ten datasets rather than a law about any one task. They still run the wrong way for the option chosen by default.

This is not an argument that full fine-tuning is the wrong answer, and the honest counterweight is in the same lesson. In standard low-rank settings LoRA “substantially underperforms full finetuning” on programming and mathematics, while it “better maintains the base model's performance on tasks outside the target domain”. Dan Biderman and colleagues found both halves at once. Depth buys in-domain quality and spends retained capability. The reflex is a problem because it makes that trade silently, in one direction, without measuring either side.

The efficiency figures reward the same care, because they are repeated more loosely than they were written. LoRA cut trainable parameters “by 10,000 times” and the GPU memory requirement “by 3 times” against GPT-3 175B fine-tuned with Adam. Trainable parameters. The frozen base is still 175 billion parameters wide. Adapters on GLUE added “only 3.6% parameters per task” where “fine-tuning trains 100% of the parameters per task” — a statement about what a team trains and stores for each task, not about what it serves. Both results are large, and both sit on the training side of the ledger. A reader who converts them into “the model got ten thousand times smaller” has taken a sound argument for parameter-efficient adaptation and swapped it for one that will not survive a latency budget.

Ten thousand times fewer trainable parameters is a training-side number, not a smaller model.

Figure

The adaptation strategy chosen by reflex is the one that loses accuracy under shift — and the parameter-efficiency figures beside it are about what a task trains, not what it serves.

Key takeaways