Guide
What Is AI Inference?
A plain-English guide to AI inference: what inference is, how it differs from training, how a language model generates an answer, what makes it fast or slow, the chips it runs on in data centres and on your own devices, how it is made cheaper, what it costs and why reasoning models use more of it.
Definition: AI inference is the process of running a trained AI model to produce an output from new input. Training builds the model once, by adjusting its parameters on huge amounts of data. Inference uses the finished model, unchanged, every time someone sends a prompt, unlocks a phone with their face or gets a spam email filtered.
Inference is the part of AI that people actually use and pay for. Every answer from ChatGPT, Claude or Gemini is an inference, and every per-token API price is a price for inference. NVIDIA describes inference as “the process where a trained AI model generates new outputs by reasoning and making predictions on new data” (NVIDIA).
This page explains inference: how it works, where it runs and what drives its speed and cost. For the models themselves, see what is an LLM. For the units inference is measured and billed in, see AI tokens explained. For the companies that sell inference through an API, see best LLM APIs.
What is AI inference?
Every AI model has two stages in its life. In training, it learns. In inference, it works.
A trained model is a large set of numbers, called parameters or weights, plus the instructions for combining them. Inference means feeding new input through those numbers and reading off the result. The model does not learn anything during inference: its parameters stay exactly as training left them.
Inference looks different depending on the model:
| Model | Input | What inference produces |
|---|---|---|
| A language model | A prompt | The next token, repeated until the answer is complete |
| An image generator | A text description | An image, built up over a series of steps |
| A face-recognition model | A camera frame | A yes or no: is this the phone’s owner? |
| A spam filter | An email | A label: spam or not spam |
| A speech-recognition model | Audio | A transcript |
The word comes from statistics, where inference means drawing a conclusion from data. In AI, it has come to mean any use of a trained model, including generating text, images or audio.
Training vs inference: what’s the difference?
Training and inference use the same model in opposite ways. Training changes the parameters; inference only reads them.
| Training | Inference | |
|---|---|---|
| What happens | The model’s parameters are adjusted, over and over, until its predictions match the training data | The finished parameters are used, unchanged, to produce an output |
| How often | Once per model version, over weeks or months | Every time anyone uses the model |
| Who pays | The AI lab or company building the model | The user, through a subscription or a per-token price, or the company running the product |
| Hardware | Large clusters of GPUs or TPUs working together | Anything from a data-centre chip to a phone, depending on the model’s size |
| What matters most | Total computing power | Speed for each user, and cost for each answer |
The machine learning guide explains how training works. Fine-tuning sits between the two: it is a short extra round of training on a finished model, after which the adjusted model is used for inference as normal.
A single inference is cheap compared with training, but inference happens billions of times. Google said in May 2026 that it was processing more than 3.2 quadrillion tokens a month across its products, up from 9.7 trillion two years earlier (Google). Google’s chief executive, Sundar Pichai, said in October 2026 that Google’s own model APIs were processing “nearly 32 billion tokens per minute” (Google). Both are Google’s own figures.
How inference works in a language model
A language model generates text one token at a time. A token is a word or a piece of a word, as the tokens guide explains. Each new token needs a full pass through the model, and the token it produces is added to the input for the next pass.
Inference in a language model runs in two phases:
- Prefill. The model reads the whole prompt at once. NVIDIA describes this phase as “highly parallelized”, because every input token can be processed at the same time (NVIDIA).
- Decode. The model writes the answer one token at a time. NVIDIA calls this “a memory-bound operation”: the chip spends most of its time loading the model’s parameters from memory rather than calculating (NVIDIA).
During decode, the model stores intermediate results for every token it has already handled, in what is called the KV cache. NVIDIA explains that the cache exists “to avoid recomputing all these tensors for all tokens at each time step” (NVIDIA). The cache grows with every token, which is one reason long conversations use more memory and cost more to serve.
The LLM guide covers the steps inside each pass, from tokenisation to attention.
Inference speed: time to first token and tokens per second
Two numbers describe how fast inference feels. Artificial Analysis, which measures the speed of AI models and API providers, defines them as follows (Artificial Analysis):
| Measure | Artificial Analysis definition | What it feels like |
|---|---|---|
| Time to first token (TTFT) | “The time in seconds between sending a request to the service or system and receiving the first token of the response” | How long you wait before the answer starts |
| Output speed | ”The number of output tokens, including reasoning tokens, received per second over a request’s full duration” | How fast the answer streams once it starts |
| End-to-end time | ”The time in seconds between sending a request and receiving the final token” | How long the whole answer takes |
Prefill mostly sets the time to first token, so a very long prompt means a longer wait before anything appears. Decode sets the output speed. The same model can run at very different speeds on different providers and chips, which is why the best LLM APIs page compares providers on speed as well as price.
Where AI inference runs
Inference runs wherever the model is: in a data centre for large models, or on the device in your hand for small ones.
In the data centre
Most chatbot answers are generated on chips in data centres. Graphics processing units (GPUs) do much of this work. The large cloud companies have also built chips designed for inference:
| Chip | Company | What the company says it is for |
|---|---|---|
| Ironwood TPU | ”The first designed specifically for inference”, with up to 9,216 chips in one pod (Google) | |
| Inferentia | Amazon Web Services | Designed “to deliver high performance at the lowest cost in Amazon EC2” for inference (AWS) |
| Maia 200 | Microsoft | ”Engineered to dramatically improve the economics of AI token generation”; at its January 2026 launch, Microsoft said it would serve OpenAI’s GPT-5.2 models and Microsoft 365 Copilot (Microsoft) |
Microsoft says Maia 200 gives “30% better performance per dollar” than the latest-generation hardware in its fleet at launch (Microsoft). That is Microsoft’s own claim.
Smaller companies build chips only for inference. Groq makes a chip it calls an LPU, and in December 2025 NVIDIA agreed a non-exclusive licence for Groq’s inference technology, with Groq’s founder, Jonathan Ross, and its president, Sunny Madra, joining NVIDIA (TechCrunch). Cerebras sells inference on a chip it calls the Wafer-Scale Engine, which it says is “purpose-built for ultra-fast AI” (Cerebras). Both appear among the inference providers on best LLM APIs.
On your own device
Phones and laptops run smaller models locally, usually on a neural processing unit, a chip built for AI inference. The NPU guide explains how these chips work and how they are measured.
Apple’s on-device model, which runs Apple Intelligence features on Apple devices, has about 3 billion parameters, compressed to “2 bits per weight” so it fits in a phone’s memory (Apple). Larger open-weight models can run on a personal computer: OpenAI says its gpt-oss-20b model “can run on edge devices with just 16 GB of memory” (OpenAI).
Cloud inference vs on-device inference
| Cloud inference | On-device inference | |
|---|---|---|
| Model size | The largest models, with hundreds of billions of parameters or more | Small models, usually a few billion parameters |
| Capability | The strongest results on hard tasks | Suited to shorter, simpler tasks |
| Privacy | Your input is sent to the provider’s servers | Your input stays on the device |
| Internet | Needed | Not needed |
| Cost to you | A subscription or a per-token price | Nothing extra once you own the device |
For models you can download and run yourself, see best local LLMs and what is open-source AI.
How inference is made faster and cheaper
Four techniques do most of the work of making inference affordable.
- Batching. The server processes many users’ requests together, so the chip does useful work while it loads each set of parameters. NVIDIA calls batching “the simplest way to improve GPU utilization, and effectively throughput” (NVIDIA). The researchers behind vLLM, an open-source serving system, reported that cutting wasted KV-cache memory, which limits how many requests fit in a batch, raised throughput “by 2-4×” over leading systems of the time, such as FasterTransformer and Orca (Kwon et al.).
- Caching. When many requests start with the same text, such as a long set of instructions, the provider can keep the processed version and reuse it. In November 2026, Anthropic’s pricing page listed reading cached input at a tenth of the normal input price on most Claude models, and a twentieth on Claude Opus 5.5 (Anthropic).
- Quantisation. The model’s numbers are stored with fewer bits, so it needs less memory and runs faster, at some cost to accuracy. Hugging Face gives the example of an 8-billion-parameter model that needs about 16 GB for its weights at standard precision, about 8 GB at 8 bits and about 4 to 5 GB at 4 bits (Hugging Face).
- Speculative decoding. A small, fast model guesses several tokens ahead, and the large model checks them all in one pass. The researchers who introduced the method reported a “2X-3X acceleration” on Google’s T5-XXL model, with “identical outputs” to normal decoding (Leviathan et al.).
What inference costs
Inference is priced in tokens. API providers charge a price per million input tokens and a higher price per million output tokens, because output is produced one token at a time in the slower decode phase. The tokens guide works through what a typical job costs.
Providers also sell the same inference at different speeds for different prices:
| Option | What changes | Example on Anthropic’s API |
|---|---|---|
| Standard | The normal speed and price | Claude Opus 5.5: $4 per million input tokens, $20 per million output |
| Batch | Requests are processed later, not straight away | 50% off both input and output: $2 and $10 |
| Fast mode | ”Up to 2.5x higher output tokens per second” | $8 and $40, double the standard price |
Anthropic’s pricing page listed these prices in November 2026.
The price of a given level of capability has fallen quickly. Epoch AI, a research group that tracks AI trends, reported in March 2025 that the price of reaching a fixed level of performance fell between 9 and 900 times a year, depending on the task (Epoch AI).
Inference also uses energy. Google reported that the median text prompt in its Gemini apps used 0.24 watt-hours of energy and 0.26 millilitres of water, measured in May 2025, and that energy per prompt had fallen 33 times in the previous 12 months (Google Cloud). That is Google’s own measurement, and it covers answering prompts, not training the model.
Test-time compute: why reasoning models use more inference
Reasoning models think before they answer. They write out a chain of intermediate steps, called reasoning tokens, and only then give the final answer. Each reasoning token is generated by inference like any other.
OpenAI reported in September 2024 that its first reasoning model, o1, did better “with more time spent thinking (test-time compute)” (OpenAI). Test-time compute means the computing power spent at the moment a question is answered, as opposed to during training. It gave labs a second way to improve results: spend more on inference, not only on training a bigger model.
The trade-off is cost and waiting time. Reasoning tokens are usually billed as output tokens, and Artificial Analysis counts them in its output-speed figures (Artificial Analysis). A hard question that makes a model think for thousands of tokens costs more, and takes longer, than a quick reply. The tokens guide explains how reasoning tokens are counted and billed.
Inference providers
An inference provider is a company that runs AI models on its own hardware and sells access by the token. The labs that build models, such as Anthropic, OpenAI and Google, sell inference on their own models. Cloud platforms such as AWS Bedrock and Microsoft Foundry host many companies’ models in one place. Specialists such as Groq, Cerebras, Together AI and Fireworks AI serve open-weight models, often competing on speed. Best LLM APIs compares them on price, speed and data terms.
Frequently asked questions
What is AI inference in simple terms?
AI inference is using a trained AI model to get an answer. The model has already learned from data during training; inference is the moment it applies what it learned to something new, such as your prompt. Every chatbot reply, every face unlock and every spam filter decision is an inference.
What is the difference between training and inference?
Training builds an AI model by adjusting its parameters on large amounts of data, once per model version, over weeks or months. Inference uses the finished model, with its parameters unchanged, every time someone sends it input. Training is a large one-off cost for the company that builds the model; inference is a small cost repeated billions of times, paid for by users through subscriptions or per-token prices.
Why is it called inference?
The word comes from statistics, where inference means drawing a conclusion from data. A trained model “infers” an answer, such as the next word or whether an email is spam, from the input it is given. In AI, the word now covers any use of a trained model, including generating text, images and audio.
What hardware is used for AI inference?
Much of the inference on large models runs on GPUs in data centres. Google, Amazon and Microsoft have also built their own inference chips: Google’s Ironwood TPU, Amazon’s Inferentia and Microsoft’s Maia 200. Companies such as Groq and Cerebras make chips only for inference. On phones and laptops, a neural processing unit (NPU) runs smaller models locally.
Can I run AI inference on my own computer?
Yes, with a small or medium-sized open-weight model. OpenAI says its gpt-oss-20b model can run on a device with 16 GB of memory, and quantised versions of many open models need less. Results are weaker than the largest cloud models on hard tasks, but nothing leaves your computer and there is no per-token bill.
What is an inference provider?
An inference provider is a company that runs AI models on its own servers and charges for access, usually per million tokens. The AI labs sell inference on their own models through their APIs. Cloud platforms such as AWS Bedrock host models from many companies, and specialists such as Groq, Cerebras and Together AI serve open-weight models, often faster or more cheaply.
What is inference latency?
Inference latency is how long a model takes to respond. It is usually measured as time to first token, the wait before the answer starts appearing, and output speed, the number of tokens per second once it starts. A long prompt mostly increases the wait before the first token; a long answer mostly increases the total time.
Why do output tokens cost more than input tokens?
A model reads all the input tokens at once, in parallel, but writes output tokens one at a time, with a full pass through the model for each. That makes output the slower, more expensive part of inference. In November 2026, every Claude model on Anthropic’s pricing page charged five times as much per output token as per input token.
What is test-time compute?
Test-time compute is the computing power a model spends while answering a question, as opposed to during training. Reasoning models use more of it by working through intermediate steps before they answer. OpenAI reported that its o1 model did better with more time spent thinking, which gave labs a way to improve results by spending more on inference.
Is inference cheaper than training?
A single inference is far cheaper than training: one reply is one run of a finished model, while training builds the model over weeks or months on large clusters of chips. Because inference happens billions of times, the total spent on it is large. Google alone reported processing more than 3.2 quadrillion tokens a month across its products in May 2026.