vLLM, SGLang, TensorRT-LLM, TGI, llama.cpp/Ollama - how do you choose a serving stack?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Decide on workload shape, hardware, and how much engineering you'll invest - not GitHub stars:
- vLLM: the default open-source choice. PagedAttention, continuous batching, chunked prefill, prefix caching, speculative decoding, quantization support, tensor/pipeline parallelism, OpenAI-compatible server, broad model coverage (including day-one support for most open releases) and multi-hardware backends. Pick it unless you have a specific reason not to.
- SGLang: strongest when requests share prefixes heavily - agentic workloads, multi-turn chat, few-shot batteries - thanks to RadixAttention (tree-structured automatic prefix cache reuse) and a scheduler that exploits it; also known for very fast constrained/structured generation. Often benchmark-competitive or ahead of vLLM on these patterns.
- TensorRT-LLM: NVIDIA's maximum-performance path. It is moving to its PyTorch backend only: the TensorRT engine path is gone from the 1.3/1.4 release line and the current docs, so Hugging Face checkpoints load directly (
LLM(model=...)ortrtllm-serve <model>) with no engine build or checkpoint conversion. Its edge now comes from NVIDIA-tuned kernels (FP8/NVFP4, MLA, MoE) and serving features rather than ahead-of-time compiled engines. Best raw numbers on NVIDIA hardware, but you pay in tuning effort, NVIDIA lock-in, and how quickly new models are supported. Choose when serving cost at scale justifies dedicated inference engineers (often behind Triton or NVIDIA's Dynamo orchestration). - TGI (Text Generation Inference): Hugging Face's former production server. Hugging Face moved it into maintenance mode in late 2025, and the GitHub repository was archived (read-only) on 21 March 2026. Its README recommends vLLM and SGLang, or llama.cpp and MLX for local use, so new model architectures will not land there. Treat it as a migration item, not a choice for a new deployment.
- llama.cpp / Ollama / MLX: the edge/local tier. CPU, Apple Silicon (Metal / MLX), consumer GPUs; GGUF quantized models; trivially easy to run. Right for on-device products, privacy-constrained local inference, and dev laptops - not for high-QPS datacenter serving.
Full worked answer
Decide on workload shape, hardware, and how much engineering you'll invest - not GitHub stars:
- vLLM: the default open-source choice. PagedAttention, continuous batching, chunked prefill, prefix caching, speculative decoding, quantization support, tensor/pipeline parallelism, OpenAI-compatible server, broad model coverage (including day-one support for most open releases) and multi-hardware backends. Pick it unless you have a specific reason not to.
- SGLang: strongest when requests share prefixes heavily - agentic workloads, multi-turn chat, few-shot batteries - thanks to RadixAttention (tree-structured automatic prefix cache reuse) and a scheduler that exploits it; also known for very fast constrained/structured generation. Often benchmark-competitive or ahead of vLLM on these patterns.
- TensorRT-LLM: NVIDIA's maximum-performance path. It is moving to its PyTorch backend only: the TensorRT engine path is gone from the 1.3/1.4 release line and the current docs, so Hugging Face checkpoints load directly (
LLM(model=...)ortrtllm-serve <model>) with no engine build or checkpoint conversion. Its edge now comes from NVIDIA-tuned kernels (FP8/NVFP4, MLA, MoE) and serving features rather than ahead-of-time compiled engines. Best raw numbers on NVIDIA hardware, but you pay in tuning effort, NVIDIA lock-in, and how quickly new models are supported. Choose when serving cost at scale justifies dedicated inference engineers (often behind Triton or NVIDIA's Dynamo orchestration). - TGI (Text Generation Inference): Hugging Face's former production server. Hugging Face moved it into maintenance mode in late 2025, and the GitHub repository was archived (read-only) on 21 March 2026. Its README recommends vLLM and SGLang, or llama.cpp and MLX for local use, so new model architectures will not land there. Treat it as a migration item, not a choice for a new deployment.
- llama.cpp / Ollama / MLX: the edge/local tier. CPU, Apple Silicon (Metal / MLX), consumer GPUs; GGUF quantized models; trivially easy to run. Right for on-device products, privacy-constrained local inference, and dev laptops - not for high-QPS datacenter serving.
Decision drivers to name: hardware (NVIDIA datacenter vs AMD/TPU vs laptop), workload (prefix-heavy agentic → SGLang; general → vLLM; cost-obsessed at scale → TensorRT-LLM), features needed (structured output, multi-LoRA serving, spec decoding), team ops maturity, and community velocity for new model support. Also mention the "buy" option: managed endpoints (Bedrock, Vertex, Fireworks, Together, etc.) when you don't want to run the stack at all.
What a good answer covers
- vLLM: the default open-source choice
- SGLang: strongest when requests share prefixes heavily - agentic workloads, multi-turn chat, few-shot…
- TensorRT-LLM: NVIDIA's maximum-performance path
- TGI (Text Generation Inference): Hugging Face's former production server
- llama.cpp / Ollama / MLX: the edge/local tier
Key terms: vLLM · SGLang · TensorRT-LLM · TGI (Text Generation Inference) · llama.cpp / Ollama / MLX
In the glossary: vLLM · PagedAttention · Pipeline parallelism · SGLang · RadixAttention · GGUF
Interviewer follow-ups to expect
Your workload is 90% shared-system-prompt agent traffic - which stack and why?
What does a vendor-tuned stack like TensorRT-LLM buy over a portable engine, and what does it cost you when you want to add AMD capacity?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep