Dec 1, live webinar: Agents in production, live: who gives the agent production access?

vLLM vs SGLang vs NVIDIA NIM: Choosing an Inference Server

A criteria-based comparison of vLLM, SGLang and NVIDIA NIM for teams self-hosting open-weight models on their own cloud, with TGI's maintenance-mode status, TensorRT-LLM, Ollama and KServe for context, and the cost-per-million-tokens math that decides the winner.

Romaric Philogene
CEO & Co-founder
Published · Updated · 18 min
vLLM vs SGLang vs NVIDIA NIM: Choosing an Inference Server

Key points:

  • Pick vLLM as the default, benchmark SGLang next to it, and buy NVIDIA NIM for support. vLLM (v0.34.0, 16 November 2026) has the broadest model and hardware coverage. SGLang (v0.5.23, 2 November 2026) is the one to test for agents, multi-turn chat and RAG with long shared prefixes. NIM is NVIDIA's supported packaging, and its model-free containers now run the vLLM and SGLang engines themselves.
  • NIM buys a support contract, not a lower GPU bill. It is free for development, but production needs an NVIDIA AI Enterprise license at $4,500 per GPU per year or about $1 per GPU per hour on cloud marketplaces, and it is NVIDIA-only.
  • Hugging Face TGI is in maintenance mode. Its GitHub repository is archived, the last release is v3.3.7 (19 December 2025), and Hugging Face now recommends vLLM or SGLang. Keep existing TGI deployments running, but do not start new ones on it.
  • Operations move the bill more than the engine. The server changes cost per token by tens of percent. Idle non-production GPUs, oversized instances and missing autoscaling change it by multiples.
  • Qovery runs whichever server you pick, in your own cloud account. Qovery, the Agentic DevOps platform, deploys your vLLM, SGLang or NIM container on GPU node pools in your own AWS, GCP, Azure or Scaleway account (or an existing cluster through the Qovery Operator), with environments that stop when idle, so GPU discounts and data stay yours. Qovery is not an inference server.

Qovery · Agentic DevOps platform
Build with Claude Code, Deploy with Qovery
Learn more

The inference server you pick changes your cost per million tokens by tens of percent. How you run it changes the bill by multiples. I have watched enough teams pour money into GPUs to know which of those two numbers shows up on the invoice, and it is usually the second one.

When I first wrote this comparison in October, I put TGI on the same line as vLLM and NIM. That no longer holds: Hugging Face put TGI in maintenance mode, and SGLang has become the serious alternative to vLLM. So this version compares the three servers people now shortlist (vLLM, SGLang and NVIDIA NIM) and keeps TGI as a minor option for teams already running it. Versions and prices were checked on 22 November 2026.

How do you choose between vLLM, SGLang and NVIDIA NIM?

Start with vLLM unless you have a reason not to. Run SGLang against it on your own traffic if your workload reuses long prefixes (agents, multi-turn chat, RAG with a shared system prompt). Choose NVIDIA NIM when your organization already pays for NVIDIA AI Enterprise or needs a vendor support SLA and signed patch commitments.

I judged every option on six criteria:

  1. Sustained throughput per GPU-hour at a fixed time-to-first-token and inter-token latency target, not peak tokens per second without an SLO.
  2. Memory efficiency and batching: continuous batching, paged or radix KV cache, prefix caching, quantization (FP8, FP4, INT4, AWQ, GPTQ).
  3. License and lock-in: Apache 2.0 versus a per-GPU commercial license.
  4. Hardware coverage: NVIDIA only, or also AMD, Intel, TPU and others.
  5. Kubernetes operability in your own account: readiness probes tuned to model load time, Prometheus metrics for HPA or KEDA, multi-GPU sharding, cold start.
  6. Project health: release cadence and whether the project is still actively developed.
ServerBest forLicenseHardwareKey featuresStatus (22 Nov 2026)Not for
vLLMThe default for most teams; broadest model supportApache 2.0NVIDIA, AMD, Intel GPUs, x86/ARM CPUs, plus plugins for TPU, Gaudi, Ascend and morePagedAttention, continuous batching, prefix caching, FP8/INT4, speculative decodingv0.34.0, very activeTeams that need a vendor support SLA
SGLangAgents, multi-turn chat and RAG with shared prefixes; large MoE servingApache 2.0NVIDIA, AMD Instinct, Google TPU, Intel, Ascend, Apple SiliconRadixAttention, fast structured output, prefill-decode disaggregationv0.5.23, very activeTeams that want one vendor to call
NVIDIA NIMEnterprises that already pay for NVIDIA AI EnterpriseCommercial (free for development)NVIDIA onlyPrebuilt per-model containers, model-free vLLM and SGLang containers, NIM OperatorSupported productCost-driven teams, non-NVIDIA hardware
Hugging Face TGIKeeping existing deployments runningApache 2.0NVIDIA, AMD, Intel, othersRust router, continuous batching, Messages APIMaintenance mode, repo archived, last release v3.3.7Any new deployment

Sources: vLLM releases, vLLM README, SGLang README, SGLang releases, NVIDIA AI Enterprise pricing, TGI documentation.

Qovery does not appear in this table on purpose. Qovery is not an inference server; it deploys whichever of these containers you pick on GPU nodes in your own cloud account. I compare the ways to run them further down.

What determines the GPU cost of a self-hosted inference server?

Cost per million tokens is your GPU instance price per hour divided by the tokens per hour you sustain at your latency target. The inference server only moves the second term, which is why I rank servers on throughput per GPU-hour at a fixed SLO.

cost per 1M tokens = (instance $/hour) / (sustained tokens/hour at your SLO) x 1,000,000

An AWS p5.48xlarge with eight H100s costs $55.04 per hour on demand in us-east-1, so $6.88 per GPU-hour (Vantage). At 2,000 sustained output tokens per second, that GPU costs about $0.96 per million tokens. At 200 tokens per second, the same GPU costs about $9.56 per million. Same instance, same hourly price, 10x the cost per token.

Every benchmark I cite below is somebody's workload on somebody's hardware. Treat vendor and project numbers as vendor-reported, and decide on your own traffic.

Is vLLM still the right default in 2026?

Yes. vLLM is the server everything else has to beat on cost per million tokens, it supports the most model architectures on day one, and it runs on the widest range of hardware. Skip it only if you need a vendor support contract or your traffic is dominated by long shared prefixes, where SGLang deserves a benchmark.

vLLM is an Apache 2.0 engine with PagedAttention, continuous batching and an OpenAI-compatible /v1/chat/completions endpoint. The PagedAttention paper (SOSP 2023) showed earlier serving systems wasted 60 to 80 percent of KV cache memory; closing that gap is what lets vLLM run larger batches on the same GPU. The project has about 97,000 GitHub stars as of 22 November 2026 (GitHub).

The v0.34.0 release (16 November 2026, 1,061 commits from 412 contributors) changes how you configure it on Kubernetes:

  • Extensible KV cache is on by default. vLLM sizes the KV cache from memory that is free after warmup, and the release notes say that in most cases you should now remove gpu_memory_utilization from your configs.
  • Model Runner V1 is gone, and setting VLLM_USE_V2_MODEL_RUNNER=0 now fails at startup.
  • The default block size is 64 instead of 16, ROCm 7.2 images are gone, and huggingface_hub >= 2.0.0 is required.

Read those three before you bump the image tag in production. We keep a separate vLLM CUDA 13 migration checklist for the driver side.

Hardware breadth is the other cost lever. The vLLM README lists NVIDIA, AMD and Intel GPUs and x86, ARM and PowerPC CPUs natively, with hardware plugins for Google TPU, Intel Gaudi, IBM Spyre, Huawei Ascend and others. That is what lets you move to whichever accelerator is cheapest or available in your account.

Who should not pick it: teams that need one vendor to call at 3am, and teams that will never tune anything. The Kubernetes gotchas are max-model-len against your KV cache budget, model download and cold start time, and readiness probes that wait for the weights to load.

Run your inference server on GPUs you own.
Qovery, the Agentic DevOps platform, deploys vLLM, SGLang or NIM containers on GPU node pools in your own AWS, GCP, Azure or Scaleway account, or on your existing Kubernetes cluster. Start on the Free plan, no credit card.

When should you pick SGLang over vLLM?

Pick SGLang when your requests share long prefixes (agent loops, multi-turn chat, RAG with a common system prompt, structured extraction), when you serve large mixture-of-experts models across many GPUs, or when you need fast constrained decoding for JSON. For independent requests with little shared context, vLLM and SGLang land close to each other, and vLLM's broader model coverage usually wins.

SGLang is an Apache 2.0 framework hosted by LMSYS, a non-profit, and describes itself as "optimized for agentic workloads, large-scale serving, and RL rollouts" (SGLang README). Its core idea is RadixAttention: the KV cache lives in a radix tree, so a prefix computed once is reused by every later request that starts with it. The original SGLang paper reported up to 6.4x higher throughput than other inference systems of the time, using RadixAttention plus compressed finite state machines for structured output. That is the authors' benchmark from 2023 and 2024, so read it as the mechanism working, not as your expected gain.

The best recent head-to-head I found is Red Hat's vLLM vs SGLang comparison (14 October 2026), which uses Modal's LLM Engineer's Almanac benchmarks run with default settings. On Llama 3.1 8B on a single H100:

Workload (Modal, default settings)vLLMSGLang
RAG and summarization17.08 req/s16.88 req/s
Code generation5.34 req/s6.50 req/s
Long chatabout 1.23 to 1.25 req/sabout 1.23 to 1.25 req/s

Red Hat flags the caveat itself: Modal's prompts are random chunks of text with very little prefix sharing, so the test "doesn't show the prefix reuse that matters for chat and agents." That setup switches off SGLang's main advantage, and the two still trade wins.

Hardware coverage has grown fast. The README lists NVIDIA (from RTX cards to GB300), AMD Instinct MI300X to MI355X, Google TPU v6e and v7, Intel Arc GPUs and Xeon CPUs, Huawei Ascend and Apple Silicon. Red Hat notes that vLLM's support for TPU, Intel GPU, CPU and Apple is older, so check maturity for your accelerator before you commit.

On Kubernetes, SGLang ships a Docker image (lmsysorg/sglang) and plugs into llm-d, Ray Serve, NVIDIA Dynamo and its own RBG project for routing and prefill-decode disaggregation. If you want disaggregated serving without a dedicated ML platform team, read our llm-d 1.0 article first. The release cadence is roughly every two to three weeks: v0.5.21 (2 October), v0.5.22 (19 October), v0.5.23 (2 November 2026).

Who should not pick it: teams serving many independent short requests on a model vLLM already supports well, and teams that want a commercial support contract. For those, vLLM or NIM is simpler.

When is NVIDIA NIM worth paying for?

NIM is worth it when your organization already has NVIDIA AI Enterprise, or when a regulated buyer needs a vendor SLA, CVE patching commitments and air-gapped deployment support. It buys you supported packaging and tuning time. It does not lower your GPU bill, because the license sits on top of your GPU rental.

NIM ships prebuilt containers on NGC with an OpenAI-compatible API. There are two kinds now. Classic NIMs carry one model each with pre-tuned profiles, and the model-free NIM containers package the vLLM and SGLang engines with no weights inside, so one image serves any supported checkpoint you point it at. With that second kind, "vLLM vs NIM" often means "community vLLM vs NVIDIA-supported vLLM". We wrote a walkthrough of the model-free containers on Kubernetes.

The licensing is the part to get right. NIM is free for development under the NVIDIA Developer Program, up to two nodes or 16 GPUs. Production needs NVIDIA AI Enterprise, which NVIDIA prices at $4,500 per GPU for a one-year subscription, or $1 per GPU per hour on cloud marketplaces. Multi-year terms and a perpetual option exist, and Inception startups get a discount.

Do the arithmetic. On an H100 at $6.88 per GPU-hour, $1 per GPU-hour adds about 15 percent. On an L40S g6e.xlarge at $1.861 per hour, the same $1 adds about 54 percent. The license is flat, so the smaller the GPU, the bigger the uplift.

What you get is real: enterprise support, security patches on a published schedule, Helm charts and the NIM Operator. Patching still lands on you, though. Our NIM security upgrade runbook covers rolling a patched NIM image across GPU nodes without downtime.

Who should not pick it: cost-driven teams without an NVIDIA AI Enterprise agreement, and anyone on AMD, TPU or Trainium.

What happened to Hugging Face TGI?

Hugging Face put Text Generation Inference in maintenance mode. The notice at the top of the TGI documentation says it now accepts only "minor bug fixes, documentation improvements and lightweight maintenance tasks", and recommends vLLM and SGLang (plus llama.cpp or MLX locally) going forward. The GitHub repository is archived, and the last release is v3.3.7 from 19 December 2025.

TGI is still Apache 2.0, still has a good Rust router and an OpenAI-compatible Messages API, and existing deployments will keep running. But new model architectures will not land there, and security fixes depend on a project in maintenance. If you run TGI today:

  1. Keep it for models that already work, and pin the image.
  2. Move new models to vLLM or SGLang, both of which expose an OpenAI-compatible API, so most clients only change a base URL.
  3. Re-check your Prometheus dashboards and HPA metrics, because metric names differ between servers.

If you want a managed endpoint instead of operating anything, Hugging Face Inference Endpoints remains the option inside the Hugging Face ecosystem. You give up owning the cloud account.

What about TensorRT-LLM, Ollama, Ray Serve, KServe and llm-d?

TensorRT-LLM gives the best raw NVIDIA numbers if you can fund engine work, Ollama and llama.cpp are for local use, and Ray Serve, KServe and llm-d are orchestration layers that wrap vLLM or SGLang rather than compete with them.

ToolRoleCore strengthMain costWhen to use
TensorRT-LLMServing engine (Apache 2.0, NVIDIA)Fastest NVIDIA kernels, FP8/FP4Engine builds, version pinningPeak NVIDIA throughput with engineers to tune it
Ollama / llama.cppLocal runtimeSimple local inference, GGUF quantizationNot built for concurrent servingPrototyping, laptops, edge
Ray Serve / KServeOrchestrationMulti-model routing, autoscaling, scale-to-zeroYou still run the clusterMany models, canaries
llm-dKubernetes-native distributed servingPrefill-decode disaggregation, KV-aware routing over vLLMMore moving partsLarge models with heavy traffic

TensorRT-LLM shipped v1.3.0 on 20 November 2026 and also sits inside many classic NIM containers, so you may already run it indirectly.

When is self-hosting cheaper than paying per token for an API?

Self-hosting wins on price only when you keep GPUs busy at high sustained throughput, and cheap hosted open-weight APIs have pushed that bar up. Together AI lists gpt-oss-120B serverless at $0.15 per million input tokens and $0.60 per million output tokens (Together AI pricing). Compare that with one H100 at $6.88 per hour on demand.

Sustained output tokens/s per H100Tokens per month (730 h)Self-hosted cost per 1M tokens (on-demand)Hosted gpt-oss-120B output price
200~0.53 billion~$9.56$0.60
1,000~2.6 billion~$1.91$0.60
2,000~5.3 billion~$0.96$0.60
5,000~13.1 billion~$0.38$0.60

The throughput column is a set of placeholders, not a benchmark; your model, context length and batch size decide where you land. Reserved or committed pricing moves every self-hosted number down. On g6e.xlarge, for example, the three-year reserved rate is $0.804 per hour against $1.861 on demand (Vantage).

So on pure token price, a hosted API often wins. Three conditions push you to self-host anyway: data residency or confidentiality requirements, fine-tuned or private weights, and predictable high volume you can keep a GPU busy with. Three keep you on an API: bursty traffic, an early product with unknown volume, and nobody to own the cluster. Committed-use discounts and spot capacity only help if the cloud account is in your own name.

Where does the GPU money go when you self-host?

The engine choice moves cost per token by tens of percent; idle GPUs, oversized instances and missing autoscaling move the total by multiples. Fix operations before you relitigate vLLM versus SGLang.

Where the GPU money goesLeverRough magnitude
Idle non-production GPUsStop dev and staging outside working hoursA 40-hour week is 24% of the 168-hour week
Oversized instance typeMatch the GPU to the modelAn H100 at $6.88/h vs an L40S at $1.861/h is 3.7x
No autoscalingHPA or KEDA on queue depth or GPU utilizationYou pay for peak 24/7 otherwise
Low batch utilizationContinuous batching, tune concurrency10x cost per token between 200 and 2,000 tokens/s
No quantizationFP8 or INT4 to fit bigger batchesMore throughput per GPU; check the accuracy delta

A 7B or quantized mid-size model serves fine on one L40S. Defaulting to an H100 for the same job burns money. For a cross-cloud view of GPU prices on AWS, GCP, Azure and Scaleway, see our GPU pricing comparison. For autoscaling, our guide to KEDA queue-depth autoscaling for inference pods has the manifests.

Which approach should you use to run the server on your own cloud?

All three servers ship as containers, so the real work is the cluster, GPU drivers, autoscaling and environment lifecycle around them. You can build that yourself, buy it from NVIDIA, rent a managed endpoint outside your account, or use a deployment platform in your account.

ApproachWhat you runBest forTrade-off
DIY Kubernetes (EKS, GKE, AKS, Kapsule + GPU Operator + KEDA)EverythingTeams with platform engineers who want full controlWeeks of setup, upgrades and on-call
NVIDIA NIM Operator on your clusterNIM workloads, plus the clusterNVIDIA AI Enterprise customersNVIDIA-only; you still run the cluster
KServe or llm-d on your clusterServing layer, plus the clusterMany models or very large modelsMore components to operate
Managed endpoints (Hugging Face Inference Endpoints, Baseten, Modal, Together dedicated)NothingTeams that do not need their own cloud accountData and GPU spend sit in the vendor's account
Qovery on your cloud accountYour apps and models; Qovery operates the deployment layerProduct teams without a platform team that need data and GPU discounts in their own accountNot an inference server or a model router; you still pick and tune the engine

How does Qovery run vLLM, SGLang or NIM in your own cloud account?

Qovery, the Agentic DevOps platform, deploys your inference server container on Kubernetes in your own AWS, GCP, Azure or Scaleway account, or on a cluster you already run. Qovery never hosts the model or the traffic; the GPUs, the weights and the bill stay in your account.

What you set up:

  • A cluster with GPU node pools. On a Qovery-managed cluster, you add GPU node pools per service on any of the four clouds, with Karpenter on AWS. Or you connect an existing EKS, GKE or Kapsule cluster with the Qovery Operator (BYOK v2), which installs once with Helm, opens an outbound connection and never gives Qovery your kubeconfig (BYOK docs).
  • The server as a service. Deploy the vLLM, SGLang or NIM image (or your own image built from Git) with its arguments, secrets such as HF_TOKEN or the NGC key, a persistent volume for the model cache, and health checks that wait for the weights to load.
  • Environments. A preview environment per pull request to test a new engine version against real traffic, environment cloning for a staging copy, and non-production environments that stop when nobody uses them, which is where idle GPU money goes.
  • Controls. RBAC, audit logs and Qovery Observe.

Qovery does not benchmark engines, route between models or tune KV cache settings; those choices stay with you. If you already run Argo CD, Karpenter and KServe with a platform team, you have built this layer already.

To start, the Free plan gives you 3 users, one cluster of your own and 1,000 deployment minutes a month, with no credit card. qovery demo up creates a local cluster to try the workflow (no GPU), then you connect your GPU cluster.

How do I deploy an inference server with Qovery from Claude Code or Cursor?

Install the Qovery Agent Skills once, then ask your coding agent in plain language to deploy the inference container into your own cloud account. The agent proposes the deployment and asks you to approve each step.

Install the skills globally for every compatible agent (Claude Code, Cursor, Codex, OpenCode, Gemini CLI):

BASH
curl -fsSL https://skill.qovery.com/install.sh | bash

Or scope the install to the current project only:

BASH
curl -fsSL https://skill.qovery.com/install.sh | bash -s -- --project

To let an agent inspect what is already running, add the Qovery MCP Server to Claude Code over OAuth, read-only by default:

BASH
claude mcp add --transport http qovery https://mcp.qovery.com/mcp --callback-port 4242

And the same with write access, only when you explicitly want the agent to change things (this also requires enabling write access in the Qovery Console):

BASH
claude mcp add --transport http qovery "https://mcp.qovery.com/mcp?read_write=true" --callback-port 4242

Then ask, for example: "deploy this SGLang container on a GPU node pool in my AWS account with Qovery." The skills (qovery-onboard, qovery-deploy, qovery-troubleshoot, qovery-optimize, qovery-speedup, qovery-preview, qovery-terraform) handle the deployment, while the MCP Server operates what already exists. See the AI agent quickstart, the Claude Code integration page, and our Kubernetes for AI hub for related guides.

Frequently asked questions
vLLM vs SGLang vs NVIDIA NIM: how do I choose an inference server for self-hosting open-source models on my own cloud?

Start with vLLM for the broadest model and hardware support, and benchmark SGLang next to it if your traffic reuses long prefixes, as agents, multi-turn chat and RAG do. Choose NVIDIA NIM when you already pay for NVIDIA AI Enterprise or need a vendor SLA, knowing it adds $4,500 per GPU per year or about $1 per GPU-hour. Whichever you pick, Qovery, the Agentic DevOps platform, can run it on GPU node pools in your own AWS, GCP, Azure or Scaleway account.

Is Hugging Face TGI still maintained?

Only for maintenance. Hugging Face's documentation says TGI accepts minor bug fixes, documentation improvements and lightweight maintenance tasks, and recommends vLLM or SGLang going forward. The GitHub repository is archived and the last release is v3.3.7 from 19 December 2025, so keep existing deployments pinned and start new ones elsewhere.

Is SGLang faster than vLLM?

It depends on the workload. SGLang's RadixAttention pays off when requests share long prefixes, while on independent requests the two trade wins: in Modal's default-settings benchmark on an H100, vLLM led on RAG (17.08 vs 16.88 req/s) and SGLang led on code generation (6.50 vs 5.34 req/s). Benchmark both on your own traffic at your latency target.

Is NVIDIA NIM free to use in production?

No. NIM is free for development under the NVIDIA Developer Program, up to two nodes or 16 GPUs. Production use requires NVIDIA AI Enterprise, priced at $4,500 per GPU for a one-year subscription or $1 per GPU per hour on cloud marketplaces.

When is self-hosting an LLM cheaper than paying per token?

When you keep GPUs busy at high sustained throughput. An H100 at $6.88 per hour costs about $0.96 per million tokens at 2,000 tokens per second, while Together AI lists gpt-oss-120B output at $0.60 per million, so the API often wins on price alone. Data residency, private weights and predictable high volume are the usual reasons to self-host anyway.

Can Qovery run vLLM, SGLang or NIM on my own cloud account?

Yes. Qovery deploys the container on GPU node pools in your own AWS, GCP, Azure or Scaleway account, or on an existing EKS, GKE or Kapsule cluster through the Qovery Operator, with preview environments, RBAC, audit logs and non-production environments that stop when idle. Qovery is not an inference server, so you still choose and tune the engine.

Romaric Philogene
About the author
Romaric Philogene

Romaric founded Qovery to make Kubernetes accessible to every engineering team. He writes about platform strategy, developer experience, and the future of cloud infrastructure.

Next step

Run your inference server on GPUs you own.

Qovery, the Agentic DevOps platform, deploys vLLM, SGLang or NIM containers on GPU node pools in your own AWS, GCP, Azure or Scaleway account, or on your existing Kubernetes cluster. Start on the Free plan, no credit card.