Back to the index
25/ 55

HOW MODELS WORK

Inference.

Running a trained model on an input to produce a prediction or other output.

In plain words

Inference is the process of using a model’s learned parameters to compute an output from an input. It is the stage at which a trained model is put to work.

A closer look

For a classifier, inference might return a probability that an image contains a bicycle. For an autoregressive language model, it involves processing the prompt and repeatedly predicting another token. This can include many computation steps, caching, sampling, and internal reasoning before an answer is complete.

Inference usually leaves the model’s learned weights unchanged. It still requires computational resources: model size, context length, generated output, hardware, and serving techniques affect latency and cost. An application may combine several inference calls with searches or tool actions to complete one user request.

In practice

AN EXAMPLE

A model is trained on labeled photographs. Later, you upload a new image and it predicts “bicycle.” Training produced the learned parameters; inference used them on your image.

A useful distinction

Inference is not necessarily logical deduction, despite the everyday meaning of the word. In machine learning it means running the model. A long, reasoning-heavy answer can still be inference without being additional training.

Watch & learn

Sources & further reading

Google — Machine learning reference: inference (opens in a new tab)