Introduction to Tuning

A pretrained LLM knows a lot about language in general — but nothing about your format, your domain, or your tone. Tuning (fine-tuning) is how you adapt a model: continue training it on your data so its weights change to fit your task. It's the most powerful way to shape a model's behaviour — and also the one most often reached for too early.

💡 In one line: Tuning continues training a pretrained model on your own data, updating its weights to specialise it for your task.

What is Tuning?

Tuning takes a pretrained model and continues training it on a smaller, task-specific dataset, updating its weights. The model keeps its general language ability and gains your specific behaviour — a form of transfer learning.

Prompting changes the input; tuning changes the model.

Where It Fits: Pretraining → Tuning → Use

  • Pretraining — learn language from a huge corpus (months, millions of dollars).
  • Tuning — adapt to a task with your data (hours to days, far cheaper).
  • Inference — use the tuned model.

You almost never pretrain; you tune.

Why Tune?

  • Consistent format — reliable structured output every time.
  • Domain expertise — medical, legal, or internal jargon.
  • Tone and style — sound like your brand.
  • Task specialisation — beat a general model on one narrow job.
  • Efficiency — a small tuned model can match a big general one, at lower cost and latency.
  • Shorter prompts — the behaviour is baked in, so you stop paying for a long instruction block on every call.

The Three Ways to Adapt a Model

PromptingRAGTuning
ChangesThe inputThe contextThe weights
Best forQuick behaviour tweaksFacts & freshnessFormat, style, skills
CostFreeLowHigher
UpdateInstantChange the dataRetrain

The rule of thumb: RAG for knowledge, tuning for behaviour. If the model doesn't know something → RAG. If it doesn't behave right → tune.

Should You Tune? (Start Here)

Tuning is often the wrong first move — try the cheaper options first. 

Whiteboard
Whiteboard diagram


Types of Tuning (Ahead)

  • Full fine-tuning — update all weights.
  • Instruction tuning — teach it to follow instructions.
  • PEFT / LoRA — update a tiny fraction of weights.
  • RLHF / DPO — align to human preferences.

What You Need

  • Data — a few hundred to a few thousand high-quality examples. Quality beats quantity.
  • Compute — GPUs (or a hosted tuning API).
  • A base model — open weights (Llama, Mistral, Qwen) or a provider's tunable model.
  • Evaluation — a held-out set, or you won't know if it worked.

Risks

  • Catastrophic forgetting — it gets worse at everything else.
  • Overfitting — memorises your small dataset.
  • Cost and maintenance — a new base model means retuning.
  • Data quality — garbage in, garbage out, permanently baked into the weights.

Summary

  • Tuning continues training a pretrained model on your data, changing its weights.
  • Prompting changes the input, RAG changes the context, tuning changes the model.
  • Use RAG for knowledge, tuning for behaviour — format, style, and task skill.
  • Try prompting and RAG first; tune when you have quality examples and a real need.
  • Mind forgetting, overfitting, cost, and above all data quality. EOF echo created