Model Serving
What is Model Serving?
Model serving is the process and infrastructure for making a trained AI model available to applications, receiving requests, running inference and returning results reliably, quickly and at scale.
Updated November 2026 · 2 min read
Model serving is the engineering that makes a trained model usable by applications. A model file on its own does nothing. Serving loads it onto hardware, accepts requests, runs inference, returns results and does all of this reliably for many users at once, with acceptable speed and cost. For organizations that use AI through APIs, the provider handles serving. For those running their own models, serving is where most of the engineering effort and cost efficiency is won or lost.
How does model serving work?
- Loads models onto GPUs or other hardware, sometimes splitting large models across several GPUs.
- Receives and queues requests through an API.
- Batches requests so the hardware processes many at once.
- Manages memory, especially the KV cache for language models.
- Streams responses as tokens are generated.
- Scales capacity up and down with demand.
- Monitors latency, throughput, errors and cost.
- Handles versions, rolling out new models and rolling back if needed.
Model serving techniques
- Continuous batching: adding new requests to a running batch as others finish, rather than waiting for a whole batch to complete. It greatly increases throughput for language models.
- Paged attention: managing KV cache memory in small blocks to avoid waste, introduced in 2023 by the researchers behind the open-source vLLM project.
- Quantization: running models at lower numerical precision to save memory and speed up inference. See quantization.
- Speculative decoding: using a small model to draft several tokens that the large model then checks in one pass, speeding up generation.
- Prefix caching: reusing processed prompt content shared across requests.
Widely used open-source serving engines include vLLM, SGLang and NVIDIA's TensorRT-LLM, and cloud platforms offer managed serving.
How to measure serving performance
- Time to first token and output tokens per second. See tokens per second.
- Throughput per GPU.
- GPU utilization.
- Latency at different percentiles.
- Cost per million tokens served.
An example
Consider a hypothetical software company that self-hosts an open-weight model for an internal coding assistant. Its first version uses a simple serving script that handles one request at a time. With 400 developers, responses queue during busy periods and take up to 30 seconds. The team switches to a serving engine with continuous batching and paged attention, and runs the model at 8-bit precision. The same two GPUs now serve peak demand with responses starting in under a second, and the team cancels plans to rent four more GPUs.
Common pitfalls
- Building serving from scratch instead of using mature engines.
- Testing with one user, then failing under real load.
- Ignoring memory limits, which cap how many requests can run at once.
Serving is the operational core of self-hosted LLMs and a major lever in inference optimization.
Frequently asked questions
What does model serving software do?
Model serving software loads models onto GPUs, sometimes splitting them across several, then receives, queues and batches requests, manages memory such as the KV cache and streams responses. It also scales capacity with demand, monitors latency, throughput, errors and cost, and handles rolling out new model versions and rolling back.
What is continuous batching in model serving?
Continuous batching adds new requests to a running batch as others finish, instead of waiting for a whole batch to complete before starting the next. It keeps the GPU busy and greatly increases throughput for language models, which lets the same hardware serve far more users without long queues.
How do you measure model serving performance?
Track time to first token and output tokens per second for responsiveness, throughput per GPU and GPU utilization for efficiency, and latency at different percentiles to see how slow requests get under load. Cost per million tokens served ties model serving performance to spending. Test under realistic concurrent load, not with a single user.
Related terms
KV Cache
Memory that saves a model from recomputing tokens it has already processed.
Quantization
Storing model weights at lower precision to cut memory and cost.
Tokens per Second
How fast a model generates output, for one user or across a whole system.
GPU Utilization
How much of a GPU's capacity is doing useful work, and what that costs.