# Repository Briefing: unum-cloud/USearch
> Source: https://repoforai.com/repo/unum-cloud/USearch (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/unum-cloud/USearch
- **Official Docs / Website**: https://www.unum.cloud/docs/usearch
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: C++
- **License**: Apache-2.0
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.26.6 (2026-10-25) — https://github.com/unum-cloud/USearch/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Self-Hosted, Local AI, API, GPU
- **Momentum**: 4,413 ★ total (+0 24h / +19 7d) · 388 forks
- **Topics**: `kann`, `vector-search`, `approximate-nearest-neighbor-search`, `simd`, `search`, `similarity-search`, `database`, `faiss`, `search-engine`, `webassembly`, `clustering`, `nearest-neighbor-search`
- **When to Use**: Best for: 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. Skip if: You need a turnkey managed vector service, in-traversal GPU metadata filtering, or production guarantees for the experimental non-dense modalities.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Embedding: Header-only C++23 core with a standard-library-only basic RAM tier, a C ABI, and language bindings.
- Key layout: Public 128-bit keys support multiple vectors per key; compact 32-bit node IDs keep adjacency storage separate from key width.
- Persistence: SafeGraphs checkpoints carry keys, vectors, norms, and graph links across supported RAM, VRAM, and NVMe paths.
- Update model: RAM batches publish complete entries through shard watermarks; incremental insertion and graph-wide refinement are separate operations.
- Hardware boundary: GPU traversal does not accept host predicates; Apple GPU paths also omit attention and geospatial sets.
- NVMe maintenance: Dense refinement and resharding write new parts rather than modifying live parts in place; non-dense checkpoints are read-only.
```

## Quick Start / Clone
```bash
pip install usearch
```
