TGI (Text Generation Inference) logo
Serving and AI platform

TGI (Text Generation Inference)

Hugging Face's inference server for LLMs. Text Generation Inference (TGI) is a server from Hugging Face for serving large language models on GPUs. It provides continuous batching, streaming responses, quantisation support and Prometheus metrics, and it powers parts of Hugging Face's own hosted inference. It is distributed as a container image.

When it is the right choice

  • You already run TGI or Hugging Face Inference Endpoints and want to keep a consistent stack
  • You want a container that serves a Hub model with little configuration
  • You need built-in metrics and tracing for model serving
  • Before choosing it for a new project, check the project's current maintenance status and compare with vLLM

How we use it

  • Run TGI containers on Kubernetes GPU nodes with readiness checks and autoscaling
  • Scrape TGI metrics into Prometheus and build latency and throughput dashboards
  • Pin images and model revisions so every deployment is reproducible
  • Benchmark TGI against vLLM on your workload when planning upgrades
Works well with

Often used together

Questions

TGI (Text Generation Inference): frequently asked

Should we choose TGI or vLLM?

Both serve open models with batching and an HTTP API. For new projects vLLM usually has wider community activity; check TGI's current status and benchmark both on your model.

Can TGI serve any Hugging Face model?

It supports many popular text generation architectures, but not every model. Check the supported models list for your model first.

Running TGI (Text Generation Inference), or deciding whether to? Tell us what you have; the first consultation is free.

Let's talk »