Skip to main content

Recap and final exam

Ten modules to move from "should we fine-tune at all?" to a merged, evaluated 7B model serving a specialized task on a laptop. Here is the course condensed, then the threads that run through it.

The course at a glance

ModuleThe essential point
1. Prompt, RAG or fine-tuneFine-tuning teaches behavior, not facts; the dataset is the cost, not the GPU
2. Instruction datasetChat template, deduplication before splitting, held-out set at day zero
3. Full fine-tune cost84 GB of GPU memory and $100 to $600 per run for a 7B model; catastrophic forgetting
4. Parameter-efficientFreeze the base, train 0.1 % of the parameters; three families with LoRA the winner
5. LoRA adaptersΔW=BA\Delta W = B A, rank controls capacity, alpha at 2r2r, target the attention projections
6. QLoRA 4-bitNF4 puts levels at normal quantiles, double quantization, paged optimizer, 14 GB total
7. HyperparametersLR 1e-4 to 3e-4, warmup 3 %, effective batch 16 to 64, three epochs, gradient clip at 1
8. MonitoringTwo loss curves, samples every epoch, early stopping, gradient norm as leading indicator
9. Merge and exportmerge_and_unload() for one variant, GGUF Q4_K_M for llama.cpp and Ollama
10. EvaluationHeld-out test set, format then content, blind human 50-pair, MMLU for regression

The threads running through the course

Everything is a response to the 84 GB number of module 3. Once you have seen that a full fine-tune of a 7B model requires memory that no consumer card has, and the alternative is a technique that trains 0.12 % of the model on a rented $0.40-per-hour card, the design of the rest of the course follows. PEFT (module 4), LoRA (module 5), QLoRA (module 6) are three steps down the same staircase: freeze more, quantize more, get more headroom on the same hardware.

The dataset is the intervention that matters most. Module 1 says it, module 2 makes it concrete, and every subsequent module inherits the assumption. A well-curated two thousand pairs beat twenty thousand noisy ones, deduplication before the split protects the validation signal, and synthetic data is a bootstrap tool with two known failure modes (stylistic collapse, error amplification). If a fine-tune disappoints, the answer is almost always in the dataset, not in the hyperparameters.

Monitoring is the difference between a debugged run and a wasted run. Two loss curves diagnose most problems in the first hundred steps, gradient norm gives you a leading indicator ten steps ahead of the loss, and generating five qualitative samples at every epoch catches format regressions no scalar can see. Every module 8 gesture pays back the moment you kill a bad run at step 50 instead of at step 500.

Evaluation has two axes. Task metrics tell you whether the fine-tune did its job. Capability regression tells you whether it broke something else. A win on the target axis with a five-point MMLU drop is not a shippable model — it is a specialized model that got worse at everything except its specialty, and the certificate of that trade-off has to be signed explicitly, not stumbled into.

The final exam

The exam has 40 questions covering the ten modules: choosing between prompting, RAG and fine-tuning, preparing an instruction dataset and its chat template, computing the memory cost of a full run, understanding what LoRA freezes and what it trains, configuring QLoRA on a 24 GB card, picking hyperparameters and reading the resulting curves, merging and exporting to GGUF, and running a two-axis evaluation.

Several questions present situations to diagnose: a training loss that will not descend, a validation loss that rises after epoch two, a fine-tune that scores well on the target task but drops five points on MMLU, an adapter that produces garbage tokens at inference. It is judgment that is assessed, not the recitation of formulas.

On success, your certificate of completion is issued immediately; its number is verifiable by any third party on the platform.

Before you start

Take the table above and, for each row, ask yourself "how would I see that I am wrong here?". If you can say why 84 GB rules out full fine-tuning for most teams, why α/r\alpha / r decouples rank from effective learning rate, why NF4 keeps quality better than a naive 4-bit encoding, and why blind human evaluation belongs in every ship decision, you are ready. Good luck!

Final exam

Ready to validate this course?

40 questions drawn at random from the course bank · passing score 70% · verifiable PDF certificate issued immediately on success.

Start the exam

You need to be signed in to your InSkillML account with an active subscription. You can also start the exam from My courses.