n2  by kakao

ANN library for fast similarity search on large datasets

created 7 years ago
578 stars

Top 56.8% on sourcepulse

GitHubView on GitHub
Project Summary

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

Highlighted Details

  • Optimized for speed in index build time, search performance, and memory usage.
  • Supports multi-core CPUs for index building.
  • Integrates mmap by default for efficient handling of large index files.
  • Provides Python and Go bindings.

Maintenance & Community

  • Developed by Kakao Corp.
  • Build status indicated by Travis CI.
  • Documentation hosted on Read the Docs.

Licensing & Compatibility

  • Licensed under the Apache 2.0 license.
  • Permissive for commercial use and integration with closed-source projects.

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.

Health Check
Last commit

2 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Zhiqiang Xie Zhiqiang Xie(Author of SGLang), and
7 more.

milvus by milvus-io

0.4%
36k
Cloud-native vector database for scalable ANN search
created 5 years ago
updated 1 day ago
Feedback? Help us improve.