Inference is the execution of a trained model on new data, producing predictions, classifications, recommendations or generated content; its speed and cost depend on workload, hardware and deployment design choices.
A classification model assigns an input to one or more predefined categories. An email security product can classify a message as spam or legitimate. A manufacturing inspection system can classify an image as acceptable or defective.
Language model inference is often divided into two main phases: prefill and decode. The distinction is important because each phase places different demands on computing hardware.
A central processing unit, or CPU, handles general application instructions and many supporting tasks around inference. It can prepare data, manage requests, run business logic and execute smaller models.
Batching groups several inference requests so that the model processes them together. This can improve hardware utilization because parallel processors can perform work for multiple inputs in one execution.
The following table summarizes the purpose of common techniques and the trade offs engineers need to evaluate. It is important to distinguish improvements in raw generation speed from improvements in total system capacity.
Concurrency describes how many requests or tasks a service handles at the same time. A model that performs well with one request may behave differently when dozens or hundreds of requests arrive together.
A self hosted inference service runs on hardware controlled by the organization or its infrastructure provider.
The first misconception is that inference means a model is learning continuously. In ordinary deployment, inference applies existing parameters to new input.
How AI inference works, from model execution to real world services