Skip to content
Inference Academy

vLLM vs TensorRT-LLM: which inference engine should you serve with?

A practical comparison of vLLM and NVIDIA's TensorRT-LLM for serving LLMs: hardware support, how each one is built and deployed, quantisation and Blackwell FP4, operations, and a fair way to benchmark the two on your own workload before you commit.

Key takeaways

  • vLLM runs on NVIDIA, AMD, Google TPU and other hardware; TensorRT-LLM runs only on NVIDIA GPUs.
  • TensorRT-LLM is NVIDIA's own engine and usually gets support for new NVIDIA hardware and formats (such as NVFP4 on Blackwell) first.
  • Both now offer an OpenAI-compatible server, continuous batching, paged KV cache, FP8, speculative decoding and tensor parallelism.
  • Neither is fastest everywhere: the gap depends on model, GPU, precision, batch size and latency target, so benchmark your own workload.
  • Pick vLLM for breadth, fast model support and portability; pick TensorRT-LLM when you are all-in on NVIDIA and need its last few percent.

By

8 min read

Share
On this page

If you're serving open models on NVIDIA GPUs, you'll end up choosing between two engines more often than any others: vLLM, the open-source project that made paged KV cache and continuous batching standard, and TensorRT-LLM, NVIDIA's own engine. Both are serious, both are fast, and the right choice depends far more on your situation than on any single benchmark chart.

Here's how they differ and how to decide.

#The short version

vLLM TensorRT-LLM
Who builds it Open-source community (started at UC Berkeley) NVIDIA, open source
Hardware NVIDIA, AMD ROCm, Google TPU, Intel and others NVIDIA only
New models Usually supported within days of release Popular models supported quickly; long tail slower
New NVIDIA features Follows, often quickly Usually first (it's NVIDIA's own stack)
Serving vllm serve, OpenAI-compatible trtllm-serve, OpenAI-compatible; also behind Triton or Dynamo
Customising Python, easy to read and patch Python front end over C++ and CUDA kernels; harder to patch

#How each one works

vLLM is a Python engine built around PagedAttention (PagedAttention explained) and a step-by-step scheduler (continuous batching explained). Its kernels come from several places: its own CUDA and Triton kernels, FlashAttention and FlashInfer, and vendor libraries. It captures CUDA graphs to cut launch overhead and uses torch.compile for some fusion. You point it at a Hugging Face model and it serves.

TensorRT-LLM grew out of NVIDIA's TensorRT compiler. Early versions required you to build an engine first: compile the model for one GPU type, precision and maximum batch shape, then serve the compiled artefact. Newer versions (1.0 and later) default to a PyTorch-based path that loads models more like vLLM does, while keeping NVIDIA's hand-tuned kernels for attention, GEMMs, MoE and communication. If you read an older tutorial that starts with a long build step, check the current docs first; the workflow has changed.

Both engines now share most of the same ideas: in-flight batching, paged KV cache, chunked prefill, prefix caching, speculative decoding, tensor and pipeline parallelism, and expert parallelism for MoE models. The differences are in hardware reach, kernel maturity on specific GPUs, and how easy each is to operate and modify.

#Where TensorRT-LLM tends to win

  • Newest NVIDIA hardware and formats. When NVIDIA ships a new GPU generation or number format, such as NVFP4 on Blackwell (FP8 vs INT4 vs FP4), TensorRT-LLM's kernels are typically tuned for it first.
  • Squeezing the last few percent on a fixed model and GPU, especially at high batch where well-tuned GEMM and MoE kernels dominate.
  • The NVIDIA stack. It slots into Triton Inference Server, Dynamo and NVIDIA's NIM containers, and NVIDIA publishes reference configurations for it.

#Where vLLM tends to win

  • Hardware portability. The same serving code runs on H100s, AMD MI300X (MI300X vs H100) and TPUs. That matters when GPU supply or prices change.
  • Model coverage. New architectures usually land in vLLM within days, often on launch day with help from the model's authors.
  • Iteration speed and debuggability. It's mostly Python. When something breaks, you can read the code path, add logging and patch it.
  • Ecosystem. llm-d, many Kubernetes operators and most serverless GPU platforms build on vLLM (Dynamo vs llm-d).

SGLang is the third serious option and often leads on structured output and prefix-heavy workloads; see vLLM vs SGLang.

#Performance: be suspicious of anyone's chart

Published comparisons disagree, and for good reasons. The ranking can flip with:

  • Precision. FP8 on one engine against BF16 on the other isn't a comparison.
  • Batch size and latency target. One engine can win throughput at batch 256 while the other wins time per output token at batch 8.
  • Prompt and output lengths. Prefill-heavy and decode-heavy traffic stress different kernels (prefill vs decode).
  • Version. Both projects release every few weeks. A six-month-old benchmark is history.
  • Tuning effort. Vendor benchmarks are usually tuned carefully for their own engine and run with defaults on the other.

The honest rule is: benchmark both on your model, your GPU and your traffic, at your latency target.

#A fair head-to-head in one afternoon

  1. Same model, same precision, same GPU, same tensor-parallel size. If you quantise, use the same format on both and check quality on a task you care about.
  2. Same limits: maximum context length, maximum concurrent sequences, KV cache memory fraction.
  3. Realistic traffic: your prompt and output length distribution, and prefix sharing if you have it.
  4. Open-loop load at several arrival rates, not a fixed number of users in a loop (how to benchmark an LLM server).
  5. Compare goodput: requests per second that meet your P95 time to first token and time per output token targets (serving metrics), not peak tokens per second.
  6. Record versions of both engines, the driver and CUDA, and repeat each run at least three times.

If the gap at your target is under about 10%, choose on operations: which one your team can debug at 3 a.m., and which one keeps you free to change hardware.

#Getting started with each

Both can serve a Hugging Face model with one command (check the current docs for flags):

bash
# vLLM
vllm serve meta-llama/Llama-3.1-8B-Instruct --max-model-len 8192

# TensorRT-LLM
trtllm-serve meta-llama/Llama-3.1-8B-Instruct --max_seq_len 8192

Both expose an OpenAI-compatible endpoint, so the same client code and the same load generator work against either. Both ship official container images (vLLM on Docker Hub, TensorRT-LLM on NVIDIA's NGC registry), which is the easiest way to get matching CUDA, driver and library versions.

For larger deployments, vLLM is usually run directly or under a Kubernetes stack such as llm-d or KServe; TensorRT-LLM is often run behind Triton Inference Server or NVIDIA Dynamo, which add routing, multi-model management and disaggregated serving.

#Features compared in more detail

Both projects move fast, so treat this as a snapshot and check the release notes before deciding:

Feature vLLM TensorRT-LLM
FP8 weights and activations Yes Yes
INT4 weight-only (AWQ, GPTQ) Yes Yes (AWQ and others via NVIDIA's Model Optimizer)
NVFP4 on Blackwell Yes Yes, usually first
FP8 KV cache Yes Yes
Speculative decoding (draft model, EAGLE, MTP, n-gram) Yes Yes
Multi-LoRA serving Yes Yes
Structured output (JSON schema, grammars) Yes Yes
Prefix caching Automatic Yes (KV cache reuse)
Disaggregated prefill and decode Yes Yes, often via Dynamo
Vision and multimodal models Broad Popular models
Non-NVIDIA hardware Yes No
Licence Apache 2.0 Apache 2.0

On paper they're close. The differences show up in which models and formats are best tuned on which GPU at the time you test, and in how each behaves operationally.

#Operations: what day-to-day running feels like

  • Start-up time. Both take time to load weights and capture CUDA graphs; an older TensorRT-LLM workflow with a separate engine build adds minutes to hours per model, GPU type and configuration. Check whether your chosen path still needs a build step.
  • Upgrades. Both release every few weeks. Pin versions in your images, and re-run your benchmark and quality checks before rolling out a new one.
  • Observability. vLLM exposes Prometheus metrics directly on its /metrics endpoint. TensorRT-LLM exposes metrics through its server and through Triton or Dynamo. Either way, wire TTFT, inter-token latency, queue depth and KV usage into your dashboards (serving metrics).
  • Debugging. When a model misbehaves in vLLM, the path from request to kernel is mostly readable Python. In TensorRT-LLM, more of it is in C++ and CUDA, which is faster but harder to step through.
  • Support. Both have active GitHub communities. NVIDIA offers commercial support for TensorRT-LLM through its enterprise software; several companies offer commercial support around vLLM.

#How to decide

Your situation Lean towards
Mixed or changing hardware (NVIDIA plus AMD or TPU) vLLM
Brand-new or unusual model architectures vLLM
Small team that needs to read and patch the engine vLLM
All-NVIDIA fleet, few models, every percent of cost matters TensorRT-LLM (after measuring)
Blackwell with FP4 from day one TensorRT-LLM first, re-check vLLM regularly
Already standardising on Triton or Dynamo Either; both plug in as backends

Many teams run both: vLLM for the long tail of models and experiments, TensorRT-LLM for the one or two high-volume models where a tuned engine pays for itself.

#Is the gap worth it? A cost sanity check

Suppose your benchmark shows one engine serving 10% more goodput than the other at your latency target. Whether that matters depends on scale:

Fleet GPU cost per hour (at an illustrative $2.50 per GPU-hour) Value of a 10% saving per year
8 GPUs $20 about $17,500
64 GPUs $160 about $140,000
512 GPUs $1,280 about $1.1 million

At 8 GPUs, the saving rarely pays for the engineering time of running a second engine. At 512, it pays for a team. Put your own GPU price and measured gap into the same sum, and weigh it against the cost of switching, operating and debugging (cost per million tokens).

#Common mistakes

  • Comparing at different precisions or with different memory and batch limits.
  • Using a vendor chart as your benchmark. Run your own.
  • Ignoring time to first token. One engine can win on throughput while the other wins on prefill latency.
  • Forgetting quality. Different FP8 or FP4 recipes can change outputs; check your task accuracy on both.
  • Choosing on peak throughput instead of goodput at your latency target.

#FAQ

Is TensorRT-LLM faster than vLLM? Sometimes, especially on the newest NVIDIA GPUs and formats; sometimes not. The gap changes with every release, so measure your own workload.

Do I still need to build an engine for TensorRT-LLM? Newer versions default to a path that loads models directly, without a separate build step. Older guides that start with a build are describing an earlier workflow.

Can I run vLLM and TensorRT-LLM behind the same API? Yes. Both speak the OpenAI-compatible API, so a gateway or router can send different models to different engines without clients noticing.

What about SGLang? It's the third serious option, with particular strengths in prefix-heavy and structured-output workloads; see vLLM vs SGLang.

#Go deeper

Engines compared from the inside walks through how vLLM, SGLang and TensorRT-LLM are put together, and the software stack from CUDA to engines explains where kernels, compilers and schedulers fit. Both are part of the Inference Engineering course.

vllmtensorrt-llmenginesservinginference-engineering

Found this useful?

Send it to someone who is learning the same thing.

Share this article

Next: learn it step by step, free

Capacity planning and cost

Turn traffic and latency targets into a GPU count and a monthly bill. A free lesson with step-through diagrams and a quiz.

Get new articles by email

One short email when a new guide is out. Unsubscribe any time.