DEV.co
AI Frameworks · huggingface

text-embeddings-inference

Text Embeddings Inference (TEI) is a Rust-based inference server optimized for deploying text embedding and sequence classification models with high throughput and low latency. It supports popular embedding models like Qwen, GTE, and BERT, with features including dynamic batching, Flash Attention optimization, and Metal support for local execution.

Source: GitHub — github.com/huggingface/text-embeddings-inference
4.9k
GitHub stars
409
Forks
Rust
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryhuggingface/text-embeddings-inference
Ownerhuggingface
Primary languageRust
LicenseApache-2.0 — OSI-approved
Stars4.9k
Forks409
Open issues198
Latest releasev1.9.3 (2026-03-23)
Last updated2026-07-07
Sourcehttps://github.com/huggingface/text-embeddings-inference

What text-embeddings-inference is

TEI provides a production-ready HTTP/gRPC API for inference using Candle, cuBLASLt, and Flash Attention optimizations. It eliminates model graph compilation, supports Safetensors and ONNX weight formats, includes OpenTelemetry tracing and Prometheus metrics, and offers token-based dynamic batching for efficient GPU utilization.

Quickstart

Get the text-embeddings-inference source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/huggingface/text-embeddings-inference.gitcd text-embeddings-inference# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

High-throughput embedding serving

Deploy embedding models at scale with dynamic batching and optimized inference, suitable for semantic search, RAG systems, and vector database indexing at production volumes.

Latency-sensitive AI applications

Achieve sub-100ms inference on standard hardware (A10 GPUs) with optimized transformers code, appropriate for real-time embedding generation in search and recommendation systems.

Serverless and containerized deployments

Small Docker images, fast cold-start times, and no compilation step make TEI suitable for serverless platforms, Kubernetes clusters, and edge deployment scenarios.

Implementation considerations

  • Model compatibility must be verified before deployment; unsupported model types will not load or function correctly.
  • GPU drivers must be CUDA 12.2 or higher for NVIDIA hardware; NVIDIA Container Toolkit is required for containerized deployments.
  • Token-based dynamic batching requires careful tuning of batch size and timeout parameters for optimal latency vs. throughput trade-offs.
  • Private or gated models require Hugging Face token configuration for authentication; air-gapped deployments require pre-downloaded model weights.
  • Production deployments should enable OpenTelemetry tracing and Prometheus metrics for observability and debugging.

When to avoid it — and what to weigh

  • Custom or unsupported model architectures — TEI supports specific model types (Nomic, BERT variants, Mistral, Qwen, GTE, Gemma3, ModernBERT); models outside this list require custom implementation or alternative solutions.
  • GPU-less deployments requiring high performance — TEI is optimized for GPU inference; CPU-only deployments will not achieve the performance characteristics showcased in benchmarks.
  • LLM generation or chat inference — TEI is specialized for embeddings and sequence classification only; it is not designed for generative tasks or conversational AI.
  • Inference on heterogeneous hardware without testing — While Docker support exists for multiple platforms (CUDA, ROCm, CPU, Metal), compatibility and performance on non-standard hardware (AMD ROCm is experimental) requires validation.

License & commercial use

Apache License 2.0 (Apache-2.0) is a permissive OSI-approved license allowing commercial use, modification, and distribution with liability and trademark limitations.

Apache-2.0 permits commercial use, derivative works, and private deployment without restriction. No license fees or vendor lock-in. Review Apache-2.0 terms for liability disclaimers and trademark usage; no additional commercial agreement is evident from the repository.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Apache-2.0 license includes liability disclaimers. Safetensors weight loading provides safer deserialization vs. pickle. No security audit, CVE history, or vulnerability disclosure policy stated in provided data. Private model support requires Hugging Face token management; air-gapped deployments require secure weight download and storage. OpenTelemetry tracing may expose sensitive prompt/embedding data; configure sampling and redaction accordingly.

Alternatives to consider

Ollama

Lighter-weight local inference for embeddings and LLMs; simpler setup for single-machine deployment but less optimized for high-throughput serving and lacks advanced batching.

vLLM (embeddings mode)

Broader model support and higher generative throughput; however, vLLM is LLM-focused; TEI is more specialized for embeddings with better optimization for embedding-only workloads.

Hugging Face Inference API (managed)

Hosted, managed alternative eliminating infrastructure burden; trade-off: vendor lock-in, latency variability, and per-request pricing vs. self-hosted TEI capital expense.

Software development agency

Build on text-embeddings-inference with DEV.co software developers

Integrate Text Embeddings Inference into your AI pipeline for low-latency, high-throughput semantic search and RAG systems. Apache-2.0 licensed, Hugging Face maintained.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

text-embeddings-inference FAQ

Which embedding models does TEI support?
TEI supports Qwen3, Qwen2, Mistral, XLM-RoBERTa, BERT, Alibaba GTE, Gemma3, ModernBERT, JinaBERT, Nomic, and Alibaba GTE. See README table for 15+ examples with MTEB rankings; unsupported models will fail to load.
What hardware is required?
GPUs (NVIDIA A10 or equivalent with CUDA 12.2+, or AMD ROCm experimental) recommended for benchmarked performance. CPU inference possible but significantly slower. Metal support available for Apple Silicon Macs.
How does dynamic batching improve throughput?
Token-based dynamic batching accumulates requests up to a configurable token limit and processes them together, increasing GPU utilization and throughput with controlled latency trade-off.
Can I use private or gated models?
Yes, by passing a Hugging Face API token. For air-gapped deployments, pre-download model weights and mount them as Docker volumes or use local paths.

Software development & web development with DEV.co

From first prototype to production, DEV.co delivers software development services around tools like text-embeddings-inference. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across ai frameworks and beyond.

Deploy High-Performance Embedding Inference

Integrate Text Embeddings Inference into your AI pipeline for low-latency, high-throughput semantic search and RAG systems. Apache-2.0 licensed, Hugging Face maintained.