Fine-tuning with LoRA
Adapting a huge model cheaply.
Updating every weight of a huge model needs a huge computer. But researchers found a shortcut, that changes only a tiny part, and works nearly as well. It is called LoRA, and it has made fine tuning possible for almost anyone. In this lesson, you will understand the idea.

- Updating every weight is expensive
- A clever shortcut
- Fine-tuning for almost anyone
The idea behind LoRA
Here is the idea. Freeze the original model, so none of its billions of weights change. Next to certain layers, add two tiny extra matrices, called adapters. During fine tuning, only these small adapters learn. They act like a thin lens, on top of the frozen model, that changes its behaviour. The adapters are so small, that they may be a thousand times smaller than the model itself.
- Freeze the modelbillions of weights stay fixed
- Add tiny adapterssmall extra matrices
- Train only the adaptersfast and cheap
- Plug them ina small file changes behaviour

Why LoRA is a big deal
LoRA brings real benefits. Training needs far less memory, so it runs on a single graphics card. It is much faster, and cheaper. The adapter is a small file, a few megabytes, so you can keep many adapters, one for each task, or customer, and swap them in, on the same base model. And the original model is never damaged.
Full fine-tuning
- Updates every weight
- Needs many powerful GPUs
- Large, costly files
- High risk of damaging the model
LoRA
- Trains tiny adapters only
- Runs on a single GPU
- Adapter files of a few megabytes
- Base model stays safe
A fine-tuning project, step by step
A typical project has five steps. Collect a few hundred to a few thousand high quality examples, of the behaviour you want. Format them, as instruction and answer pairs. Train a LoRA adapter, while watching the validation score. Test it, against examples it has never seen. And compare it with a well prompted base model. If the improvement is not clear, you may not need the fine tune at all.
- Collect exampleshundreds to thousands, high quality
- Format pairsinstruction and ideal answer
- Train the adapterwatch validation
- Test and compareagainst a well-prompted base
Summary
Good. LoRA freezes the big model, and trains small adapters, which makes fine tuning cheap, fast, and flexible. Success depends on a small set of high quality examples, and honest testing. Next, how to run models on your own computer, with quantization.
Key takeaways- LoRA: freeze the model, train small adapters
- Adapters are tiny, swappable files
- Quality of examples matters most