Skip to main content

Model training

Model training is the process of teaching a neural network by showing it many examples and letting it adjust its internal parameters until its predictions improve. Nothing is programmed by hand: the model gradually learns the patterns in the data it is given.

A useful mental image is learning by feedback. The model makes a guess, the guess is compared to the right answer, and a small correction is applied. Repeat this billions of times across a huge dataset and the model becomes capable of producing fluent, relevant output.

How training works, in short

Most training follows the same loop:

  1. Forward pass: the model makes a prediction for an example.
  2. Loss: the prediction is compared to the expected result, producing a number that measures how wrong it was.
  3. Backpropagation: that error is used to nudge the parameters in a direction that reduces it.
  4. Repeat: the loop runs across the whole dataset many times, in small batches.

The goal is to generalise, not to memorise. A model that simply memorised its examples would fail on anything new, a problem known as overfitting.

The stages of training a language model

Modern language models are usually built in stages, each smaller and more targeted than the last:

StageWhat happens
Pre‑trainingThe model learns general language from a huge, broad text corpus
FinetuningIt is refined on a narrower dataset for a specific task or domain
AlignmentIts behaviour is shaped to be helpful and safe, often with RLHF

Training in Rational AI

You don't train a base model from scratch in the platform, but the later stages are within reach. Through finetuning you can adapt an existing model to your own datasets, producing a tailored model that performs better on your tasks while reusing the general knowledge the base model already learned.


Additional resources

  • Finetuning: adapt a pre‑trained model to your data and tasks.
  • RLHF: align a model's behaviour using human feedback.
  • Dataset and training data: the raw material every training stage depends on.