Model serving
Model serving is running a trained model as a live service that accepts requests over a network and returns predictions or generated output, along with the software needed to do this reliably at scale.
Training produces a file of weights. Serving turns that file into something applications can call. A serving system loads the model onto hardware, exposes an endpoint, accepts requests, groups them into batches, runs the model and returns the results, while reporting its own health and performance. NVIDIA's open-source Triton Inference Server is a typical example: it serves models built with PyTorch, ONNX, TensorRT and other frameworks on GPUs and CPUs, accepts requests over HTTP and gRPC, batches them dynamically, runs several models at once and reports GPU use, throughput and latency.
Large language models made serving much harder. Each request keeps a growing KV cache in GPU memory, replies are generated one token at a time, and requests vary enormously in length. vLLM, which began at UC Berkeley's Sky Computing Lab, reported 2 to 4 times the throughput of earlier systems at similar latency in 2023 by managing that memory in pages. Modern LLM serving engines combine continuous batching, which adds and removes requests from a running batch as they finish, with prefix caching, quantisation, speculative decoding and the ability to split a model across several GPUs. vLLM, for one, exposes an OpenAI-compatible API.
Serving also comes in different shapes. Amazon SageMaker's options illustrate the range: real-time endpoints for interactive, low-latency work; serverless endpoints that scale with traffic but can suffer cold starts; asynchronous endpoints for large payloads of up to 1 GB and processing times of up to an hour; and batch jobs for whole datasets.
A concrete case: a company running an open-weight model for internal document search deploys it with a serving engine on two GPUs behind a private endpoint. Its applications call that endpoint with the same code they would use for a hosted API. The operations team watches latency, queue length and GPU memory, and adds replicas when traffic grows.
Serving is where the running cost of AI lands. Choosing between a hosted API and serving a model yourself trades control over data, versions and cost per request against the work of operating GPUs and the software stack around them.
Deployment is the act of releasing a model into an environment where it can be used. Serving is the ongoing job of running it there: receiving requests, executing the model, returning results, scaling with demand and reporting performance. An inference server is software that hosts one or more trained models and answers prediction requests over a network, usually through HTTP or gRPC. Examples include NVIDIA's Triton Inference Server and LLM-focused engines such as vLLM. Continuous batching lets a server add new requests to a running batch and remove finished ones at each step, rather than waiting for every request in a batch to finish. For language models, whose replies vary widely in length, this keeps GPUs busy and raises throughput. A hosted API is simpler and suits most uses. Serving an open-weight model yourself gives control over where data goes, which version runs and the cost at high volume, but it requires GPUs and staff who can run and tune the serving stack.Common questions
What is the difference between model serving and model deployment?
What is an inference server?
What is continuous batching?
Should a business serve its own model or use an API?
Search for "LLM serving", "inference server" or "continuous batching" to see how models are run in production. Reliable sources include the documentation of open-source serving projects, cloud providers' deployment guides and the research papers behind serving techniques on arXiv. Throughput comparisons between serving engines change quickly with new releases, so check the date and the hardware behind any benchmark.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.