Inference

The moment a trained model produces an answer for a new input

  • Intro
  • 6 min read
  • 3 diagrams

Key points

  • Inference is the moment a fully trained model takes a new input and produces an answer. Learning and putting it to use happen at different times.
  • While inference runs, the model learns nothing at all. The numbers inside stay exactly as they are; only the incoming input gets calculated and passed out.
  • Training usually happens once, but inference happens every single time it's used. The longer something runs, the bigger inference's share of the cost becomes.
  • Inference matters more the faster it runs. A judgment that takes ten seconds per photo can't go into a camera app.
  • A text-generating model doesn't always give the same answer, even for the same input. Which candidate gets picked out of several options shifts the result a little each time.

The analogy

Picture someone who's spent months scrolling a secondhand marketplace app. Skim through hundreds of listings — what something got posted for, what it actually sold for — and the going rate sinks in. Then a new listing photo shows up, and without digging back through everything they've seen, they can size it up on the spot: "that's worth about this much." That quick moment of pricing something is inference.

Picking up a sense of the market and pricing an item are two completely different jobs. Picking it up took months; pricing one listing takes seconds. But pricing has to be redone from scratch every single time a new listing shows up.

And while that pricing happens, the internal sense of the market doesn't shift. In the moment of pricing this one listing, they're just drawing on a sense of prices they already built up.

In detail

Training and inference happen at different times

Using a model splits into two stretches. The first stretch is training: material gets shown over and over, nudging the numbers inside the model a little at a time. The second stretch is inference: the finalized numbers stay put, and a new input gets passed through them once to pull out a result.

The two stretches usually happen on different days, on different machines. Training gets done in advance by whoever builds the model (for big models it can take weeks); inference happens on the spot, every time a user presses a button. Nearly every moment we spend using an AI service is actually the inference side.

Nothing gets learned during inference

Chat with a bot for a while and it can feel like it's learning who you are as the conversation goes on. But while inference is running, the numbers inside the model don't shift by a single digit. The illusion that the conversation is building on itself comes from re-feeding everything said so far back in as input, every single time.

That's why opening a fresh chat without a memory feature wipes out whatever it seemed to pick up earlier. A service that does remember across chats saves what was said earlier separately and pastes it back into the input, and even then the numbers inside the model stay the same. Nothing was ever learned, so there's nothing to forget. For what's exchanged with a user to actually change the model, a separate step is required — gathering that material and running training all over again.

Cost is paid fresh with every single use

Training gets paid for once, in a big lump, and it's done. Inference doesn't work that way. Every time one user asks one question, the calculation runs all the way through from the start. A million users means a million runs, and if each one uses it ten times a day, that's ten million.

Any single calculation is much lighter than training. But there are so many of them that, the longer a busy service runs, inference's share of the total cost often outgrows training's. That's part of why AI services come with usage limits and pricing tiers.

How fast it answers decides how useful it is

Being accurate isn't enough for inference on its own. For a camera app to recognize an object on screen, the judgment has to land within a fraction of a second per frame, and a driving assistance system needs it even faster than that. Make someone wait too long for an answer, however accurate, and it can't be used in the moment.

That's why builders will give up a little accuracy to make inference lighter — cutting the precision of the numbers, trimming parts that rarely get used, or training a small model separately to imitate what a big model would have decided.

Where the calculation happens is a choice too

Inference can run on a distant server, or it can run right inside the device in someone's hand. Run it on a server and a bigger model becomes available, but it needs an internet connection and the data leaves the device. Run it on the device and the answer comes back instantly with no connection needed and nothing leaves — but the model that fits has to be far smaller.

That's why a phone's photo organizing or captioning feature can keep working on an airplane with no signal — the inference happens right there on the device. The big models that write long, complex text, on the other hand, mostly run on servers. Smaller text models for things like short summaries or rewording, though, increasingly run right on the device.

More precisely

Inference is the calculation that passes an input through a set of parameters fixed by training and produces an output. For something like photo classification, one pass is the whole job, while a text-generating model repeats this pass for every next word it produces. This single-direction pass is called a forward pass. Training tacks on an extra step that traces back through how wrong the result was and corrects the numbers accordingly, but inference skips that step entirely, which is why it's so much lighter and faster. That's also why training needs a stack of expensive hardware while inference often runs on a single modest machine, or even inside a phone. Throughput can also be raised by bundling several users' requests together and calculating them as one batch.

The analogy breaks down in one place. A person's feel for the market shifts a little as they keep looking at listings, but a model's internal numbers don't change no matter how many times inference is repeated. And the word "inference" in everyday language calls to mind careful reasoning, but what's meant here is closer to running one fixed calculation through. Whether the newer models that stretch out their thinking before answering count as thinking like a person is something views differ on. In terms of the calculation, they generate a longer stretch of intermediate text and repeat the same calculation over it many times.

Try it yourself

Common misconceptions

  • It's easy to think an AI learns who you are as you chat with it, but actually the numbers inside the model stay exactly as they are during inference. The conversation only seems to build because everything said so far gets fed back in as input every time.

  • It's easy to think training is the only expensive part and using it afterward is basically free, but actually inference repeats once per user, and the longer a service runs, the more its share of the cost grows.

  • It's easy to think inference means careful, deliberate thinking, the way a person reasons, but in terms of the calculation, it passes an input through a fixed set of numbers. Whether that counts as thinking is something views differ on.

One-line summary

In short

Inference is the moment a trained model takes one new input and produces an answer on the spot, and it's what nearly every moment of using AI actually is.

Spotted an error or have a better analogy? Suggest an edit · Last updated 2026-10-17