Serving Local Models with vLLM
Local model or closed model, and do more GPUs fix everything? Kanin Kearpimy (James), co-founder of vLLM Bangkok, starts from how to evaluate the question, walks through the LLM serving stack, and explains the four ideas inside vLLM that keep the GPU busy and the answers fast: continuous batching, PagedAttention, prefix caching and quantization chosen by task.
In the deck
- Local model or closed model? Not a verdict but a starting point to evaluate, read from the Artificial Analysis Intelligence Index v4.1 (intelligence against cost per task): open models ahead at the low-cost end, on par in the middle, closed models ahead at the top
- Does buying more GPUs resolve everything? Partially true: we need more than hardware
- The AI (LLM) stack: API gateway, distributed inference server (llm-d, KServe), inference engine (Ollama, vLLM, SGLang, TensorRT), storage (Qdrant, PostgreSQL, MongoDB) and hardware (NVIDIA CUDA, AMD ROCm, Cerebras)
- Three familiar situations: whether you really need three H100 GPUs, a GPU at 100% but low throughput, and the same system prompt slow on every request
- Choosing a serving engine (Ollama, SGLang, TensorRT, vLLM) and why vLLM: an active community with 90,000 GitHub stars, the major open model families (Llama, Qwen, DeepSeek, Mistral, Gemma), GPU, CPU and TPU
- Continuous batching: a static batch waits for its slowest request while the GPU idles; vLLM refills a finished slot with a waiting request at once
- PagedAttention: the KV cache in small fixed-size blocks, like virtual-memory pages in an OS, instead of one big chunk per request, so memory fragmentation stays minimal
- Prefix caching: hash each KV block and reuse the blocks a new request shares with earlier ones, so identical prompt text is not computed again
- Quantization by task: BF16, FP8 and FP4 weights; quantize generic chat, where a quick response beats a smarter answer, and keep BF16 or choose carefully for long-running agents; then one request, “Please introduce yourself”, through Qwen2.5 on vLLM
