AI Hints
Home›Fine-Tuning LLMs Tutorial›When to Fine-Tune
Fine-Tuning LLMs · Lesson 5 of 120

What Fine-Tuning Can and Can't Do

Set the right expectations.

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

Many people expect fine-tuning to work like magic. They hope it will teach a model everything about their company. It won't. Let's set the right expectations, before we write any code.

  • Not magic
  • It won't learn everything
  • Right expectations first

Good at, and bad at

Fine-tuning is good at teaching behaviour. A tone of voice. An output format, like JSON. A narrow task, like sorting messages into groups. But it's bad at adding lots of new facts. The model may remember some of them, but it can also mix them up, and make things up.

Good at

  • A tone of voice
  • An output format, like JSON
  • A narrow, repeated task

Bad at

  • Adding lots of new facts
  • Facts that change often
  • Fixing a model that is too small

Small models can win

Here's the exciting part. A small fine-tuned model can beat a huge general model, on one narrow task. And small models are faster, and much cheaper to run. That's why companies fine-tune. Not to make a model smarter at everything, but better at one thing.

keyvalue
Narrow tasksmall model + fine-tuning
Speedanswers much faster
Costfar cheaper to run
Goalbetter at one thing

Quick check

Let's check. A shop wants its model to always know today's prices, which change every day. What should it use? Pause, and think about it. The answer is C, RAG. Facts that change often belong in a search, not in the weights.

Quick check
The model must know today's prices, which change daily. Best tool?

Summary

Let's recap. Fine-tuning teaches behaviour, like tone, format, and narrow tasks. It's not a good way to add changing facts. And a small fine-tuned model can beat a big general one, at one task. Next, the tools we'll use.

Key takeaways
  • Teaches behaviour
  • Not changing facts
  • Small can beat big
Next up: The Tools: Transformers, PEFT, TRL — the Hugging Face toolkit