Language models

What is inference in AI?

In short

Inference is when a trained AI model is used to produce an answer, such as writing a reply to your prompt. Training happens once, but inference happens every time someone uses the model, so it drives the running cost and speed.

Training is like a student studying for years. Inference is the student answering a question in an exam. Every chat message, summary or image you ask for is one inference, and AI providers charge for it per token.

Mini course

3 short lessons, about 2 minutes in total

  1. Training versus using
  2. What you pay for
  3. Making inference efficient

Lesson 1

Training versus using

An AI model has two lives. First it is trained: it reads huge amounts of data over weeks or months on thousands of chips. That happens once per model version. Then it is used, over and over, to answer questions. Each use is called inference.

Every requestYour prompt
Inference
Answer
Training builds the model once. Inference is every time the finished model is used to answer, and that is where the running costs are

Tap a box to open that concept

When people talk about AI being expensive or slow to run, they usually mean inference.

Lesson 2

What you pay for

AI providers charge for inference by token: the text you send in and the text the model writes back. Output tokens usually cost several times more than input tokens. Long documents, long conversations and reasoning models that think before answering all use more tokens.

That is why the same task can cost very different amounts depending on how it is set up.

Lesson 3

Making inference efficient

Use the smallest model that does the job well, and test it. Keep instructions short and reuse the same opening text, which providers can cache at a discount. Send batches of non-urgent work at lower prices. And save answers to frequent questions instead of asking the model again.

  1. Customers find youHow customers and AI tools find the companySEOGEOGoogle AI Overviews
  2. AI in daily workTools staff and customers useChatbotAI copilotVoice AI
  3. Building blocksHow AI connects to data and systemsRAG (retrieval-augmented generation)AI agentMCP (Model Context Protocol)
  4. AI modelsThe models that understand and createInferenceLarge language model (LLM)Generative AIMachine learning
  5. DataCompany data, gathered and cleanedData warehouseETLData quality
  6. InfrastructureCloud, networks and systems underneathCloud computingDatabaseAPI key
Trust and rulesSecurity, law and control in every layerGDPR and AIEU AI ActAI guardrails
Where Inference sits in a company's AI setup

Together these steps often cut AI running costs by more than half.

An everyday example

When you ask an AI assistant to summarize a report, the seconds you wait while the answer appears are inference running on chips in a data center.

How companies use it

Companies pay for inference when they use AI through an API. Choosing the right model size, keeping prompts short and caching common answers keeps inference cost and delay down.

Frequently asked questions

Why does inference cost money?

Each answer needs computing on expensive AI chips. Providers charge per token read and written.

Is inference cheaper than training?

One answer costs very little, but millions of answers add up. For popular models, total inference cost can exceed training cost.

Can inference run on my own computer?

Smaller open models can run on a good laptop or local server. The largest models need data center hardware.

In depth: Inference

The full picture, about 4 minutes of reading

Training once, answering many times

Every AI model has two lives. In the first, it is trained: it studies a huge amount of data over weeks or months on thousands of specialized chips, slowly adjusting its internal numbers until it gives good answers. That happens once for each version of a model, and it is done by the company that makes it.

In the second life, the model is used. Someone asks a question, uploads a document or requests an image, and the trained model produces a result. Each of these uses is called inference. It happens every time anyone uses the model, millions of times a day for popular services.

A simple picture is a student. Training is the years of study. Inference is answering a question on the exam. The studying is done once. The answering never stops, which is why inference is what drives the everyday speed and running cost of AI.

What happens during inference

When you send a prompt to a language model, your text is first split into tokens, small pieces of words. The model reads all of those tokens in one go, which is fairly fast. Then it starts writing the answer, one token at a time. For each new token, it does a full pass through its billions of internal numbers, picks the next piece and adds it to the text. Then it does it again.

This is why answers appear word by word, and why long answers take longer than short ones. It also explains why reading a long document costs less time than writing a long reply: reading happens in parallel, writing happens step by step.

All of this runs on chips built for this kind of math, mostly in large cloud data centers. When you wait a few seconds for an assistant to reply, you are waiting for inference on one of those machines, shared with many other users.

What you pay for

When companies use AI through an API, a standard way for one program to call another, they pay for inference, usually per token. Tokens you send in, called input tokens, cost less. Tokens the model writes, called output tokens, cost more, often several times more, because they take more work to produce.

A few things push the bill up. Long documents mean many input tokens. Long conversations mean the whole chat history is sent again with each new message. Large, highly capable models cost more per token than small ones. Reasoning models, which think through a problem in hidden steps before answering, produce many extra tokens that are paid for even if you never see them. Images, audio and video also translate into many tokens.

Each single answer usually costs very little. The total depends on volume, and a task that runs thousands of times a day adds up quickly.

Speed and quality trade-offs

Inference involves a constant balance between three things: how good the answer is, how fast it comes and what it costs.

Larger models generally reason and write better but answer more slowly and cost more. Smaller models are fast and cheap, and for many tasks, such as sorting emails, pulling fields out of a form or writing a short reply, they are fully good enough. Reasoning modes improve answers to hard problems but add waiting time and tokens.

The right choice depends on the task, not on which model is "best". A customer chat on a website needs quick answers. A monthly analysis of contracts can wait a minute for a better result. Many systems use more than one model: a small one for the frequent, simple requests and a larger one for the few hard cases. Testing the same set of real tasks on two or three models is the surest way to find the balance.

Making inference efficient

A handful of practices keep inference fast and affordable.

Use the smallest model that does the job well, and check that with real examples rather than assumptions. Keep prompts lean: send the passages that matter, not whole folders. Start new conversations when the topic changes, so old history is not resent with every message.

Many providers offer prompt caching. If many requests start with the same long text, such as a fixed set of instructions or a product catalog, the provider can store it and charge less for that part. Put the fixed part first and the changing part last to benefit.

Work that is not urgent, such as tagging last month's support tickets, can often be sent as a batch at a lower price and returned later. And answers to the most frequent questions can be saved and reused instead of being generated again each time.

What it means for a small business

For a small business using AI through ready-made apps on a monthly plan, inference is mostly invisible: it is bundled into the price. It becomes a real line item when you build something yourself, such as a website chatbot or an automated email flow, and pay per token through an API.

In that case, three habits pay off. Estimate volume up front: how many requests per day, roughly how long each. Test a small and a large model on real examples and pick the cheapest one that is good enough. Set a spending limit and an alert with the provider, so an error or an unexpected spike in traffic cannot quietly run up a large bill.

Curious what this could mean for your company? Book a call.

Book a call