LLM Serving

LLM inference is unique — KV cache, continuous batching, GPU memory bound. Covers vLLM (PagedAttention), HuggingFace TGI, NVIDIA TensorRT-LLM, SGLang (RadixAttention), llama.cpp, quantization (FP16/FP8/INT8/GPTQ/AWQ/GGUF), throughput-vs-latency, multi-tenant LLM hosting via LiteLLM.

Overview

Why LLM inference is its own discipline

Autoregressive generation, where a model produces its answer one token at a time and feeds each token back in, creates constraints no other model has: KV cache memory pressure, two-phase computation and variable sequence lengths. Naive serving approaches fail badly at scale because of them.

A production serving stack is built around those constraints. Requests pass through a proxy such as LiteLLM, a scheduler that runs continuous batching, and an inference engine such as vLLM, TensorRT-LLM or SGLang. The engine keeps its KV cache in GPU memory, loads weights that are often quantized to FP8 or AWQ, and streams tokens back as it generates them.

> [!IMPORTANT] GPU memory, not compute, is the throughput ceiling for LLM serving.

Interview questions

  • Explain PagedAttention and why it was a breakthrough for LLM serving throughput.
  • Compare vLLM, TensorRT-LLM, and SGLang. What workload does each optimize for?
  • Explain the throughput-latency tradeoff in LLM serving and what techniques improve both simultaneously.
  • How would you design a self-hosted LLM serving infrastructure for a B2B SaaS product serving 1000 concurrent users?
  • What quantization formats exist for LLMs in 2026 and when would you use each?

Sign up free to read the full topic

More MLOps & LLMOps topics

Start free on Cariara · Coding problems · System design studio