AI Hints
Home›Fine-Tuning LLMs Tutorial›Mistakes, Troubleshooting and Interview Basics
Fine-Tuning LLMs · Lesson 112 of 120

Common Mistakes

And how to avoid them.

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

Almost everyone makes the same fine-tuning mistakes. Learning them now saves you days of confusion later. Let's go through the most common ones.

  • Everyone makes them
  • Learn them now
  • Save days later

Data mistakes

Most mistakes are about data. Training on the test set makes scores look great, and means nothing. Duplicate examples waste training, and leak into the test set. A different system message in use breaks the model. And forgetting to check the data lets bad examples through.

MistakeFix
training on test datakeep the test set separate
duplicatesdeduplicate first
different system messageuse the training one
never reading the dataread a random sample

Training mistakes

Training has its own traps. A learning rate that's too high makes the loss jump around, or explode. Too low, and nothing changes. Too many epochs, and the model memorises the training data. And forgetting model dot eval, before generating, gives strange outputs.

MistakeFix
learning rate too hightry 1e-4 to 2e-4 for LoRA
learning rate too lowloss barely moves
too many epochswatch the eval loss
no model.eval()call it before generating

Evaluation mistakes

And finally, evaluation. Trusting the loss alone hides real problems. Testing only a few hand-picked examples is misleading. Changing several things at once means you can't tell what helped. And trusting model output without checking it in code is risky.

MistakeFix
loss onlymeasure the task score
a few hand-picked examplesscore the whole test set
many changes at onceone change at a time
trusting the outputvalidate in code

Summary

Let's recap. Keep the test set separate, and read your data. Choose a sensible learning rate, and watch the eval loss. And measure the real task, one change at a time. Next, troubleshooting.

Key takeaways
  • Separate test set
  • Sensible learning rate
  • One change at a time
Next up: Troubleshooting — when training goes wrong