n2  by kakao

ANN library for fast similarity search on large datasets

Created 7 years ago
578 stars

Top 56.0% 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

Inactive

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

Explore Similar Projects

Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Simon Willison Simon Willison(Coauthor of Django), and
1 more.

faiss_tips by matsui528

0.2%
622
Faiss tips and tricks
Created 7 years ago
Updated 2 weeks ago
Feedback? Help us improve.