ENES

Training and inference

Training builds the model once; inference is using it, millions of times a day.

Left: a pile of data feeding a model whose weights are being adjusted in a loop. Right: one question going through the finished model and coming out as an answer

An AI model has two very different lives. Training is when it learns: the neural network sees enormous amounts of data, makes predictions, measures its errors and adjusts its weights, over and over, for weeks or months on thousands of GPUs. At the end you have a file of numbers, the trained model. It happens once per model version, and it is the expensive part.

Inference is everything after: using the trained model to answer. Every time you send a prompt to Claude or ChatGPT, that is one inference. The weights do not change; the model runs the input through the network and produces an output, token by token. Each one is cheap compared with training, but there are billions of them, so inference ends up being most of the computing bill.

The split explains a lot of what you read in the news. A model's 'knowledge cutoff' is the end of its training data. Fine-tuning is a short extra round of training on specific examples. 'Serving' a model means running inference for users, which is why companies need data centers full of GPUs even after the model is finished.

Example: a model that reads chest X-rays is trained on hundreds of thousands of labeled scans over several weeks. Afterward, in a hospital, it looks at one new scan in under a second. That second is inference.

Keep in mind

Go deeper

Related terms

More in AI