Migrating from Hugging Face TGI to vLLM

Text Generation Inference is in maintenance mode, so teams running it are weighing a move to vLLM. This page covers what maps cleanly, what does not, and how to cut over safely.

On this page

Migrating from Hugging Face TGI to vLLM: what the move involves

Your self-hosted Text Generation Inference service is now in maintenance mode, and clients still depend on it, so the move has to happen without an outage. vLLM is a practical replacement for most TGI workloads, since it is an open-source serving engine that exposes OpenAI-compatible endpoints and supports tensor parallelism and Prometheus metrics. The effort, however, depends on four things: how your TGI launcher settings translate to vLLM engine arguments, how much of your client code relies on the exact request and response shape, how your metrics and tracing are wired, and whether your target GPUs match the hardware your model was tuned on. Each of these should be inventoried before anyone estimates the work. Confirm the TGI version you run and the exact launcher flags in use, since those define the mapping exercise.

vLLM is licensed under Apache-2.0 and has no paid edition, so the license itself adds no cost. The money goes to accelerator capacity, the surrounding infrastructure such as storage, networking and load balancing, the implementation work, and the people who operate the service afterward. Some of these costs are one-time, such as mapping settings, rebuilding dashboards and running a parallel cutover. Others recur, such as GPU hours, on-call coverage and the routine work of tracking vLLM releases, which ship new minor versions about every two weeks. When you ask a partner or internal team for a quote, ask for the inventory of launcher settings and clients as a separate line, and ask which parts of the cutover are priced as fixed scope.

Plan the cutover as a side-by-side run rather than a single switch. Keep TGI serving production traffic while vLLM runs with the same model and a copy of real request patterns, then compare outputs, latency and error rates before moving clients. Two areas need particular attention: the chat template, because vLLM requires one for the chat completions API, and the authentication and endpoint exposure of the vLLM server, because its --api-key option does not cover every endpoint and the vLLM security documentation recommends a reverse proxy that allowlists only user-facing paths. Record who owns the go or no-go decision and the rollback steps before the first client moves.

Which TGI capabilities map to vLLM and which need rework

This table compares the main Text Generation Inference capabilities with their vLLM counterparts, separating items that map directly from items that need configuration or client changes. Use the check, cross and dash marks as a starting point, then confirm each yes or no against the exact model, quantization format and tracing setup your team runs today.

CapabilityTGI todayvLLM equivalentMigration effort
Tensor parallelismSplits a model across GPUs in one host using the launcher's sharding settingsTensor parallelism within a node through its parallelism settings, with pipeline parallelism across nodesRe-derive GPU counts and confirm the layout fits your memory budget
Continuous batchingBuilt into the TGI router and batching loopBuilt into the engine scheduler, tuned through batching and memory settingsLow change, but retune concurrency limits from measured load
Prometheus metricsExposes Prometheus metrics on the serverPrometheus-format metrics at /metrics covering requests, token throughput, latency and KV cache useRename dashboards and alerts, since metric names will differ
OpenTelemetry tracingSupports OpenTelemetry tracing exportTracing setup must be confirmed for your vLLM version and deployment methodConfirm tracing setup in a test build before cutover
bitsandbytes and GPTQ quantizationServes bitsandbytes and GPTQ checkpointsQuantization format support varies by model and GPU generation, so confirm each checkpoint formatHigh: re-verify each quantized model before moving traffic
SSE token streamingStreams tokens over server-sent eventsStreaming is available on the OpenAI-compatible endpoints when the client requests itLow to medium: test client streaming parsers end to end
OpenAI-compatible endpointsTGI-specific generate routes plus an OpenAI-style messages interface/v1/completions, /v1/chat/completions, /v1/responses and /v1/embeddings for OpenAI-style clientsMedium: rewrite any TGI-only generate calls to the OpenAI paths
Chat templatesChat formatting handled by the model's tokenizer configurationModels must provide a chat template or receive one through the chat-template optionConfirm template behavior for each served model before cutover
Authentication on endpointsAccess controls applied at the TGI layer or the surrounding gatewayThe --api-key option does not cover /metrics or /health, so a reverse proxy must allowlist user endpointsMedium: add a gateway policy and confirm which paths are exposed

How TGI launcher settings translate to vLLM engine arguments

In TGI, the launcher takes a model identifier, an optional revision and a quantization setting, then downloads and loads the weights at startup. In vLLM, the model is a positional argument to vllm serve, with --revision pinning the same files and --quantization selecting the scheme. Many names carry over, but the accepted values and behavior often differ, so treat each mapping as a statement of intent and confirm it in staging.

  • Model identifier: TGI --model-id corresponds to the positional model argument of vllm serve. Point both at a locally staged path if the environment is isolated.
  • Revision pinning: TGI --revision maps to --revision in vLLM. Pin the same commit hash in both so the weights match after the move.
  • Quantization: TGI --quantize maps to --quantization, but the supported formats depend on the engine version and GPU generation. A checkpoint that loaded under TGI may need a different format on vLLM.
  • Custom model code: Models that ship custom code need --trust-remote-code in vLLM. Review that code before enabling the flag.

Check each model's architecture and quantization format against the installed vLLM release, and load every model once in a staging environment before cutover.

Documented paths for moving the service and its clients

Moving off TGI is mostly a matter of replacing the server and then re-pointing clients and dashboards. The vLLM documentation covers three paths you can plan around: the serving command and its API, the Kubernetes deployment options, and the metrics endpoint. No automated TGI-to-vLLM config converter is documented in the sources we rely on, so launcher translation and client changes are manual work to confirm against the docs.

The vllm serve command

The vllm serve command starts the OpenAI-compatible server that replaces the TGI launcher. Each TGI launcher setting has to be mapped by hand to a vLLM engine argument, so the team should build a written mapping table and test every flag against the installed version. Check the model's chat template early, because chat completions require one, either shipped with the model or supplied with --chat-template.

Latest minor release cited
v0.31.0
Online serving docs

OpenAI-compatible endpoints for clients

vLLM exposes /v1/completions, /v1/chat/completions, /v1/responses, and /v1/embeddings, so many clients built for the OpenAI API can change only their base URL. TGI-specific request fields and streaming details still need checking against each client, and the team should replay real request logs against a staging server before cutover.

Kubernetes deployment options

The vLLM docs list native manifests, Helm, the vLLM production-stack, AIBrix, KServe, KubeRay, LeaderWorkerSet, llm-d, and NVIDIA Dynamo. Choosing one should follow how TGI is run today, including readiness probes sized to model load times and how replicas sit behind your router. Confirm each option's current status with its own project before selecting it.

Kubernetes deployment docs

Metrics endpoint for dashboard continuity

vLLM serves Prometheus-format metrics at /metrics, covering request counts, token throughput, latency histograms, and KV cache use. Existing TGI dashboards and alerts will not match metric names one for one, so the team should map each panel and alert to its vLLM equivalent and set histogram buckets that match the latency targets. Run both servers side by side so the old and new series can be compared before the old panels are retired.

Production metrics docs

Access to the metrics and health paths

The --api-key option does not protect /metrics or /health, and the security docs recommend a reverse proxy that allowlists only the endpoints meant for users. Decide early which paths are reachable from clients, which are reachable only from monitoring, and where the proxy sits, so that the TGI access pattern is not silently widened.

Security docs

Manual translation work to confirm

Because no automated converter is documented, the launcher mapping, client changes, and any custom TGI tooling are hand work. Ask the implementation team for a written inventory of every launcher flag, client, and dashboard in use, and confirm each mapping against the vLLM docs for the release you will deploy. Plan a side-by-side cutover where the TGI service stays live until metrics and client tests match.

What changes for clients calling the API

The first step is to inventory what clients actually call. Pull request paths, methods, and payload shapes from your gateway or TGI access logs over a representative period, and group them by calling application. TGI's native routes, such as /generate and /generate_stream, and any calls made through its OpenAI-style Messages route need to be mapped to vLLM's endpoints. vLLM's vllm serve exposes /v1/completions, /v1/chat/completions, /v1/responses and /v1/embeddings, so applications already written for the OpenAI API can usually change only the base URL and model name. Native TGI payloads, with fields such as inputs and parameters, will not work unchanged and need a client adapter or a code change. Confirm each mapping against the vLLM online serving documentation before you decide what to rewrite.

Response shapes and streaming are where client code most often breaks silently. Native TGI returns a generated_text field, while OpenAI-compatible responses return choices with message or text content and a usage block, so parsers, logging and cost tracking need to be checked. Streamed output also differs in framing and in how the stream ends, so confirm that each client library reads vLLM's server-sent events correctly, including stop reasons and error events. Chat requests need a model with a chat template, or one supplied with --chat-template, or chat calls will fail, so test every chat client against the exact model you intend to serve.

Authentication needs a gateway decision, not just a flag. The --api-key option protects /v1 endpoints but not /metrics, /health, /pause, /resume, /abort_requests or /invocations, and the vLLM security documentation advises against relying on it alone. Place a reverse proxy or gateway in front of vLLM that allowlists only the endpoints users need, and restrict operational endpoints to the monitoring network. Replacing TGI's existing token handling with the new gateway's keys is a change clients will notice, so plan the rotation and communicate it before cutover.

How traffic moves during the side-by-side cutover

This is a generic pattern, not a prescribed architecture. Client requests arrive at a reverse proxy or gateway inside the trust boundary, which exposes only the endpoints meant for users and routes them to either the existing TGI service or the new vLLM service. Both services report to the same monitoring stack, so the team can compare latency, errors and token throughput before moving traffic. The cutover switch is the one place where the route changes, so confirm that both backends answer the same allowlisted paths before shifting any users.

Generic side-by-side pattern with one route switch between two backends.

Running TGI and vLLM side by side before cutover

This sequence proves that vLLM answers the same requests as TGI for the same model, then moves real traffic in controlled steps while TGI stays available for rollback. Each step ends with a go or no-go check so the cutover decision rests on recorded evidence.

  1. Inventory settings, clients, models and dashboards

    The platform team lists every TGI launcher setting in use, every client application and the endpoints it calls, the exact model revisions served, and every dashboard and alert that reads TGI metrics. Owners of each client confirm which request fields and streaming behavior they depend on. The step is done when the inventory is reviewed and each item has a mapped owner. Go or no-go: any setting or client without an owner or a mapping blocks the next step.

  2. Stand up vLLM on target hardware

    The infrastructure team deploys vLLM on the accelerators planned for production, using the same model revision as TGI, and translates launcher settings into vLLM engine arguments in a versioned configuration. Confirm the accelerator type is listed in the vLLM installation documentation for your platform and check the vLLM release you pin against the release notes. The step is done when the server starts, loads the model and answers a test request. Go or no-go: the model must load on the target hardware with memory headroom the team has measured.

  3. Validate endpoints with recorded requests

    The team replays recorded production requests from the inventory against both servers, covering completions, chat completions, streaming and any embedding calls. They compare response structure, stop behavior, token counts and output quality on a fixed evaluation set, and they note where the chat template or sampling defaults differ. Chat completions need a chat template for the model, so confirm the template is present or supplied before replay. The step is done when each difference is either fixed or accepted by the client owner in writing. Go or no-go: unexplained differences in structure or streaming behavior block the parallel period.

  4. Run a parallel period with a small traffic share

    The gateway or routing layer sends a small, agreed share of live traffic to vLLM while TGI serves the rest, and the team watches error rates, latency and client-side complaints. Clients should be able to switch back to TGI without a code change, so confirm the routing control is tested before traffic moves. The step is done when the agreed observation window passes without unresolved errors. Go or no-go: any rise in client errors or timeouts that is not explained and fixed stops the share from increasing.

  5. Compare metrics on both servers

    The observability team points dashboards at the vLLM /metrics endpoint and maps TGI metric names to their vLLM equivalents for request counts, token throughput, latency histograms and KV cache use. They also confirm that the scrape configuration and alert rules work against the new names, and that tracing is wired into the same backend that TGI uses. The step is done when both servers show comparable figures on the same dashboards and every alert has a working vLLM version. Go or no-go: an alert or panel without a working equivalent must be fixed before cutover.

  6. Cut over and keep TGI for rollback

    The team moves all production traffic to vLLM through the same routing control used in the parallel period, and TGI stays deployed, running and reachable with its configuration unchanged. The on-call runbook names who can trigger the switch back and the conditions for doing so. The step is done when all traffic is served by vLLM and the rollback path has been exercised once in a non-production setting. Go or no-go: the cutover proceeds only if the rollback drill succeeded and the owners of each client have signed off.

  7. Decommission TGI after a stable period

    Once the stability window agreed before cutover has passed without a rollback, the team removes TGI routes, dashboards and scrape targets, then retires its images and configuration in a change record. Model weights and launcher files are archived so the previous setup can be reconstructed for audit. The step is done when no client or dashboard references TGI and the archive is verified. Go or no-go: decommissioning is blocked while any client still calls the TGI endpoint or any compliance owner has open questions about the archived configuration.

Keeping dashboards and traces working after the move

The first thing to plan is that dashboards and alerts built for TGI will not read vLLM's metrics unchanged. vLLM exposes Prometheus-format metrics at /metrics on its API server, covering request counts, token throughput, latency histograms and KV cache use, with configurable histogram buckets. The names and label sets differ from TGI's, so every panel and alert rule needs to be mapped by hand. Export the metric names your current dashboards query, list the signal each one answers (queue depth, time to first token, generation throughput, cache pressure, error rate), and find the closest vLLM equivalent for each. Where a signal has no direct match, decide whether to drop it or derive it from another series, and record that decision so the on-call team knows what changed.

Rebuild alerts in parallel with dashboards, and test them against live traffic on the side-by-side vLLM instance before cutover. Latency and error thresholds set against TGI's behavior may not fit vLLM under the same load, so use the first representative runs to set new baselines rather than copying old numbers across. Histogram bucket boundaries matter for latency percentiles, so confirm that the buckets configured for vLLM cover the range your service-level targets depend on. Also note that /metrics is not protected by the --api-key option, so Prometheus scrape access should be restricted at the network or reverse proxy layer. Confirm the scrape path and any bucket settings against the vLLM metrics documentation for the release you deploy.

Tracing needs a separate check. TGI documents OpenTelemetry tracing, but the sources supplied for this page do not describe an equivalent tracing option in vLLM, so do not assume your existing trace pipeline will receive spans from the new service. Ask the vLLM team or read the documentation for your chosen release to confirm which tracing hooks exist, how they are enabled, and what span attributes they emit. If none meet your needs, decide whether to keep request-level tracing at the gateway or application layer, and state in your runbook which hop the trace stops at. Treat the answer as a release-specific fact to verify, since vLLM ships new minor releases about every two weeks.

What drives the cost and duration of a TGI to vLLM move

This table lists the main drivers of a TGI to vLLM move, who pays for each one, and whether the cost is one-time or recurring. Use it to see which parts of your scope will move the quote most, then ask for a written scope that prices each driver separately.

DriverWhy it changes cost or effortOne-time or recurring, and who pays
Number of models and quantized checkpointsEach TGI model needs a matching vLLM load test, and quantized checkpoints in bitsandbytes or GPT-Q formats may need re-export or re-validation before they load on vLLM.One-time engineering effort. Your team or the partner pays for the work, and the checkpoint work is usually the largest unknown.
Parallelism layoutTensor parallelism within a node and pipeline parallelism across nodes change how many GPUs each model occupies, and multi-node runs add network and isolation work.Engineering is one-time. Accelerator capacity is recurring and paid by you for the GPUs the new layout reserves.
Client applications and gateway rulesEach application that calls TGI endpoints must be checked against vLLM's OpenAI-compatible routes, and gateway allowlists must be rewritten for the endpoints users should reach.One-time per application. Your application teams pay in their own time, and gateway changes fall to the platform team.
Dashboards and alert countTGI Prometheus metrics do not map one-to-one to vLLM metrics at /metrics, so each dashboard and alert needs its metric names, buckets and thresholds rebuilt.One-time build, then recurring tuning. Your observability team pays, and the partner's cost depends on how many panels are in scope.
Tracing and telemetry pipelineTGI's OpenTelemetry tracing must be replaced or re-pointed, which affects collector configuration and retention settings.One-time setup, recurring storage for traces. Your infrastructure team pays for collectors and storage.
Hardware changeMoving from the TGI hardware to a different GPU generation or vendor changes memory limits, supported precisions and benchmark baselines, so capacity estimates must be redone.One-time evaluation, recurring hardware cost. You pay for new accelerators or reserved capacity, and the benchmark work is often billed as engineering time.
Parallel-run lengthRunning TGI and vLLM side by side keeps two serving stacks, two sets of accelerators and two monitoring setups live until the cutover criteria are met.Recurring for as long as both run. You pay for duplicate capacity, and the length is set by your agreed exit criteria, not by the vendor.

What usually goes wrong in a TGI to vLLM cutover

Most failed cutovers trace back to a few predictable gaps: chat behavior, client assumptions, endpoint exposure, network placement, model formats and monitoring. Each card below names one of these, the prevention step to plan in advance, and what to confirm in the vLLM documentation before the cutover date is set.

Missing chat template

vLLM needs a chat template before it can serve the chat completions API. A model that worked behind TGI may ship without one in the format vLLM expects, so chat requests fail or produce odd output after cutover. Check every model in the migration list for a template, and plan to supply one with the --chat-template option where it is missing. Test multi-turn and system-prompt requests, not just a single prompt.

Online serving docs

Clients relying on TGI-specific fields

Client code written against TGI's native generate route and its response fields may parse values vLLM does not return in the same shape. Applications calling the OpenAI-compatible routes expect the OpenAI response structure, so custom parsers and token-counting logic can break silently. Inventory every client, identify the endpoint and fields each one reads, and run them against vLLM in staging before the switch. Confirm the exact routes and response schema in the serving docs.

Serving API docs

Endpoints exposed by a naive API key

Setting --api-key feels like access control, but the vLLM security docs say it protects only the /v1, /v2, /inference and /cohere endpoints. Routes such as /metrics, /health, /pause, /resume and /abort_requests remain unprotected by that flag. Put a reverse proxy in front of the server that allowlists only the endpoints users need, and block administrative routes from the network. Confirm the current protected route list in the security docs before writing firewall rules.

vLLM security docs

Multi-node traffic on shared networks

Multi-node vLLM deployments send traffic between nodes that is insecure by default, with no authorization or encryption. Moving from a single TGI host to several GPU nodes can therefore expose model traffic on any network segment that carries other workloads. Place inference nodes on an isolated network segment, restrict which hosts can reach the inter-node ports, and review the chosen Ray or multiprocessing backend settings. Confirm the required isolation controls in the security docs and the parallelism guide.

Parallelism and scaling docs

Quantization formats that differ

TGI's bitsandbytes and GPTQ checkpoints do not automatically carry over to vLLM, and the supported quantization formats depend on the GPU generation. A checkpoint that loaded under TGI may need a different format, a re-quantized model, or a different precision on the new hardware. Build an inventory of each model's format, precision and target GPU, then load every one on vLLM and compare output quality with a fixed evaluation set. Confirm supported formats against the installation and model documentation for your hardware.

vLLM installation docs

Metrics and tracing gaps

Dashboards and alerts built on TGI metric names will show gaps after cutover because vLLM exposes its own Prometheus metrics at /metrics, covering request counts, token throughput, latency histograms and KV cache use. TGI's OpenTelemetry tracing also needs an equivalent path in the new stack. Map each existing panel and alert to a vLLM metric, adjust histogram buckets where needed, and run both systems side by side until the new alerts have fired in a test. Confirm metric names in the metrics docs for your release.

vLLM metrics docs

Questions teams ask before moving off TGI

Does vLLM cost money to run?

The vLLM engine itself has no paid edition and is licensed under Apache-2.0 according to its GitHub repository, so the software license does not add a fee. The cost of running it comes from four places: GPU or other accelerator capacity, the surrounding infrastructure (networking, storage, load balancing, monitoring), the implementation work to move off TGI, and the people who operate the service afterward. Ask for a quote that separates one-time items such as migration, benchmarking and cutover from recurring items such as hardware or cloud rental, support retainers and on-call time. The largest recurring line is usually accelerator capacity, so the GPU sizing decision drives most of the running cost.

How long does a move from TGI to vLLM take, and what drives it?

The duration depends on how many models and endpoints you serve, how many client applications call them, and how much tuning the cutover needs. Work usually breaks into mapping launcher settings to engine arguments, validating model compatibility, adjusting client code, wiring metrics and tracing, and running both servers side by side before switching traffic. Each model that needs a chat template, a different parallelism layout or a new quantized checkpoint adds validation time. Ask any partner for a written scope and timeline that lists these items individually, since no duration is fixed by the engine itself.

What does our team need to provide for the move?

You will need to provide access to the GPU hosts or cloud accounts where vLLM will run, a current inventory of TGI launch commands and the models they serve, and a list of client applications and the API calls they make. You also need the model weights or the right to download them, the chat templates your models rely on, and a named owner for the metrics, logging and secrets systems the new service will feed. Your security team should supply network and identity requirements early, because the vLLM security guidance expects you to isolate nodes and restrict which endpoints users can reach.

Can our internal team do the TGI to vLLM move alone?

Yes, if the team has engineers who can run GPU inference servers, operate containers or Kubernetes, and test client integrations. The work is well defined, but it touches several areas at once: engine configuration, API compatibility, gateway and authentication design, observability, and performance measurement. Teams without recent GPU serving experience often find the benchmarking and cutover steps take longest. A fixed-scope engagement with DeployOpen can cover part of the work, such as configuration mapping, hardening and the side-by-side cutover, while your team keeps ownership of the models and applications.

Do we need a rollback path if vLLM misbehaves after cutover?

Yes. Keep the TGI deployment running and reachable until the vLLM service has passed your acceptance tests under real traffic. A side-by-side setup lets you route a small share of requests to vLLM, compare latency, error rates and output quality, and shift traffic back if something fails. Record the exact TGI launcher settings and model revisions before you change anything, so the old service can be restarted without guesswork. Decide in advance who can trigger the rollback and which signals trigger it.

What happens to our existing quantized models when we move to vLLM?

Quantized checkpoints do not move across engines automatically, so each one needs to be checked against vLLM's supported formats for your GPU generation before you plan around it. TGI supports bitsandbytes and GPT-Q quantization, and vLLM supports a different set of quantization methods that depend on hardware. Some models may need a new quantized checkpoint, a different precision, or a native-weight layout instead. Test accuracy and memory use on the exact checkpoint you plan to serve, because quantization choices change both output quality and the GPU capacity you need.

Will our existing OpenAI-style clients keep working after the move?

Most of them should need little change, because the vLLM server exposes OpenAI-compatible endpoints such as /v1/completions, /v1/chat/completions and /v1/embeddings. Clients that call TGI-specific routes or rely on its response fields will need updates. Check the endpoints your applications use, confirm that each chat model has a chat template, and test streaming behavior and error responses. Keep the vLLM endpoints behind a gateway that exposes only the routes your users need, since the --api-key option does not protect every route.

How DeployOpen scopes and delivers a TGI to vLLM migration

DeployOpen is a Chainscore Labs company that plans, implements, integrates, hardens and supports self-hosted open-source platforms inside the client's own infrastructure, including cloud accounts, data centers and air-gapped networks. For a TGI to vLLM move, that means the work happens on your GPU hosts, your Kubernetes or container platform, and your gateway, with the model weights, logs and metrics staying where your security team already controls them. DeployOpen does not run your inference traffic in its own environment.

Most engagements are fixed-scope. Before work starts, the written scope should name which TGI deployments are moving, which client applications and SDK calls must keep working, the launcher settings to be mapped to vLLM engine arguments, the metrics and tracing that must survive cutover, and the side-by-side period and rollback criteria. Deliverables and timelines are agreed in the same document. Ask for the scope to list what is excluded as well, such as application code changes on the client side, GPU procurement, or model quality evaluation, because those are the items that most often move cost after signature.

DeployOpen does not publish a price list, so the cost of the move is set by the written scope. When you request a quote, ask for the work broken into planning, configuration and integration, testing and cutover, and handover, and ask which items are one-time and which recur. Ongoing support, upgrades and continuous testing are available as a retainer, and the retainer scope should be agreed separately so that routine vLLM release tracking, which ships new minor releases about every two weeks, has a defined owner after cutover.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.