Week 22 · Season 6 · Home
Teach it your ways
You can decide when fine-tuning is worth it, explain LoRA, fine-tune a small model on a free GPU, and prove with an eval that it learned your format.
This week
- Earn the fine-tune: the ladder
- Habits, not facts: what SFT trains
- A small patch on a big matrix: LoRA
- Fine-tune on a free GPU: QLoRA
- Data is the model
- Go deeper: distillation, contamination, fair comparisons
How you learn
Write a LoRA patch by hand on a tiny grid and prove that folding it in gives the same answers, before you run any training library.
What you build
Project 6: teach a small model to answer in your format. Build the dataset, fine-tune with LoRA on a free GPU, and prove with an eval that it beats prompting alone.
Stretch: Let a bigger free model draft extra examples (distillation), check your test cards for 13-word leaks, and report a paired bootstrap interval.
What you ship
Project 6: Teach a small model. A small open model fine-tuned with LoRA to answer in your format, with an eval that proves it.
- A training set from your own chats, checked, de-duplicated and split by hash, with a data card
- A LoRA patch trained on a free GPU, published with a model card
- An eval comparing base, prompted and tuned on locked test cards, with a paired interval
Lessons
- Earn the fine-tune
After this deck you can climb the prompt → examples → retrieval → fine-tune ladder, say what fine-tuning is for (and what it isn't), and write a one-page decision memo with numbers.
- Habits, not facts
After this deck you can explain what supervised fine-tuning practises, why it teaches habits better than facts, and why you grade the answer only, in the model's own chat format.
- A small patch on a big matrix
After this deck you can explain LoRA, count its trainable numbers, and prove that folding
W + (alpha / r) × B × Ainto the grid gives exactly the same answers. - Fine-tune on a free GPU
After this deck you can do the training memory sum, explain how QLoRA fits a model on a free GPU, read a validation loss curve, and plan a run that fits before you press run.
- Data is the model
After this deck you can turn raw chats into a training set: keep only what passes your checks, drop copies, split by hash without leaks, write chat JSONL, and describe it all in a data card.
- Go deeper: teachers, leaks and wobbles
After this deck you can explain distillation, check a test set for contamination with n-gram overlap, and compare two models fairly with a paired bootstrap interval.
Labs
Python in the browser, next to the lessons.
Weekend build
- Project 6: Project 6: teach a small model your format
A small open model, fine-tuned with LoRA on a free GPU, that answers in your format every time, with an eval that proves it beats prompting.
Skills you prove
- Decide
- Choose between prompt, RAG, fine-tune and agent, and defend it with numbers
- Distill
- Run LoRA SFT on a small model with data from your own traces, distill a frontier model into it, and explain every curve
- Don't tune
- Know when fine-tuning is the wrong answer
Free links for this week
Hand-picked official docs, papers and talks.
- LoRA paper · paper
- Thinking Machines: LoRA Without Regret · post
- QLoRA paper · paper
- Unsloth docs & free notebooks · docs
- TRL docs · docs
- Hugging Face LLM course · course
- Kaggle notebooks (free GPU) · tool
- Gekhman et al.: fine-tuning on new knowledge and hallucinations · paper