AI WordsLanguage modelsIntermediateone layer deeper

Fine-tuning

Made by AIWritten by AI (Claude) from this site's records and lessons, and published after automated checks. The owner doesn't read every item.How it's made

Extra training that shapes an already-trained model for a specific job or style.

Fine-tuning takes a model that has finished pretraining and trains it a bit more on a smaller set of examples, so it fits a particular task or tone. It doesn't start over; it adjusts what the model already knows. Teaching a model to answer questions helpfully, using model answers, is one kind of fine-tuning.

Often the original numbers stay frozen and only a small add-on set is trained. LoRA, published in 2021, works this way, which makes fine-tuning even big models fairly cheap. Fine-tuning is good at changing style and format; for adding new facts, RAG, which looks things up and answers with the source open, is often a better fit.

Think of it like this

Say a friend who's already great at soccer is asked to play goalkeeper. They don't relearn soccer from scratch; they add a few weeks of goalkeeper practice. Fine-tuning likewise adds one skill on top of what's already there.

For example

From the same base model, fine-tuning can produce a coding helper, a math tutor and a friendly chat buddy as separate versions.

Common mix-ups

  • Mix-upFine-tuning means training the model again from scratch.

    ActuallyLoRA, from 2021, cut the numbers that need training when adjusting a GPT-3-sized model to about one ten-thousandth of the original. It didn't slow down answering either — a completely different scale from teaching it all over again.

  • Mix-upIf you want to add new facts, fine-tuning is the best way.

    ActuallyIf a bus timetable changes, re-tuning the model every time is a hassle; swapping in the new timetable file is much quicker and easier to check. Facts added by fine-tuning are also hard to trace back to a source.

Try it in class

For teachers at the start of a lesson — or for students working on their own.

Question
For a "school lunch menu helper", would you pick fine-tuning or RAG?
Activity
Each group picks an AI helper to build (a maths tutor, a friendly guide, today's lunch menu…) and writes whether what they want to change is tone and format or new facts. Mark tone as fine-tuning and new facts as RAG, then explain why. Open the FLAN record (E0131) to see when "tuning a model to follow instructions" appeared.

Records about this

Source-checked moments from AI history.

Google (Wei et al.)
FLAN

The 137B model outperformed the 175B GPT-3 zero-shot on 20 of 25 tasks

Microsoft (Edward J. Hu et al.)
LoRA

Freezes the weights and trains only low-rank matrices, cutting trainable parameters to 1/10,000 for GPT-3 175B, with no increase in inference latency