Advanced LLM Fine Tuning
Build, evaluate and release specialist open models through 16 hands-on lessons.
Start with an invoice parser that gets the total right and the quantity wrong. Follow that job through the course. Compare a rules baseline with prompted and tuned models, improve the training answers, check what preference and reward stages add, and decide whether the resulting parser is ready to release.
The document lessons share Course Invoice v1, a generated dataset with separate expected records and supplier-disjoint test sets. Transfer checks use real or independently sourced examples where available. The course also uses SciFact for retrieval and public audio datasets for speech, where the same invoice fixtures would not measure the skill being taught.
Lessons
Think of the invoice as a business record, not just a text-generation task. The course follows a single problem through data quality, training objectives, evaluation and release. A more fluent output is useful only if the actual record becomes more reliable.
Open a linked lesson to read its measured results and get the notebook.
Part 1
Build the data
Can you trust the inputs and reproduce the baseline?
- 01LoRA vs QLoRA for invoice extraction
Does a four-bit base reduce the cost of adapting an invoice parser?
- 02Audit synthetic training data
What does fixing noisy labels buy when the inputs and training budget stay fixed?
Part 2
Compare training stages
Which stage earns its added compute?
- 03Audit preference pairs
How much of DPO's value comes from the quality of the preference labels?
- 04Design verifiable rewards
Can a model raise its reward without extracting a correct invoice?
- 05Distil traces and protect existing skills
Can a student learn difficult invoice layouts while retaining simple invoice extraction?
- 06Test the training stack
Do DPO and verifiable-reward training add value individually or in sequence?
Part 3
Adapt models
What changes when the input or objective changes?
- 07Adapt OCR
Which transcription errors can rendering variation fix?
- 08Extract tables and charts
Can a document model preserve row structure, totals and chart values on unfamiliar layouts?
- 09Tune visual document retrieval
When does indexing the page image beat indexing its OCR text?
- 10Adapt speech recognition
Can Whisper learn a new acoustic condition without losing accuracy on clean speech?
- 11Adapt expressive speech
Does adaptation improve intelligibility or style over the same text conditioning?
- 12Train embeddings and rerankers
Is the retrieval problem candidate recall or ranking?
- 12bTrain a fast encoder decision model
Which small model should triage a completed trace, and can you trust its confidence?
- 13Adapt a model to a domain
Do you need domain language, better use of evidence, or both?
- 14Train on verified tool calls
Does checking execution teach more reliable calls than checking the JSON alone?
Part 4
Release
Would you put the resulting pipeline into service?
- 15Release a document parser
Which training and serving changes meet a predeclared invoice release gate?
What you need
Be comfortable with Python, PyTorch tensors and how a language model predicts its next token. Know how supervised fine-tuning differs from prompting and how to read precision, recall and F1. Start with LLM Fine Tuning for those foundations.
The measured labs target a single Tesla T4 in Colab. The relevant notebook pins the checkpoint and library versions, names the training and test sets, and shows how to reproduce the reported measurements.
How is this page?
Last updated on