Skip to main content
AI on Kubernetes · GPU/NPULesson 12 of 20

Choosing an LLM Serving Engine

Many engines can serve the same open model, and most of them look alike from the outside. See what they share, where they really differ, and how to run a comparison that answers the question for your own model, hardware and traffic.

Engine?
Shared—
Differs—
Measured—
ClientOpenAI SDK · curlOpenAI-style API/v1/chat/completionsYour SLOTTFT · TPOT targetsvLLMPagedAttentionSGLangRadixAttentionTensorRT-LLMTriton · DynamoHugging Face TGImaintenance modellama.cpp · Ollamaone machineSchedulercontinuous batchingPaged KV cachefixed-size blocksPrefix cachereuse shared promptsAcceleratorsNVIDIA · AMD · TPU · NPUBenchmarkTTFT · TPOT · tok/sOn KubernetesDeployment · KServe · llm-dprompt
RequestWatchAppears in a later step

What you will learn

  • What almost every modern engine shares
  • Where vLLM, SGLang and the NVIDIA stack differ
  • The current status of Hugging Face TGI
  • Why most published comparisons do not apply to you
  • A fair benchmark: TTFT, TPOT and throughput at your SLO
  • Running any engine on Kubernetes

Engines at a glance​

Status checked against each project's own README and docs. Features move fast, so check again before you decide.

EngineGood fitHardwareNotes
vLLMGeneral-purpose serving, widest model coverageNVIDIA, AMD, Intel GPUs, CPUs; TPU, Gaudi, Ascend and more via pluginsvllm serve, structured output, multi-node, large community
SGLangPrefix-heavy workloads such as agents and multi-turn chatNVIDIA, AMD, TPU, NPU, CPU, Apple SiliconRadixAttention prefix cache, structured output, multi-node
TensorRT-LLMPeak performance on NVIDIA GPUsNVIDIA onlytrtllm-serve or Triton TensorRT-LLM backend
NVIDIA DynamoMulti-node, disaggregated serving at data-center scaleDepends on the engine belowOrchestrates SGLang, TensorRT-LLM or vLLM; not an engine itself
Hugging Face TGIExisting deployments only—Maintenance mode: minor fixes only, project recommends vLLM or SGLang
llama.cppLocal and edge, CPU or small GPUs, GGUF modelsCPU, Apple, NVIDIA, AMD, Vulkan and morellama-server with an OpenAI-compatible endpoint
OllamaEasy local use for developersDesktop and server GPUs, CPUPull-and-run models, own API plus OpenAI-compatible routes

Try it yourself​

# Serve a model with vLLM (any engine with an OpenAI-compatible API works the same way below)
vllm serve Qwen/Qwen2.5-7B-Instruct --port 8000

curl -s localhost:8000/v1/models # the served model name
curl -s localhost:8000/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"model":"Qwen/Qwen2.5-7B-Instruct","messages":[{"role":"user","content":"Hi"}],"max_tokens":32}'

# Same benchmark against each engine: fixed lengths, fixed concurrency, goodput at your SLO (ms)
vllm bench serve --backend openai-chat --base-url http://localhost:8000 \
--endpoint /v1/chat/completions --model Qwen/Qwen2.5-7B-Instruct \
--dataset-name random --random-input-len 2000 --random-output-len 200 \
--num-prompts 500 --max-concurrency 32 \
--percentile-metrics ttft,tpot --goodput ttft:1000 tpot:50

kubectl get pods -l app=llm -o wide # engine Pods and their nodes
kubectl get inferenceservice -A 2>/dev/null # if KServe is installed

Check yourself

  1. A blog shows engine A with twice the throughput of engine B. A ran FP8 on newer GPUs with 100-token prompts, B ran BF16 on older GPUs. What can you conclude for your service?
  2. Why measure throughput at your TTFT and TPOT limits instead of peak throughput?
  3. You start a new LLM service today. Why is Hugging Face TGI a poor first choice?

Further reading: vLLM docs · SGLang docs · TensorRT-LLM · NVIDIA Dynamo · TGI repository · llama.cpp · KServe · llm-d · Batching Requests (Continuous Batching) · From API Request to Response