AI Hints
Home›Fine-Tuning LLMs Tutorial›What Fine-Tuning Is
Fine-Tuning LLMs · Lesson 1 of 120

What Is Fine-Tuning?

Teaching a model your job.

⏱ 2 min read▶ Video at 0:00🎓 Free
Watch this lesson in the Fine-Tuning LLMs courseWatch on YouTube ↗Full Fine-Tuning LLMs course

Let's start at the very beginning. A large language model, or LLM, is a program that has read a huge amount of text. It can write, answer questions, and summarise. But it knows a little about everything, and not much about your work. Fine-tuning changes that.

  • An LLM has read a huge amount of text
  • It knows a little about everything
  • Fine-tuning teaches it your work

An everyday example

Think about a doctor. First, they go to medical school, and learn a bit of everything. That takes years. Then, they train as a specialist, for example, a heart doctor. That's much shorter, and it builds on what they already know. A model works the same way. Fine-tuning is the specialist training.

keyvalue
Medical schoolyears, a bit of everything
Specialist trainingshorter, one job
Builds onwhat they already know
For a modelfine-tuning = specialist training

Two new words

We need two words before we go further. Inside every model are millions of numbers, called weights, or parameters. The weights hold everything the model has learned. Training means changing the weights, so the model gets better at a task. And fine-tuning means training an already trained model a little more, on your own examples.

keyvalue
Weightsthe numbers inside a model
Parametersanother name for weights
Trainingchanging the weights
Fine-tuninga little more training, on your examples

How fine-tuning works

Here are the steps. Start with a model that's already trained. Collect examples of your task. Each example is an input, and the answer you want. Show the examples to the model. It compares its answer with yours, and nudges its weights. Repeat many times. The result is a model that does your task well.

  1. Starta trained model
  2. Collectexamples of your task
  3. Showinput and right answer
  4. Nudgethe weights a little
  5. Resulta model for your task

Summary

Let's recap. An LLM has read a lot of text, and knows a bit of everything. Its knowledge lives in numbers called weights. And fine-tuning trains it a little more, on your examples. Next, how an LLM actually works.

Key takeaways
  • LLM: read a lot of text
  • Weights hold what it learned
  • Fine-tuning: more training on your examples
Next up: How LLMs Work — predicting the next token