infiniflow/infinity
Self-hosted C++ database for hybrid text, vector, and tensor retrieval in RAG
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Infinity is a C++ retrieval database with a single-binary server and an embedded Python option. In the remote example, a Python client connects to port 23817, writes text and vectors to a typed table, and issues a dense top-k query through match_dense. Keeping searchable representations and structured fields in one table lets the application combine retrieval with metadata filtering without maintaining a separate metadata store for that query path.
CMakeLists.txt, vcpkg.json, and src/ describe the native build surface. The thrift/ directory and the SDK's thrift dependency show a Thrift integration surface; a separate HTTP API is documented. The SDK also declares sqlglot[rs], pandas, PyArrow, and polars-lts-cpu. The example uses to_pl() to materialize results for Python-side processing. The presence of rust_engine/, rust_poc/, and RUST_REWRITE_PLAN.md does not establish that the v0.7.5 server runs on a Rust engine.
Key Capabilities & Differentiators
The engine supports dense and sparse vectors, multi-vector tensors, and full-text search alongside structured filtering. RRF combines result ranks, while weighted sums combine scores and require attention to score scales across retrieval methods. ColBERT provides a multi-vector reranking option. The dense example shows explicit query controls: it searches a four-dimensional float field using inner product and requests two results.
Published benchmarks report 0.1 ms query latency and 15K+ QPS on million-scale vector datasets, and 1 ms and 12K+ QPS for full-text search over 33 million documents. Those figures cover vector and text paths, not a complete hybrid pipeline with filters and reranking. Measure recall and tail latency on representative data, especially with selective filters and realistic reranking candidate counts.
Trade-offs & Limitations
Compared with a managed alternative such as Pinecone, Infinity's appeal is control over where retrieval runs and the ability to keep lexical, semantic, and multi-vector retrieval in one engine. That may reduce synchronization work compared with operating separate text and vector stores. The trade-off is that your team owns capacity, persistence, network exposure, upgrades, and recovery. If automatic failover or a particular tenant-isolation model is an adoption requirement, verify it for the intended deployment rather than assuming it from the single-binary packaging.
Start with dense and full-text retrieval and a rank-fusion baseline. Add sparse or multi-vector representations only when an evaluation set shows a meaningful quality gain: they add stored data and can raise memory, disk, and reranking cost. A shared database simplifies data management, but it also makes it important to test mixed workloads, not just isolated query benchmarks.
Hardware & Deployment Guide
The Docker quickstart runs client and server separately on x86_64 with AVX2. Linux requires glibc 2.17 or later; macOS x86_64 and Windows 10+ through WSL/WSL2 are listed paths. The container example uses infiniflow/infinity:nightly, bind-mounts /var/infinity, sets --ulimit nofile=500000:500000, and enables host networking. Treat the networking choice as an exposure decision, and verify mount permissions and data retention across container replacement.
A standalone server binary and a source build are also available. For infinity-sdk==0.7.5, use the package's Python requirement of >=3.13,<3.16 rather than relying on the quickstart's broader Python 3.11+ prerequisite. The tagged release progressed from v0.7.4 to v0.7.5, and a nightly is published separately. For reproducible rollout, pin a tested server artifact and verify it with the pinned SDK rather than deploying a floating nightly tag.
RAG and search teams that want full-text, dense, sparse, and multi-vector retrieval with metadata filtering in one self-hosted database and can own its operations.
You need the provider to handle database operations, your hosts do not meet the documented x86_64/AVX2 baseline, or you need verified failover and tenant isolation before you can adopt a system.
Quick Start & Installation
sudo mkdir -p /var/infinity && sudo chown -R $USER /var/infinity docker pull infiniflow/infinity:nightly docker run -d --name infinity -v /var/infinity/:/var/infinity --ulimit nofile=500000:500000 --network=host infiniflow/infinity:nightly
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| infinity ★ | 4.8k | +11 | C++ | Apache-2.0 | Self-hosted C++ database for hybrid text, vector, and tensor retrieval in RAG |
| qdrant | 35.9k | +135 | Rust | Apache-2.0 | Rust vector database for filtered and hybrid RAG retrieval |
| weaviate | 17k | +17 | Go | — | Go vector database for filtered hybrid retrieval in production RAG stacks |
| zvec | 16.3k | +29 | C++ | Apache-2.0 | In-process C++ vector database for local hybrid retrieval |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/infiniflow/infinity.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about infinity
Where does Infinity fit in a RAG pipeline, and how does the application connect?
What CPU, memory, and GPU resources should I budget?
Can we self-host Infinity in a commercial product?
How should we evaluate Infinity against Pinecone?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy