Skip to Content
Recodocs

Advanced LLM Fine Tuning

Build, evaluate and release specialist open models through 16 hands-on lessons.

1 min read

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?

  1. 01
    LoRA vs QLoRA for invoice extraction

    Does a four-bit base reduce the cost of adapting an invoice parser?

  2. 02
    Audit 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?

  1. 03
    Audit preference pairs

    How much of DPO's value comes from the quality of the preference labels?

  2. 04
    Design verifiable rewards

    Can a model raise its reward without extracting a correct invoice?

  3. 05
    Distil traces and protect existing skills

    Can a student learn difficult invoice layouts while retaining simple invoice extraction?

  4. 06
    Test 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?

  1. 07
    Adapt OCR

    Which transcription errors can rendering variation fix?

  2. 08
    Extract tables and charts

    Can a document model preserve row structure, totals and chart values on unfamiliar layouts?

  3. 09
    Tune visual document retrieval

    When does indexing the page image beat indexing its OCR text?

  4. 10
    Adapt speech recognition

    Can Whisper learn a new acoustic condition without losing accuracy on clean speech?

  5. 11
    Adapt expressive speech

    Does adaptation improve intelligibility or style over the same text conditioning?

  6. 12
    Train embeddings and rerankers

    Is the retrieval problem candidate recall or ranking?

  7. 12b
    Train a fast encoder decision model

    Which small model should triage a completed trace, and can you trust its confidence?

  8. 13
    Adapt a model to a domain

    Do you need domain language, better use of evidence, or both?

  9. 14
    Train 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?

  1. 15
    Release 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