Inference is the process of running a trained AI model on new input to produce an output, such as generating a response to a prompt, as opposed to training the model in the first place.
What is inference in AI?
Inference is what happens every time you send a prompt to an AI model and get a response back. The model has already been trained; inference is simply using that finished model's learned weights to process new input and produce a prediction or generated output, without changing the model itself.
Inference vs training
Training is the expensive, one-time (or periodic) process of teaching a model by adjusting its weights across a massive dataset, often taking weeks and enormous computing resources. Inference is what happens afterward, every single time the model is used, and while each individual inference request is far cheaper than training, the cumulative cost of serving millions of requests is a major factor in running an AI product.
What affects inference speed and cost
Larger models generally require more computation per token generated, making inference slower and more expensive. Techniques like quantization, which reduces the precision of a model's numbers, and specialized inference hardware are widely used to make serving models faster and cheaper without retraining them.
Why inference matters
Most of the real-world cost and latency users experience with AI products comes from inference, not training. As models are deployed to more users, optimizing inference — through better hardware, smaller distilled models, or techniques like caching — becomes as important to a product's viability as the quality of the model itself.