Inference
Running a trained model on new input
What is Inference?
Inference runs a trained model to produce predictions or generated output from new input. Text generation commonly processes a prompt and generates subsequent tokens iteratively. The request can include retrieval or tools managed by the surrounding application.
How it works
- First token
- 0.4 s
- Complete
- 2.4 s
The draft is ready to review.
- First token
- 1.0 s
- Complete
- 1.7 s
The draft is ready to review.
In this example, A starts sooner and B finishes first.
Key takeaways
-
Training changes parameters; inference uses the trained model.
-
Compare first-token delay, total latency, and throughput.
Illustrative example
A hypothetical request spends time waiting, processing input, generating the first token, and completing the answer. An interface can show the first text quickly even when the full response takes much longer.
Measure latency and throughput
Time to first token describes the delay before output starts. Generation speed describes output rate; total latency includes waiting and other steps. Throughput describes work completed across requests over time. Batching may improve system throughput while increasing waiting for an individual request. Compare these measurements separately from training costs and per-task billing.
Sources and documentation
Continue in the portal
Related terms
LLM (Large Language Model)
A trained model that processes and generates language
Fine-Tuning
Further training a model for a defined behavior or task
Tokens
Model-specific units used to represent text and other inputs
Open Weights
A model’s learned parameters, available to download
Inference Cost
The cost of running requests and completing AI tasks