What It Does
Text Generation Inference (TGI) is Hugging Face’s production inference server built in Rust for maximum performance. It serves text generation models with optimizations like continuous batching, tensor parallelism, and flash attention, integrated with the Hugging Face ecosystem.
Key Features
TGI provides token streaming, continuous batching, tensor parallelism, flash attention, GPTQ/AWQ quantization support, grammar-constrained generation, multi-LoRA serving, and native integration with Hugging Face Inference Endpoints and the Hub.
When To Use It
Choose TGI when deploying Hugging Face models to production, especially if you use Inference Endpoints. It excels at serving transformer-based text generation models with features like grammar constraints and multi-adapter serving.
Alternatives
vLLM offers similar performance with broader community adoption. Triton Inference Server provides enterprise multi-framework support. For local development, Ollama offers a simpler experience.