Learning path: Deep Learning for Production: Transformers, Fine-Tuning and Serving · Step 10 of 13
Full Fine-Tuning vs LoRA vs QLoRA: What Each One Changes and What It Costs
Three ways to fine-tune a model for a ticket-tagging job on one GPU: full fine-tuning rebuilds every weight, LoRA trains a small add-on A x B next to frozen weights, and QLoRA does LoRA on a 4-bit base. What each changes, what each costs, and which to pick.
What you will learn
- Explain what full fine-tuning updates and why it needs so much memory
- Describe LoRA as a frozen weight matrix plus a small trained add-on A x B
- Explain how QLoRA fits in less memory with a 4-bit base
- Pick a method for one GPU with limited memory, and use adapters per customer
Before you start
- When NOT to Fine-Tune
- The Training Loop: Epochs, Mini-Batches, Learning Rate and Optimisers
You've walked the decision tree and fine-tuning made the cut. The next question is how much of the model to change. There are three common answers: full fine-tuning, LoRA and QLoRA. Let's see what each one changes inside the model, and what each one costs you.
The use case: ticket tagging on one GPU
We want a small open model that tags support tickets:
- "I was charged twice for my plan this month." should be tagged billing.
- "The app crashes when I upload a photo." should be tagged bug.
Think of the model as a house. Fine-tuning is a renovation, so the house does our job better. The only question is how big the renovation is. And our situation is common: one GPU, limited memory. Which method fits?
Full fine-tuning: rebuild every room
Full fine-tuning is the biggest renovation. Every weight in the model can change. Picture the model as a grid where each small square is a group of weights. During training, every single square gets updated.
That sounds fine until you count the memory. For every weight, training keeps:
- the weight itself,
- a gradient, the direction in which that weight should move (see Loss and Backpropagation),
- and the optimizer's own notes for that weight.
It adds up fast. And the result is a full new copy of the model. If the model is big, so is every copy you save.
LoRA: removable furniture
LoRA is a smaller idea. It's like adding removable furniture: the house stays exactly as it is, and you only add pieces you can take out again.
- The original weights W are frozen. We never change them.
- Next to them we add two small matrices, A and B. A matrix is just a table of numbers. Multiply A by B and you get a correction the same size as the big matrix.
- The model uses both together: the original weights plus the add-on,
W + A x B.
Only A and B are trained, and only A and B are saved. That's a tiny fraction of the full model, so training needs much less memory and the file you save is small. You'll see real numbers for this in LoRA Fine-Tune of a Tiny Model.
QLoRA: the same renovation in a smaller flat
What if even LoRA doesn't fit? That's where QLoRA comes in.
A normal model stores each number in 16 bits. QLoRA squeezes the base model down to 4 bits per number. This squeezing is called quantisation. The compressed base stays frozen, and on top of it we train a LoRA adapter, A and B, exactly as before.
Four bits instead of sixteen means about a quarter of the space for the stored weights. That's why QLoRA fits in the least memory.
Side by side
| Full fine-tuning | LoRA | QLoRA | |
|---|---|---|---|
| What changes | All the weights | A small add-on | A small add-on, on a 4-bit base |
| Memory | Highest | Lower | Lowest |
| Speed | Slowest | Faster | Can be a bit slower than LoRA (numbers are packed and unpacked) |
| Quality | Highest ceiling | Close to full for many tasks | Close to LoRA |
| What you save | A whole model copy | A small adapter file | A small adapter file |
So with one GPU and tight memory, LoRA or QLoRA is the natural place to start.
Adapters are swappable
There's one more nice thing about adapters. Say each customer tags tickets in their own way. You keep one base model, only one copy of it, and train a small adapter per customer. When a ticket arrives, you load that customer's adapter.
One house, a different set of furniture for each guest. With full fine-tuning you'd need a whole model copy per customer.
Common mistakes
- Counting only the weights. Full fine-tuning also needs a gradient and optimizer notes for every weight.
- Thinking LoRA changes the base model. The base stays frozen. Peel the adapter off and you have the original model back.
- Picking QLoRA for speed. It's chosen for memory. Packing and unpacking 4-bit numbers can make it a bit slower than LoRA.
- Saving a full copy per customer. Adapters let many customers share one base.
Quick recap
- Full fine-tuning changes every weight and needs the most memory.
- LoRA freezes the model and trains a small add-on A x B.
- QLoRA does LoRA on a 4-bit compressed base, so it fits in the least memory.
Try it yourself
Pick a small task, like tagging tickets. Write down how much GPU memory you have. Then choose between full fine-tuning, LoRA and QLoRA, and say why.
Built this? Share your solution in the StudyEasy AI Community.
Join free on Skool →When NOT to Fine-Tune: A Decision Tree of Prompt, RAG, Tools, Then Fine-Tuning
Next →LoRA Fine-Tune of a Tiny Model: Teach SmolLM2-135M Your House Style on a CPU
StudyEasy AI Community
Learn AI engineering, share what you build, and connect with other learners.
Free resources: lesson files, notebooks and code
Ask questions and join engineering discussions
Meet real people learning and building with AI
Machine Learning Engineer: From First Model to ML Engineer
Learn machine learning in Python, then ship it: data analysis, regression, classification, tuning, deployment and MLOps.View on Udemy ↗: Machine Learning Engineer: From First Model to ML Engineer (opens in a new tab)Related articles
Why Neural Networks: Pixels, One Neuron and Layers
Why pictures need neural networks: a handwritten digit is 784 numbers, one neuron is a weighted sum plus a bias and one small rule, and neurons stack into layers. Worked out on MNIST with NumPy.
The Forward Pass and Activation Functions: ReLU, Sigmoid, Tanh and Softmax
Follow numbers through a tiny 3-2-3 network in NumPy: one matrix product per layer, ReLU inside, softmax at the end, and a count of every weight and bias.
Loss and Backpropagation: How Wrong, and Who Is to Blame
The loss says how wrong the network was; backpropagation says how much each weight is to blame. MSE and cross-entropy, the chain rule by hand on a two-weight chain, then the same gradients from PyTorch autograd.
The Training Loop: Epochs, Mini-Batches, Learning Rate and Optimisers
How training is organised: shuffle, cut into mini-batches, take one step per batch, repeat per epoch. Real MNIST runs compare three learning rates, SGD against Adam, and show the overfitting signal in the validation loss.