Large Programs

Home / History of AI

History of AI

Training vs inference: when an AI learns and when it answers

Every chatbot you talk to has two very different moments in its life. Training is when it learns: it reads enormous amounts of text and slowly adjusts its internal numbers until it gets good at predicting words. Inference is when it answers: it uses those finished numbers, unchanged, to respond to your question. When you chat with an AI, you are always using inference - the model is not learning from your conversation as it talks to you.

Training: the long, expensive part

Training a large language model is like revising for the biggest exam in the world. The model starts with random numbers - its parameters - and guesses terribly. Each time it guesses wrong, a process called backpropagation nudges the numbers a tiny bit in a better direction. Repeat that across trillions of words, on thousands of powerful chips running for weeks or months, and the model slowly becomes good at language. Training the biggest models costs millions of dollars in computing power, which is part of why people watch AI's energy use so closely.

Inference: the quick part you see

Inference is what happens every time you press send. Your message is broken into tokens, the model runs its frozen numbers once, and out comes a reply, one token at a time. No learning happens here. If you tell a chatbot your name, it can use that inside the conversation because your words sit in its context window - its short-term memory for the chat - but the underlying model stays exactly the same.

A simple way to remember it

Think of a footballer. Training is the years of practice: drills, mistakes, coaching, slow improvement. Inference is match day: all that practice is applied in the moment, but playing one match does not rebuild the player's muscles. Chatting with an AI is match day, every time.

Why the difference matters

If you want the next level of detail, read how LLMs learn and how LLMs run on computers.

Source: Large Programs explainer, based on standard machine learning practice; see our linked guides for each concept.