Models and training

Inference

Inference is the stage where a trained AI model is used to produce outputs, such as answers, classifications or images, from new inputs, as opposed to training, where the model learns from data.

An AI model has two lives. In training it learns from data, which is slow and expensive and usually done by the model provider. In inference it is put to work: each time an application sends it an input and gets a result back, that is an inference call. For a business buying an AI build, almost all of the running cost and most of the speed questions sit in inference, which makes it the part of the model's life that matters most after launch.

How it works

During inference the model's learned weights stay fixed. The application sends an input, the model performs its calculations, and a result comes back. For a language model, that means reading the prompt and generating a reply token by token. For an image classifier, it means returning a label and a confidence score.

Inference can be run in a few ways:

  • Through a provider's API. The simplest route. The provider hosts the model and charges per use, typically per token for language models.
  • On rented cloud hardware. A team runs a model, often an open-weight model, on graphics processors it rents, paying for the machines rather than per request.
  • On a device. Small or compressed models can run on a phone, laptop or edge device, avoiding network calls.

Techniques such as quantization, caching and batch processing reduce the cost or time of each inference. Requests that need an immediate answer, such as a live chat reply, are handled differently from bulk jobs, such as classifying a backlog of documents overnight.

What it means for cost

Inference is the recurring cost of an AI build. It scales with how many requests the system handles and how large each one is. A prototype tested by a few people may cost very little to run; the same design used by thousands of customers can become a significant monthly expense. Choosing the right model size for each step, keeping prompts lean and processing bulk work in batches all reduce it.

Ask a builder for an estimate of inference cost at realistic volume, which parts of the system call a model, and whether cheaper options exist for the simpler steps.

Common questions

Is inference cheaper than training?

Each inference call is cheap compared with training a model, but inference happens continuously while training happens once. For a business using a provider's model, inference is usually the only model cost it pays.

Why do some providers charge differently for input and output?

Generating output tokens one at a time takes more computation than reading input, so many providers price output higher. Builds that produce long answers therefore cost more to run than ones that return short labels.

Can inference run without sending data to a provider?

Yes, if the model is self-hosted on your own infrastructure or on a device. That keeps data in-house but brings hardware, setup and maintenance work that a hosted API avoids.

Related terms

Pricing a build that involves Inference? Send the brief and get a fixed price set next to the market range.Get a quote