What Is AI Inference? Training vs Inference, Explained Simply

An abstract 3D illustration of a tall column of small white cubes, some blue, with thin vertical lines and dotted streams of data flowing across a pale, minimal background

Photo: Hippopx (public domain). Illustrative image.

What is AI inference?

AI inference is the act of using a trained AI model to make predictions on new data. That is IBM’s definition, and it is the cleanest one: the trained model applies the patterns it learned in training to infer the correct output for a new input. Every time you ask a chatbot a question and get an answer, every time a photo app labels a face, every time a car reads a road sign — that is inference. Training is the expensive part that happens once; inference is the part that happens every time anyone uses the model, and it is what decides what AI costs to run.

How is inference different from training?

Training and inference are the two halves of a model’s life, and they work differently. During training, the model is shown examples, makes a prediction, is told how wrong it was, and adjusts its internal parameters — its weights — to do better next time. That cycle uses a forward pass (making the prediction) and a backward pass (working out how to adjust the weights to minimise the loss). Training a frontier large language model takes weeks on thousands of chips and costs tens of millions of dollars.

Inference is the forward pass only. The model takes your input, runs it through its fixed weights, and produces an output. Nothing is learned and no parameters change — the model is frozen. That is why inference is fast and comparatively cheap: it is one pass through a network that already knows what it knows. It is also why a model cannot learn from your conversation unless it is retrained or given the conversation as context: inference does not update the weights, so nothing you say during a chat changes the model itself.

What are the two types of inference?

Online inference answers one input at a time, immediately. A chatbot reply, a self-driving car reading a road, a dynamic price on a shopping site — all of these need an answer now, so the model processes each request as it arrives. It is the most expensive way to run inference per query, because the model’s billions of weights have to be loaded into memory for a single input.

Batch inference processes large volumes of inputs in scheduled groups. A company might run its nightly reports, score a million transactions for fraud, or translate a document archive in one overnight job. Because the cost of loading the model into memory is spread across thousands of inputs, batch inference is much cheaper per query — but you wait for the batch to run. Between the two sits micro-batching: small groups of requests processed together, which is how services like ChatGPT and Claude serve thousands of simultaneous prompts without each one paying the full cost of loading the model.

Where does inference run?

In four places, each trading control and privacy against cost and compute. On-premise means the model runs on your own servers, inside your own network — maximum control, maximum cost. Cloud means renting GPUs from a provider, which is how most inference runs today. Edge means running the model close to where the data is — on a factory floor, in a store, on a local server — to cut latency. On-device means the model runs on the phone or laptop itself, with no network round trip at all. Small models that can run locally are pushing more inference on-device, which is also the most private option: your data never leaves the device.

What hardware runs inference?

GPUs are the industry standard, because inference is mostly parallel matrix maths and GPUs are built for exactly that — thousands of cores doing the same calculation at once, with CUDA as the programming layer that makes it practical. NVIDIA’s Rubin hardware is the current flagship example. TPUs are Google’s chips, built specifically for neural-network matrix maths, and they run much of Google’s own inference. NPUs are the low-power neural processors now built into phones, designed to run small models on battery power. The choice of hardware is one of the main things that decides inference cost: the same model can cost several times more to run on the wrong chip.

Frequently asked questions

Is inference the same as running the model? Essentially yes. “Running the model” usually means inference — using it to produce outputs. Training is building the model; inference is using it.

Why is inference expensive if the model is already trained? Because the model’s weights — tens or hundreds of billions of numbers — have to be loaded into memory for every request, and the computation is heavy. The cost per query is small, but it is charged millions of times a day.

Does the model learn from my prompts? No. Inference does not update the model’s parameters. Your conversation may be stored by the provider, and it may be used in future training runs, but the model you are talking to does not change during your chat.

What is the difference between inference and prediction? In practice they are the same thing in AI: inference is the model’s prediction on new data. “Inference” is the term used for the whole process of running the model; “prediction” is the output it produces.

Sources

  • AI inference
  • explainer
  • training
  • LLM
  • GPUs

Related articles

Guides

AI Hallucinations: Why Chatbots Make Things Up — and How to Catch Them

Chatbots invent books, misquote laws and state wrong dates in a perfect, confident tone. That behaviour is called hallucination, and it follows directly from how language models work. Why it happens, the forms it takes, and a working routine for catching it.

· hallucinations, chatbots, explainer, fact-checking, AI basics

Guides

How to Evaluate a New AI Tool Before You Trust It

New AI tools launch every week, and every launch claims to change everything. A practical checklist for testing a tool on your own real tasks before you pay, switch, or rely on it.

· AI tools, buying guide, productivity, how-to

Guides

How Does AI API Pricing Work? Token Pricing Explained in Plain English

AI models charge by the token, not by the question — and output tokens cost far more than input tokens. Here's how per-million-token pricing works, what caching and batch discounts do, and how to estimate a bill.

· AI API pricing, token pricing, AI costs, explainer, per million tokens