Module 3 · Efficient fine-tuning

Full fine-tuning vs PEFT

5 min read

Should you modify all of the model's weights, or only a small part? Full fine-tuning updates every parameter; PEFT methods (Parameter-Efficient Fine-Tuning) freeze the model and only train a few million added parameters. This lesson compares the two approaches on Forge — memory, duration, quality, storage — and gives the selection criteria.

Two philosophies

Full fine-tuningPEFT (LoRA and derivatives)
Trained parametersAll0.1 to 5% (added matrices)
MemoryWeights + gradients + optimizer for the whole modelEssentially the frozen weights
Typical learning rate~1e-5~1e-4 to 2e-4
Saved resultA complete modelAn adapter of a few dozen MB
Forgetting riskHigher: everything can moveLower: the base model is intact
Learning capacityMaximalLimited by the adapter's rank

The choice of learning rate illustrates the difference: modifying the whole model requires tiny steps, at the risk of destroying what it knows; adapters starting from zero tolerate steps ten to twenty times larger. Forge applies these defaults:

peft = None if method == "full" else lora_config(r=r, dora=method == "dora")
# Taux d'apprentissage : ~1e-5 pour tout le modèle, ~1e-4 à 2e-4 pour des adaptateurs LoRA
lr = learning_rate or (1e-5 if method == "full" else 2e-4)

The measured comparison

Same data (1,179 cleaned examples), same GPU (GTX 1060, fp32), batch of 8:

Model and methodTrained parametersDurationPeak memoryValidationTest
Qwen2.5-0.5B, LoRA r=16, 2 epochs8.8 M (1.75%)10.2 min2.87 GB1.000.65
Qwen2.5-0.5B, full, 1 epoch494 M (100%)7.2 min8.41 GB*1.000.67
SmolLM2-135M, LoRA r=16, 2 epochs4.9 M (3.5%)5.5 min1.00 GB0.790.38
SmolLM2-135M, full, 2 epochs135 M (100%)4.9 min2.32 GB0.870.42

* More than the card's 6 GB: the Windows driver spilled into system memory (lesson 1.3).

Four findings:

  1. At comparable quality, full fine-tuning needs three times more memory on Qwen2.5-0.5B. On an 8 B, the gap becomes 107 GB versus 19 GB (lesson 1.3): that is where PEFT changes everything.
  2. Full fine-tuning is not slower on a small model: LoRA adds multiplications, and gradient checkpointing recomputes activations. PEFT saves memory, not necessarily time.
  3. The base model matters more than the method: SmolLM2-135M plateaus at 0.38–0.42 on the test set, Qwen2.5-0.5B at 0.65–0.67, whatever the method.
  4. Both methods suffer from the same flaw: 100% on known templates, two thirds on new ones. Neither full fine-tuning nor LoRA fixes a lack of data diversity.

Storage and deployment

ResultSize on disk
LoRA r=16 adapter (Qwen2.5-0.5B, fp32)35 MB
Complete model after full fine-tuning1.9 GB

For an 8 B, that is a few dozen MB versus 16 GB. With PEFT, you keep one base model and as many adapters as tasks or customers; some inference servers (vLLM in particular) load several LoRA adapters at once on the same base model, and pick the adapter per request. With full fine-tuning, each variant is a complete model to store and serve.

The PEFT landscape

LoRA dominates, but other methods exist:

MethodPrincipleStatus
LoRATwo small rank-r matrices added to each linear layerDe facto standard
QLoRALoRA on a base model quantized to 4 bitsStandard for large models on small hardware
DoRALoRA that separates the magnitude and direction of weightsModest gains, slower (lesson 3.2)
Prompt / prefix tuningLearned vectors added to the input of each layerLess effective on complex tasks
Adapters (inserted layers)Small MLPs inserted in each blockLoRA's ancestor; adds latency
(IA)³Vectors that rescale activationsVery few parameters, less expressive

When to choose full fine-tuning

  • You have a lot of data (hundreds of thousands of examples or more) and a large gap with what the model knows: new language, deep new domain, new format.
  • You are continuing pretraining on a domain corpus (continued pretraining).
  • The model is small and memory is not a constraint.
  • You have measured that LoRA, even with a high rank, plateaus below your criteria.

In other cases — that is, most enterprise projects — start with LoRA: more economical, safer, simpler to deploy, and often just as good.

Key takeaways

  • Full fine-tuning modifies the whole model; PEFT only trains small additions, with a learning rate ten to twenty times larger.
  • On Forge, comparable quality (0.65 versus 0.67), but three times more memory for full fine-tuning.
  • PEFT saves memory and storage (35 MB versus 1.9 GB), not necessarily time.
  • The base model weighs more than the method, and no method compensates for poorly varied data.
  • Start with LoRA; move to full fine-tuning with a lot of data or a measured ceiling.

Practice

  1. Run examples/03_sft_lora.py lora --tiny then full --tiny and compare memory, duration and exact match.
  2. With full, try a learning rate of 2e-4: what happens to the loss and the test score?
  3. Compute the size of a LoRA r=16 adapter for an 8 B model from its dimensions.

Resources