Skip to Content

Text Generation Inference (TGI): deployment and alternatives

TGI is Hugging Face’s model-serving runtime with continuous batching and an OpenAI-compatible chat API. For an existing deployment, start with the server guide and check the supported-model list  for your checkpoint’s architecture.

The upstream repository  describes TGI as being in maintenance mode and recommends vLLM or SGLang for future development. A familiar --model-id flag does not establish support for a new architecture or weight format.

When to choose TGI

SignalWhat it means
Existing Kubernetes + HF Hub modelsTGI targets containerized Hub checkpoints at scale
Enterprise HF support pathYou already operate TGI in production
Greenfield CUDA servingPrefer vLLM or SGLang for new GPU stacks

For Docker quick start and runtime terminology, see text generation inference.

Setup and operation

GuideWhat you’ll learn
Install the server and send a requestContainer run, first completion
Size GPU memoryVRAM for context and batching
Connect an API clientOpenAI-compatible chat API
Deploy on KubernetesProduction layout
Monitor servingMetrics and health checks
Calculate costsTokens vs GPU time
Apply request guardrailsLimits and safety
Find support optionsUpgrades and vendor paths

Model-specific deployment guides

No model pages document a TGI recipe for these checkpoints yet. Use the model directory for vLLM, SGLang, and iwant paths, and confirm your checkpoint on the TGI supported-model list.

Each guide links the actual upstream configuration, explains hardware and checkpoint variants, and includes a first API request. Browse all documented models for other deployment options.

TGI alternatives

ToolChoose when
iwantYou want a documented model name to become a GCP endpoint without assembling VMs, engine flags, and teardown yourself.
vLLMYou manage the GPU host and need continuous batching, prefix caching, and direct control over vllm serve settings.
SGLangYou need RadixAttention prefix reuse, structured generation, or model-specific parsers on hardware you configure.
OllamaYou want local ollama pull ergonomics, IDE chat, and low-ops serving on a single machine.
llama.cppYou serve GGUF weights on CPU, Apple Silicon, or a modest GPU with minimal dependencies.
LocalAIYou need one OpenAI-compatible URL over multiple backends or gallery configurations.

All launch methods: self-hosting hub.

Related reading

Last updated on