michaelfeil/infinity

Infinity is a high-throughput, low-latency serving engine for text-embeddings, reranking models, clip, clap and colpali

What it solves

Infinity provides a high-throughput, low-latency REST API for serving various AI models used in retrieval-augmented generation (RAG) and search. It simplifies the deployment of embedding, reranking, and multi-modal models from HuggingFace, removing the need to build custom inference servers for these specific tasks.

How it works

Built on FastAPI, Infinity orchestrates multiple models using fast inference backends like PyTorch, Optimum (ONNX/TensorRT), and CTranslate2. It utilizes dynamic batching, dedicated worker threads for tokenization, and FlashAttention to optimize performance across various hardware accelerators including NVIDIA CUDA, AMD ROCm, CPU, AWS INF2, and Apple MPS.

Who it’s for

Developers and ML engineers who need to deploy scalable, OpenAI-compatible embedding and reranking services for search, clustering, or multi-modal retrieval systems.

Highlights

  • Broad Model Support: Serves text embeddings, reranking models, CLIP, CLAP, ColBERT, and ColPali models.
  • Hardware Flexibility: Supports a wide range of accelerators including NVIDIA, AMD, Apple Silicon, and CPUs.
  • ** uma OpenAI-Compatible API**: Aligns with OpenAI's API specifications for ease of integration.
  • Multi-Model Orchestration: Ability to launch and mix-and-match multiple models simultaneously via a single CLI or environment variables.
  • Efficient Inference: Implements dynamic batching and supports experimental int8 and fp8 precision.

Related

  • Project
  • Project
  • Project
  • Project