Today

How LLMs are trained

How an LLM is trainedThree steps: reading lots of text, practising good answers, and learning from feedback.Like school: read, practise, get feedback1. ReadHuge piles oftext2. PractiseGood exampleanswers3. FeedbackPeople rateits replies
The three training steps, like going to school.

Step 1: reading everything

The model reads a giant pile of text and learns to guess the next word. This step takes thousands of computer chips running for weeks or months. It is where it picks up language and facts.

Step 2: practising good answers

Next it studies example questions with good answers, so it learns to follow instructions instead of just continuing the text.

Step 3: feedback

People, or other AI, rate its answers. The model learns to give answers that are helpful, honest and safe. Newer 'thinking' models also practise solving hard problems step by step.

Key takeaways

  • Read a lot, practise with examples, then learn from feedback.
  • The first step uses most of the computing power.
  • Using a finished model is much cheaper than training it.

Quick questions

What is fine-tuning?

Giving an already trained model extra lessons on a smaller topic so it gets better at it.

What is inference?

Using the trained model to get an answer.

Can I train my own?

Training from scratch costs a fortune. Fine-tuning an open model is much more affordable.

Keep learning