• Home
  • Categories
  • Tags
  • Pricing
  • Submit
  1. Home
  2. Sdks & Libraries
  3. HNSWLIB

HNSWLIB

HNSWLIB is a C++ library with Python bindings for fast approximate nearest neighbor search using Hierarchical Navigable Small World (HNSW) graphs, commonly used in vector database backends.

🌐Visit Website

About this tool

HNSWLIB

HNSWLIB is a header-only C++ library with Python bindings for fast approximate nearest neighbor (ANN) search using Hierarchical Navigable Small World (HNSW) graphs.

Features

  • Fast Approximate Nearest Neighbor Search: Implements the HNSW algorithm for efficient high-dimensional vector search.
  • Header-only C++ Implementation: No dependencies other than C++11.
  • Python Bindings: Full support for Python with picklable index objects.
  • Incremental Index Construction: Supports adding, updating, and deleting elements from the index.
  • Multi-threading Support: Multi-threaded index construction and search; configurable number of threads.
  • Custom Distances: C++ interface allows user-defined distance functions.
  • Supported Distance Metrics:
    • Squared L2 ('l2')
    • Inner Product ('ip')
    • Cosine Similarity ('cosine')
  • Filtering Support: Ability to filter search results by element labels.
  • Efficient Memory Usage: Lower memory footprint and faster build time compared to some alternatives.
  • Serialization/Deserialization: Save/load indexes to/from disk; supports pickle in Python.
  • Replace Deleted Elements: Option to reuse memory of deleted elements.
  • Index Resizing: Dynamically increase/shrink the index capacity.
  • Multi-vector Document Search and Epsilon Search: Available in C++ interface.
  • Java and R Support: External bindings available.
  • Cross-platform: Usable in C++ and Python environments; external implementations for other languages (Go, Julia, Rust, Java, .NET, etc.).

Usage Highlights

  • Create, initialize, and manage ANN indexes in both C++ and Python.
  • Insert, update, delete, and query vectors.
  • Batch operations for both insertions and queries.
  • Save/load indexes for persistence and scaling.
  • Fine-tune speed/accuracy trade-offs with parameters like ef and M.

Installation

  • Install via pip: pip install hnswlib
  • Or build from source (see GitHub for details).

License

  • Apache-2.0

Pricing

  • Open Source: Free to use under the Apache-2.0 license.

Resources

  • GitHub Repository
  • Documentation & Examples
  • HNSW Paper
Surveys

Loading more......

Information

Websitegithub.com
PublishedMay 13, 2025

Categories

1 Item
Sdks & Libraries

Tags

4 Items
#open-source
#ANN
#HNSW
#vector search

Similar Products

6 result(s)
Voyager

Voyager is a Spotify open-source vector search library and service for efficient nearest neighbor search on large-scale vector datasets.

Annoy

An open-source library for approximate nearest neighbor search in high-dimensional spaces, often used as a backend for vector databases and search engines.

ScaNN

A library by Google Research for efficient vector similarity search, suitable for large-scale nearest neighbor applications in AI.

KGraph

KGraph is an open-source library for fast approximate nearest neighbor search in high-dimensional vector spaces, applicable to vector database solutions.

MRPT

MRPT (Multi-Resolution Proximity Trees) is an open-source library for fast approximate nearest neighbor search in high-dimensional vector spaces, applicable to vector database backends.

NGT

NGT (Neighborhood Graph and Tree) is an open-source vector search engine designed for fast and scalable approximate nearest neighbor search.

Built with
Ever Works
Ever Works

Connect with us

Stay Updated

Get the latest updates and exclusive content delivered to your inbox.

Product

  • Categories
  • Tags
  • Pricing
  • Help

Clients

  • Sign In
  • Register
  • Forgot password?

Company

  • About Us
  • Admin
  • Sitemap

Resources

  • Blog
  • Submit
  • API Documentation
All product names, logos, and brands are the property of their respective owners. All company, product, and service names used in this repository, related repositories, and associated websites are for identification purposes only. The use of these names, logos, and brands does not imply endorsement, affiliation, or sponsorship. This directory may include content generated by artificial intelligence.
Copyright © 2025 Acme. All rights reserved.·Terms of Service·Privacy Policy·Cookies