ANN library for fast similarity search on large datasets
Top 56.8% on sourcepulse
N2 is a lightweight, C++ based approximate nearest neighbor (aNN) library designed for high-speed performance on large datasets. It targets researchers and engineers working with vector similarity search, offering an alternative to existing libraries like Annoy and NMSLIB by aiming to combine their strengths and mitigate weaknesses.
How It Works
N2 implements a Hierarchical Navigable Small World (HNSW) graph-based algorithm, a well-established approach for efficient aNN search. Its C++ core is optimized for speed and memory usage, with features like multi-core parallelism for index building and mmap
support for handling large index files efficiently. The library supports "angular", "L2" (squared Euclidean), and "dot" product distance metrics.
Quick Start & Requirements
pip install n2
Highlighted Details
mmap
by default for efficient handling of large index files.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The README notes that N2 version 0.1.6 was used in ann-benchmarks.com as of October 2020, suggesting potential for performance improvements and changes since that benchmark.
2 years ago
1 week