Your bookmarks

Loading your bookmarks

Latest updates

New courses, skills, book chapters, and site improvements will appear here.

Create free accountSign upDashboardDashboard

Fine-tuning

  • Training
  • Standard term
2 steps

Fine-tuning is extra training that adjusts an already-trained AI model's internal settings, called its weights, using your own examples, so it picks up a format, style, task, or behavior.

Training shows the model each example and nudges its weights so it would produce something closer to that example's answer next time. Over thousands of examples, the nudges add up to a habit. Facts get absorbed in the same blurry way, so one that appeared only a few times may come back distorted.

Where you’ll meet it

In a team meeting, someone proposes fine-tuning a model on two thousand of your past support replies, so new replies come out in your tone and layout. The plan also trains in this year's price list, so the model will know the prices.

What to do

Split the plan in two. Tone and layout are habits, which fine-tuning teaches well, though a prompt with a few sample replies may get close. Try that prompt on fifty past questions, comparing its drafts with your team's replies. Prices change, so keep them in a document the assistant searches as it answers. That setup is retrieval-augmented generation (RAG).

Easy to mix up

RAG looks up a passage when you ask, so an answer can point to where it came from. Fine-tuning builds the examples into the model's weights, which leaves no trail back to them.

Check yourself

Your team fine-tuned a model on your support replies last year. Now the provider offers a newer model that writes better overall. What happens to your tuning if you switch?

Go deeperSome methods train just an add-on, and all can shift other behavior

Fine-tuning comes in several forms. Full fine-tuning changes every weight. Methods such as LoRA (low-rank adaptation) leave the model's weights untouched and train a small add-on beside them, which needs far less computing and lets one model serve many teams, each with its own add-on. Preference tuning trains on pairs of answers ranked better and worse.

Narrow training has side effects. Qi and colleagues showed in 2023 that fine-tuning on harmless examples can weaken a model's safety training. Gekhman and colleagues found in 2024 that teaching a model facts it didn't already know raised its rate of invented answers.

Practice Modern AI

Or take the learning quiz on a mix of every set