unum-cloud/USearch
Embeddable C++ proximity-graph index for vector retrieval across RAM, VRAM, and NVMe
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
USearch is an embeddable approximate nearest-neighbor index built around a proximity graph. Its header-only C++23 core has a basic RAM tier that needs only the standard library. The native index specializes traversal by modality, residency, stored scalar, and metric; builds select kernel families, and runtime detection selects a supported hardware path unless the caller pins one. Mixed-precision numerical kernels come from NumKong. Shards partition entries rather than replicate the graph: RAM shards follow memory domains, VRAM shards follow devices, and NVMe views follow checkpoint parts.
Bindings share a C ABI with typed buffers. The index holds the graph, an executor schedules work, and an optional reusable arena owns variable-sized output buffers. CPU workers overlap independent walks, GPU warps cooperate on candidate scoring, and NVMe walks yield while reads complete through paths such as io_uring or SPDK. SafeGraphs serializes keys, vectors, norms, and links, so a compatible checkpoint can move between residency tiers without a format rewrite.
Key Capabilities & Differentiators
Dense retrieval supports inner-product, angular, Euclidean, Hamming, and Jaccard metrics, with storage options including BF16, 8-bit integers, and packed bits. Public keys are 128-bit and can identify multiple vectors. Adjacency uses 32-bit internal node IDs, allowing roughly four billion entries per shard before more shards are needed. RAM insertion batches publish complete entries and keys through per-shard watermarks. Queries can overlap insertion or refinement, but those two write operations take turns.
Online insertion greedily links each new entry; a separate refinement pass scans stored entries and rewires neighborhoods to improve navigability beyond what incremental insertion can achieve. The graph can also serve as a sparse operand for products, MaxSim scoring, and softmax attention. Sequence, shape, and geospatial indexes are experimental and open read-only on NVMe. Apple GPU support is narrower: shapes are f16-only, and geospatial sets and attention are not supported.
Trade-offs & Limitations
USearch is a strong fit when the application should own the index and keep retrieval local. Treat it as the retrieval component, not as a turnkey replacement for a managed service such as Pinecone: plan separately for document and metadata storage, API access, backups, and availability. Residency changes query semantics as well as placement. RAM and NVMe can admit results through a host predicate while excluded entries still route the walk; GPU traversal cannot execute that predicate. If filtering defines the candidate set, GPU top-k followed by application-side filtering is not equivalent and may return too few eligible hits.
The SIFT 100M results show why build time and serving throughput should be evaluated separately. On 192 AWS Graviton5 cores, USearch built at 161,952 vectors/s and searched at 173,823 QPS; FAISS HNSW built at 84,536 vectors/s and searched at 178,600 QPS. Their 1-recall@10 was 0.9925 and 0.9917, respectively. That is a close-recall comparison for one dataset, not a production latency forecast. Benchmark with your embeddings, metric, filter selectivity, and batch sizes before choosing a configuration.
Hardware & Deployment Guide
Start with the embedded RAM path for local development: the Python package installs with pip install usearch, and the supplied pyproject.toml requires Python 3.12 or newer and uses scikit-build-core>=0.11 for native wheel builds. The npm package requires Node.js 22 or newer and uses bindings and node-gyp-build. Check wheel or native package availability for the actual platform instead of assuming all build targets ship. C++ consumers can use the header-only core with a C++23 toolchain.
For a self-hosted API, the embedded path lets you put your own service around the index. A v2.26.6 release entry mentions installing server-image Python packages in a virtual environment, but does not specify an image reference or API contract. That release also records GCC 16 and macOS 14 kernel compatibility work; v2.26.5 added C library and header install targets. Size the deployment using measured recall, tail latency, and peak memory under both build and query load. For NVMe, test the chosen I/O path and allow disk headroom for new parts during refinement or resharding.
Local or self-hosted RAG that already has a document store and needs an embeddable dense-vector index with control over storage precision and residency.
You need a turnkey managed vector service, in-traversal GPU metadata filtering, or production guarantees for the experimental non-dense modalities.
Quick Start & Installation
pip install usearchComparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| USearch ★ | 4.4k | +19 | C++ | Apache-2.0 | Embeddable C++ proximity-graph index for vector retrieval across RAM, VRAM, and |
| 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 |
| pgvector | 23.9k | +96 | C | — | PostgreSQL extension for exact and approximate vector search alongside relationa |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/unum-cloud/USearch.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about USearch
How should I integrate USearch into a RAG application?
Do I need a GPU, and how should I size RAM or VRAM?
Can I self-host USearch in a commercial product?
When should I choose USearch over Pinecone or FAISS?
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