105. Model Weights 4 - Fine-tuning, LoRA and What Actually Changes

Know what fine-tuning modifies, what LoRA and QLoRA add, and when context beats training.

By Jacques Botte, founder of Toptronic®. Last updated 17 October 2026.

The lesson

Fine-tuning updates the weights using your own examples. Full fine-tuning adjusts every parameter, needs the memory to hold gradients and optimizer state alongside the weights, and produces a complete new model. For a 7-billion-parameter model that is several times the inference memory, which is why most practitioners never do it on their own hardware.

LoRA avoids that by freezing the original weights and training a small pair of low-rank matrices inserted beside chosen layers. The adapter is typically a few million parameters rather than billions, so it trains on modest hardware, and it can be stored as a small file and applied or removed at load. The base model is unchanged, which also means one base can serve many adapters.

QLoRA goes further: the frozen base is loaded in 4-bit, and the adapters train in higher precision on top. That is what makes fine-tuning a large model possible on a single consumer card. The quality cost is small in practice for many tasks, and the technique is widely used for exactly that reason.

Fine-tuning is the wrong tool more often than people expect. It teaches style, format and task shape well; it is a poor way to add facts, which change and which the model will still misremember. For project-specific knowledge, retrieval or a well-filled context is usually cheaper, immediate and easier to correct. Training also freezes a snapshot: the moment your data changes, the model is stale in a way you cannot patch.

If you do fine-tune, treat it like any other engineering change. Hold out evaluation data before training, not after. Record the base model's exact version and hash, because adapters do not transfer reliably across base revisions. Check the licence of the base weights for derivative and commercial terms. And compare against a strong prompting baseline on the same evaluation set, because a disappointing adapter that beat nothing is a common and expensive result.

Check yourself

Question 1: What does LoRA train?
  1. Every weight in the model
  2. Small low-rank adapter matrices beside frozen base weights — correct
  3. Only the tokenizer
  4. The KV cache

Answer: Small low-rank adapter matrices beside frozen base weights

LoRA freezes the base and trains compact adapters, which is why it fits on modest hardware.

Question 2: When is fine-tuning usually the wrong choice?
  1. When teaching output format
  2. When adding facts that change frequently — correct
  3. When teaching a house style
  4. When adapting to a task shape

Answer: When adding facts that change frequently

Facts belong in retrieval or context: they change, and a trained snapshot cannot be patched.

Question 3: Why must you record the base model's exact version when keeping a LoRA adapter?
  1. Because adapters are large
  2. Because adapters do not transfer reliably across base revisions — correct
  3. Because the licence requires it
  4. Because the tokenizer changes

Answer: Because adapters do not transfer reliably across base revisions

An adapter is trained against specific base weights; a different base revision can silently degrade it.

← Previous lesson · All 106 lessons · Next lesson →

The full course — 106 lessons and 318 quiz questions — ships inside the app. Get TPEE to study it offline.