Fine-tuning in practice: the pipeline, LoRA and QLoRA

Fine-tuning today rarely changes all of a model's billions of settings. LoRA trains small "adapter" layers while the base model stays frozen, which is much cheaper. QLoRA does the same on a compressed (4-bit) copy of the base model, so it fits on smaller hardware. The most common type is supervised fine-tuning (SFT) on instruction → response examples.

Everyday analogy

Instead of rebuilding a car's engine to suit a new driver (full fine-tuning), you adjust the seat, mirrors and pedals (LoRA adapters). Fast, cheap, and you can swap them back.

Example

A bank fine-tunes an open model on 5,000 examples of approved customer replies, so it writes in the bank's tone and follows its rules. Facts that change, like interest rates, still come from RAG.

📥Raw datachats, docs🧹Cleanremoveerrors, PII📝Formatpairsinstruction →answer🔧Train LoRAsmalladapters📊Evaluatevs base model🚀Deployand monitor
The fine-tuning pipeline, step by step.
1. Raw dataDocs, chats, logs, Q&A
→
2. Clean & formatRemove duplicates, noise, personal data, bad rows
→
3. Training pairsInstruction → response examples
→
4. Base modelPick an open model
→
5. Fine-tuneTrain LoRA / QLoRA adapters
→
6. EvaluateTest sets, benchmarks, LLM-as-judge
→
7. MergeFold adapters into the model
→
8. DeployServe it as an API

RAG or fine-tuning?

  • RAG for facts that change or must be cited
  • Fine-tuning for style, format, tone and specialised skills
  • Many systems use both

Failure modes to watch

  • Poor data quality: the model learns your mistakes
  • Overfitting: great on training examples, poor on new ones
  • Catastrophic forgetting: it loses general skills it had before
  • No proper evaluation before launch

Try it yourself

About 15 min

Design a tiny training set

  1. Pick a task, e.g. turning messy meeting notes into neat action items.
  2. Write 5 example pairs: input on the left, perfect output on the right.
  3. Paste them into an AI chatbot as examples and test a new input.

What you should see: Good example pairs are the heart of fine-tuning. Quality matters more than quantity.

Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.

Build it for real · guided projectBuild a document Q&A assistant (RAG, no code)About 60 min · No coding needed · step by step
Test what you learned

Take a quick quiz, or look up any word in the glossary.