AI inference (LLM inference). What it means.

AI inference is the stage at which a trained AI model is put to work: it receives new input and produces an output, such as an answer, a prediction or an image.

By Brady Heinrich · Updated

Definition

AI inference is the stage at which a trained AI model is put to work: it receives new input and produces an output, such as an answer, a prediction or an image.

What is inference in AI?

Inference is a model doing its job. Training is when a model learns. Inference is every time it is used afterwards. Each question to a chat assistant, each fraud score on a card payment and each generated image is one inference request.

For most businesses, inference is the only part of AI they pay for directly. Someone else trained the model. You pay each time it runs.

AI inference vs training

TrainingInference
What happensThe model learns from data and its weights changeThe model applies what it learned, and its weights stay fixed
WhenOnce, or periodicallyEvery time the model is used
Cost patternA large up-front costA small cost per request that scales with usage
What mattersModel qualitySpeed, cost and reliability
Who does itMostly model developersAnyone using the model

A model does not learn from your requests during inference. If a product seems to remember you, it is storing notes and feeding them back in as input.

What determines inference cost and speed?

  • Model size. Larger models are slower and cost more per request.
  • Input and output length. Language models are billed by the token, and output is generated one token at a time.
  • Hardware. Inference for large models runs on GPUs or other AI accelerator chips.
  • Batching. Requests that can wait are often cheaper when processed in bulk.
  • Caching. Reusing a repeated prompt prefix cuts cost and delay where a provider supports it.
  • Reasoning effort. Some models think before answering, which improves hard answers and adds time and tokens.

Two speed measures are worth knowing: time to first token, which is how quickly a response starts, and tokens per second, which is how fast it then streams.

Where does inference run?

OptionHow it worksSuits
Hosted APIA provider runs the model and you pay per useMost teams
Your own cloudYou rent GPUs and run a model yourselfPrivacy needs, very high steady volume
On-device or edgeThe model runs on a phone, laptop or sensorOffline use, low delay, sensitive data

How do you reduce inference cost?

  1. Use the smallest model that passes your quality test.
  2. Shorten prompts and cap output length.
  3. Route easy requests to a cheap model and hard ones to a strong one.
  4. Batch work that is not urgent.
  5. Cache repeated instructions and frequent answers.

An example

A startup's AI feature costs $9,000 a month in inference. Logs show 70% of requests are simple classifications sent to the largest model available. The team routes those to a small model that scores the same on its test set, caches the shared instructions and batches a nightly job. The bill falls to about $2,500 with no change users can see.

The common mistake

Pricing an AI feature from a demo. Ten test requests cost nothing. Ten thousand users sending long conversations cost real money every month. Estimate tokens per request, requests per user and users before setting a price or a usage limit.

How people search for AI inference

  • what is inference in ai3,600 a month
  • ai inference2,900 a month
  • inference ai1,600 a month
  • llm inference880 a month
  • inference vs training480 a month
  • ai inference vs training320 a month

US monthly searches, Google Ads keyword data.

Related terms

Go deeper

Building something ambitious? Let's talk.

We reply within one business day.