Fine-Tuning Large Language Models
A comprehensive theory guide to adapting foundation models to specific tasks. It traces fine-tuning from its motivation and history through modern parameter-efficient methods — LoRA and QLoRA — and alignment techniques such as RLHF and DPO.
Fine-tuning is seductive because it sounds like the serious answer. Often it is the expensive answer to a problem that prompting, retrieval, or a better workflow could have solved. The first responsibility of an AI architect is knowing when not to train.
This guide begins with that decision. It separates behaviour from knowledge, recurring prompt cost from training cost, and genuine specialisation from the urge to customise. Only then does it enter the machinery: datasets, parameters, gradients, full training, LoRA, QLoRA, and alignment.
The argument running through the book is practical: model training is not a ritual and data volume is not data quality. Fine-tuning earns its place when the desired behaviour is stable, measurable, repeatable, and valuable enough to maintain.
What this edition gives you
- 01
A decision framework for prompting, RAG, agents, or fine-tuning
- 02
Data curation and the mechanics behind LoRA and QLoRA
- 03
Alignment from supervised tuning through RLHF and DPO