USearch
Open-source single-file similarity search and clustering engine for vectors, with native bindings for many programming languages.
At a Glance
About USearch
USearch is an open-source similarity search and clustering engine from Unum Cloud. It implements the HNSW algorithm in a single C++11 header library and ships native bindings for languages including Python, JavaScript, Rust, Java, Go, C#, Swift and others. The project is released under the Apache 2.0 license.
What It Is
USearch is a vector search engine for approximate nearest-neighbor lookup. You create an index with a chosen dimensionality, metric and storage type, add vectors under integer keys, and query for the nearest matches. It also supports exact brute-force search for smaller collections, K-Nearest Neighbors clustering with sub-clustering, and approximate fuzzy or semantic joins between two indexes.
Metrics, Precision and Memory
Beyond the standard cosine, inner-product and L2 metrics, USearch accepts user-defined metrics, including ones written in Python with Numba and JIT-compiled. Haversine distance and binary Tanimoto and Sorensen coefficients are available for geospatial, chemistry and genomics work. Vectors can be stored in types from f64 down to bf16, f16, Float8, Float6, i8 and single-bit, and a uint40 neighbor type allows indexes beyond 4 billion entries. Predicate functions can filter results during graph traversal.
Serving and Deployment
Indexes can be saved to files, streams or buffers, and large indexes can be viewed from disk through memory mapping without loading them into RAM. Multiple smaller indexes can be searched together for very large workloads. An index built in one language can be queried from another. The README lists Linux, macOS, Windows, iOS, Android, WebAssembly and SQLite as supported targets.
Performance Claims and Integrations
Unum states that USearch is faster than FAISS, reporting for example 105,000 vec/s versus 5,500 vec/s on 96-dimensional vectors in its own benchmarks. The README lists integrations or usage in ClickHouse, DuckDB, ScyllaDB, TiDB, YugabyteDB, Memgraph, LangChain, Semantic Kernel and Sentence-Transformers. Documented examples include multimodal text-to-image search with UForm and UCall, molecular search with RDKit, and geospatial search.
Community Discussions
Be the first to start a conversation about USearch
Share your experience with USearch, ask questions, or help others learn from your insights.
Pricing
Open Source
USearch core engine released under the Apache License 2.0 (OSI-approved), free to use, modify and distribute.
- Apache License 2.0
- Single-file C++11 header library
- Native bindings for C++, Python, JavaScript, Java, Rust, Go, C#, Swift, Objective-C, Wolfram and other languages
- SIMD-optimized kernels with user-defined metrics
Capabilities
Key Features
- HNSW approximate nearest-neighbor search
- Exact brute-force search
- User-defined metrics with JIT compilation
- Half- and quarter-precision quantization (bf16, f16, Float8, Float6, i8, b1)
- Serve large indexes from disk via memory mapping
- Predicate filtering during graph traversal
- K-Nearest Neighbors clustering and sub-clustering
- Approximate fuzzy and semantic joins
- Multi-index lookups
- uint40 neighbor IDs for 4B+ entries
- Native bindings for many languages
- Binary Tanimoto and Sorensen metrics
