AI · Interactive Guide

Training vs Inference

How AI learns and how it answers — the two phases every ML system goes through, not just chatbots

9 sections
Interactive
Updated Aug 2026
Hook — 01 / 09

ChatGPT answers in seconds — yet it took months to "learn." How can both be true?

If training an AI takes months and costs a fortune in compute, why does it respond to your question in under a second? The answer lies in two phases that never overlap: Training and Inference.

This explainer applies to every type of ML system — not just chatbots. Whether it's Face ID on your phone, a spam filter in Gmail, or a music recommendation engine, every ML model goes through exactly these two phases.

Analogy — 02 / 09

A Michelin chef and a driving licence — two ways to see it

Training = Opening the restaurant

The head chef experiments with recipes — tastes, adjusts, discards, repeats — hundreds of times. Takes months, burns through ingredients. The recipe book isn't finalised until opening night.

Inference = Cooking each order

The recipe is fixed. A customer orders. The chef follows the recipe and plates in 5 minutes. Same recipe, every time. No experimenting between orders.

Analogy 2 — A driving licence

Training = Lessons, practice, tests — time-consuming, costly, done once (or rarely).  |  Inference = Every delivery run you do after passing — you don't re-learn to drive each morning.

Live View — 03 / 09

Switch between phases — Training vs Inference

Viewing:
Training Phase

Learning

The model sees millions of examples, makes predictions, compares them to ground truth, calculates how wrong it was (loss), then adjusts internal values (weights). Repeat until good enough.

EPOCH 3 / 50(illustrative numbers)
LOSS HIGH → decreasing
DATA trillions of tokens
Weights updating
Inference Phase

Serving

Receives user input, flows it through the frozen weights (forward pass), returns output. Repeatable millions of times per day without changing weights at all.

REQUESTS millions / day
LATENCY LOW — seconds
INPUT user's question / prompt
🔒 Weights locked
Every chat → does the AI get smarter?
Toggle to see the answer
No — weights are frozen during inference. Feedback you give (thumbs up/down) may be stored and used in a future training run if the company chooses to do so, but weights don't update in real time.
Real World — 04 / 09

Every ML system uses these two phases — not just chatbots

Here are three familiar systems — an image classifier, a text classifier, and an LLM — all using the same pattern.

Face unlock on your phone (Image Classifier)

Training

Apple (Face ID), Google (Face Unlock) and others trained on millions of face images for weeks in large data centres.

Inference

Every time you unlock your phone — under 1 second, on the chip inside the device. Weights unchanged.

Email spam filter (Text Classifier)

Training

Email companies trained on billions of labelled spam/ham messages with user feedback over years.

Inference

Every incoming email is classified within milliseconds — no retraining per message.

ChatGPT / Claude / Gemini (LLM)

Training

Trained on vast internet text for months. Estimated cost: hundreds of millions of dollars (estimate — exact figures not publicly confirmed).

Inference

Every question you type — answered in seconds. Same frozen weights for every user globally.

The same pattern holds for music recommendation engines, airport face-detection gates, and real-time language translation — every ML system separates learning from serving.

Resources — 05 / 09

How much does Training vs Inference actually cost?

Dimension Training Inference
Time Weeks to months Milliseconds to seconds
GPU / TPU Very large cluster (thousands of chips) Moderate (per request)
Energy bill Very high (total run) Low (per request)
Data input Large labelled dataset User's prompt / input
Weights Updated every batch Read-only (frozen)
Frequency Infrequent (retrain cycles) Millions of times per day
Note: The training cost of frontier-scale LLMs (models with hundreds of billions of parameters) is estimated at hundreds of millions to billions of USD (estimates from Epoch AI, 2024–2025 — exact figures are not publicly confirmed by companies; last_verified_at: 2026-08)
Common Myths — 06 / 09

5 things people commonly get wrong

Click each one to reveal the truth.

"The AI learns while we chat with it"
False. Weights are frozen for the entire inference session. Feedback you provide (thumbs up/down) may be logged and used in a future training run — but weights don't change mid-conversation. Every user on the planet is hitting the same frozen weights.
"Inference doesn't use GPUs"
False. Inference still needs GPUs or accelerator chips (Apple Neural Engine, Google TPU, etc.). The difference is it only runs a forward pass — no gradient calculation — so it's far lighter per request than training.
"You train a model once and it's done forever"
False. Large models undergo periodic retraining to update knowledge and fine-tuning to adjust behaviour for specific tasks. Training is an ongoing process, not a one-time event.
"Fine-tuning = training from scratch"
False. Fine-tuning starts from a pre-trained base model and adapts only a portion of its weights using a smaller, task-specific dataset. Think of a chef who already knows classical technique learning a specific regional cuisine — they don't re-learn knife skills.
"Longer training always means a better model"
False. Over-training causes overfitting — the model memorises the training data instead of learning general patterns. It then performs well on things it has seen but poorly on new inputs. The goal is to find the right stopping point.
Key Vocabulary — 07 / 09

6 terms you need before reading AI news

Click any term to see its definition.

Quiz — 08 / 09

Test your understanding — 4 questions

1. Unlocking your phone with Face ID is an example of which phase?
Weights were frozen by Apple/Google during training. Every time you unlock, you're using the result of that training — that's Inference.
2. Which phase produces the largest single energy bill?
Training runs a massive GPU cluster for weeks or months — the total bill is enormous. Inference is cheaper per request even though it runs millions of times a day.
3. True or false? "Every conversation you have with ChatGPT makes the model smarter."
False. Weights don't change during inference. Feedback may be collected for future training runs if OpenAI chooses to use it — but the model you're talking to right now is frozen.
4. "The recipe book in a restaurant" maps to which ML term?
Weights are the "recipe" — billions of numerical values the model learned during training. During inference they're read-only, like a chef following a finalised recipe without changing it per order.
Summary — 09 / 09

Remember just these three things

Lesson level
Foundation · Practical
Prerequisites
Recommended next
What makes a good prompt → Later lessons of the ML fundamentals course are not published yet — this link jumps ahead to the applied-AI course.
Going deeper
Next / Previous
Related: Why AI Hallucinates How LLMs Work