Servingcore
Serving engines (vLLM and friends)
Software that turns a model into a high-throughput API: batching, KV-cache management, kernels.
What it is and why it exists
vLLM popularised PagedAttention and continuous batching and exposes an OpenAI-compatible server. SGLang adds RadixAttention prefix reuse and fast structured generation; TensorRT-LLM compiles optimised kernels for NVIDIA GPUs; llama.cpp and Ollama run quantised models on CPUs and laptops.
Quick prototype
vllm serve <model> on one GPU.
In production, at scale
Engine chosen by benchmark on your prompts, tensor parallelism for big models, quantised weights, prefix caching on, autoscaling on queue depth, and an OpenAI-compatible endpoint behind your gateway.
Vendors and tools
| vLLM | PagedAttention, continuous batching, OpenAI-compatible server |
|---|---|
| SGLang | RadixAttention, structured outputs |
| TensorRT-LLM / NVIDIA NIM | Optimised NVIDIA serving |
| llama.cpp / Ollama | Local and CPU inference |
On AWS: vLLM on EKS/ECS GPU nodes or SageMaker large model inference containers; Inferentia/Trainium with the Neuron SDK.
How it fails
- Benchmarking with short prompts while production prompts are 8k tokens
What the interviewer asks next
Why is vLLM faster than naive Hugging Face generate()?
Continuous batching keeps the GPU full as requests come and go, and PagedAttention stores the KV cache without fragmentation so many more sequences fit.