part II · chapter 11 of 17
Fine-tuning and model adaptation
Changing a model's weights to fit a task, a format or a domain.
why it matters
You learn when prompting and retrieval are not enough, and when fine-tuning is the wrong tool.
before this: chapter 10, Multimodal AI
being written
This chapter is being written. Here is what it will cover; until then, the full topic list is in our notes.
- supervised fine-tuning, dataset preparation
- loss, overfitting, forgetting
- LoRA, QLoRA, adapters
- preference tuning, distillation
you reached the end of the chapter
build this
LoRA-tune a small open model to follow one strict output format.
the maths underneath
maths note 7
Calculus: derivatives, chain rule, gradients
Training is following the gradient of the loss downhill, and backpropagation is the chain rule run backwards.
maths note 8
Optimization, loss and low-rank matrices
The optimizer, the learning rate and why LoRA trains 0.39% of the weights and still fits on a small GPU.
maths note 11
Information theory: entropy, cross-entropy, perplexity
What loss means when you fine-tune, what perplexity measures, and why a tuned model is held close to its base.
check yourself
Tick what you could explain to someone else, out loud, without notes.