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
| Training | Inference | |
|---|---|---|
| What happens | The model learns from data and its weights change | The model applies what it learned, and its weights stay fixed |
| When | Once, or periodically | Every time the model is used |
| Cost pattern | A large up-front cost | A small cost per request that scales with usage |
| What matters | Model quality | Speed, cost and reliability |
| Who does it | Mostly model developers | Anyone 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?
| Option | How it works | Suits |
|---|---|---|
| Hosted API | A provider runs the model and you pay per use | Most teams |
| Your own cloud | You rent GPUs and run a model yourself | Privacy needs, very high steady volume |
| On-device or edge | The model runs on a phone, laptop or sensor | Offline use, low delay, sensitive data |
How do you reduce inference cost?
- Use the smallest model that passes your quality test.
- Shorten prompts and cap output length.
- Route easy requests to a cheap model and hard ones to a strong one.
- Batch work that is not urgent.
- Cache repeated instructions and frequent answers.