Skip to content

How Large Language Models Are Trained

The stages behind today's language models: pre-training on text, instruction tuning, and learning from feedback.

Editorial team 1 min read

Modern language models go through several training stages.

Pre-Training

The model learns to predict the next token across vast amounts of text and code. This teaches grammar, facts, reasoning patterns and coding skills. It's by far the most expensive stage.

Supervised Fine-Tuning

The pre-trained model is trained on examples of instructions and good responses, teaching it to follow requests and hold conversations.

Learning From Feedback

Models are refined using preference data — people or AI systems rating which responses are better — via techniques such as reinforcement learning from human feedback (RLHF) or direct preference optimisation. Training against written principles is another approach.

Reinforcement Learning on Verifiable Tasks

Rewarding correct answers on tasks with checkable outcomes — maths, code with tests — improves reasoning.

Safety Training

Teaching models to refuse harmful requests, resist manipulation and be honest about uncertainty.

Why It Matters to Users

  • Knowledge stops at a training cut-off.
  • Behaviour reflects training choices, so models from different providers differ in style and strengths.
  • Fine-tuning builds on these stages rather than replacing them.

More in Generative AI

All Generative AI guides →
Generative AI Guide · 2 min

Prompt Engineering Fundamentals

The building blocks of a good prompt — context, task, constraints and format — with before-and-after examples.

Generative AI 2 min read 24 Jul 2026

Generative AI Guide · 2 min

Few-Shot Prompting With Examples

Showing a model a few examples of the input and output you want is often clearer than describing it. How to choose good examples.

Generative AI 2 min read 23 Jul 2026

Generative AI Guide · 2 min

Getting Structured Output From LLMs

How to get JSON and other machine-readable output reliably from a language model, and how to validate it.

Generative AI 2 min read 22 Jul 2026

Generative AI Guide · 2 min

Why Language Models Hallucinate

What hallucination is, why it happens, and practical ways to reduce and catch it.

Generative AI 2 min read 21 Jul 2026