# Inference

> Running a trained model to generate output — what happens on every model provider request. Parameters stay fixed.

Running a trained [model](https://ai9k.vercel.app/en/model) to generate output — what happens on every [model provider request](https://ai9k.vercel.app/en/model-provider-request). [Parameters](https://ai9k.vercel.app/en/parameters) stay fixed; the model just does [next-token prediction](https://ai9k.vercel.app/en/next-token-prediction) over the [context](https://ai9k.vercel.app/en/context) it's given. Cheap relative to [training](https://ai9k.vercel.app/en/training), but billed per [token](https://ai9k.vercel.app/en/token) and the dominant cost of using a model.

A model's life splits into two phases:

| Phase     | When it happens                  | What it does                                                    | Parameters    |
| --------- | -------------------------------- | --------------------------------------------------------------- | ------------- |
| Training  | Once, before release             | Produces the parameters from a training corpus                  | Being written |
| Inference | Every time anyone uses the model | Runs the frozen parameters over your context to generate tokens | Read-only     |

Nothing you do at inference time writes back to the parameters — that's the reason a correction you make today doesn't stick tomorrow. The model that makes the same mistake next [session](https://ai9k.vercel.app/en/session), after you carefully explained the fix, hasn't ignored you; it's incapable of learning from the exchange. The model is [stateless](https://ai9k.vercel.app/en/stateless) — continuity has to come from outside it — from the [context window](https://ai9k.vercel.app/en/context-window) or a [memory system](https://ai9k.vercel.app/en/memory-system).

This mechanism also explains how you're billed. Every request runs the model over the full context, so cost scales with [input tokens](https://ai9k.vercel.app/en/input-tokens) and [output tokens](https://ai9k.vercel.app/en/output-tokens), and an agent making dozens of [tool](https://ai9k.vercel.app/en/tool) calls pays for inference on each round trip. This is why context size is a cost question as well as a quality one.

**Usage**

"Why does the bill scale with usage instead of being a flat license?"

"You're paying for inference — every model provider request runs the model on the provider's hardware. Training already happened, but inference costs accrue per request, and a single [turn](https://ai9k.vercel.app/en/turn) can expand into many requests when tools are called."

---

- Section 1 — The Model · Term 5 of 72
- Page: https://ai9k.vercel.app/en/inference
- Learn step by step: https://ai9k.vercel.app/en/learn#/inference
- On the map: https://ai9k.vercel.app/en?term=inference
- JSON: https://ai9k.vercel.app/data/terms/inference.json
- Mentioned in: [Parameters](https://ai9k.vercel.app/en/parameters.md), [Effort](https://ai9k.vercel.app/en/effort.md), [Non-determinism](https://ai9k.vercel.app/en/non-determinism.md), [Model provider](https://ai9k.vercel.app/en/model-provider.md), [Stateless](https://ai9k.vercel.app/en/stateless.md)
- Previous: [Training](https://ai9k.vercel.app/en/training.md)
- Next: [Effort](https://ai9k.vercel.app/en/effort.md)

Every term page has a markdown copy: add .md to its address.
