Model Serving
Model serving is the runtime infrastructure that hosts a trained model and exposes it as an API for low-latency online inference at scale, handling batching, autoscaling, GPU sharing, versioning, and routing.
AIDOLS Research Team · Editorial standards
Full definition
Common serving stacks include NVIDIA Triton, KServe, vLLM (for LLMs), and managed services like SageMaker Endpoints and Vertex AI Online Prediction. Serving is where dynamic batching, paged attention (KV cache), tensor parallelism, and quantized weights translate directly into dollars: a 2x serving efficiency gain on a billion-call workload is a six-to-seven-figure annualized line item.
Why it matters
For most enterprises, lifetime inference cost dwarfs training cost. Serving choice — framework, batching policy, hardware, quantization — is one of the largest levers on GenAI unit economics: the vLLM paper reports 2–4× the throughput of FasterTransformer and Orca at the same latency. Treat serving as a platform discipline, not a config flag.
Example
A SaaS swaps a vanilla HuggingFace endpoint for vLLM with continuous batching and 8-bit quantization, cutting per-token GPU cost 4.6x at unchanged quality.
Next steps
Related terms
- Inference ServerAn inference server is the runtime system that hosts trained AI models behind an API, handling request routing, dynamic batching, KV-cache management, scheduling across GPUs, and hardware acceleration — the layer that turns a model file into a production AI endpoint.
- Inference CostInference cost is the dollar cost of running a trained AI model in production — per request, per user, or per business outcome — and the operating expense that determines whether an AI feature has positive unit economics at scale.
- KV CacheThe KV (Key-Value) cache stores the attention keys and values from already-processed tokens so an LLM can generate each new token without recomputing past work — the single largest consumer of GPU memory during LLM inference, and the primary lever for serving throughput.
- QuantizationQuantization is the technique of representing a neural network's weights and activations with fewer bits — 8-bit, 4-bit, or even lower — to dramatically reduce memory footprint, inference cost, and latency, usually with only 0–2% quality loss.
More infrastructure terms
- Speculative DecodingSpeculative decoding is an inference technique where a small "draft" model proposes multiple candidate tokens that the large "target" model verifies in a single forward pass, accepting prefixes that match the target distribution.
- Continuous BatchingContinuous batching is an inference scheduling technique that adds and removes requests from a GPU batch every decoding step, instead of waiting for all requests in a static batch to finish.
- Paged AttentionPaged attention is a KV-cache memory-management technique that stores attention keys and values in fixed-size blocks, addressed via a page table — analogous to virtual memory in operating systems.
Source & further reading
Primary source: Kwon et al. — "Efficient Memory Management for LLM Serving with PagedAttention" (SOSP) (2023).
Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/en/glossary/model-serving/.