teacher
Sign in

Fine-Tuning and LoRA

Decide when training a model beats prompting or retrieval, and see how LoRA adapts a large model by training a few million extra parameters.

40 min5 interactive

Should you fine-tune at all

Fine-tuning means continuing to train a pretrained model on your own examples so its weights change. It is the most expensive way to change behaviour, so try the cheaper ones first.

NeedTry firstWhy
Follow instructions betterClearer prompt, examples in the promptFree to iterate
Use private or changing factsRAG (retrieval)Facts live in an index you can update
A fixed output format or house stylePrompt, then fine-tuneTraining makes it consistent
Cheaper or faster at one narrow taskFine-tune a small modelA small tuned model can match a large prompted one
New behaviour prompts cannot reachFine-tuneLast resort

You need an eval first (see the evals lesson). Without one you cannot tell whether the tuned model is better or just different.

1 of 6