awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
nmslib avatar

nmslib/hnswlib

0
View on GitHub↗
5,253 stars·831 forks·C++·Apache-2.0·17 viewsgithub.com/nmslib/hnswlib↗

Hnswlib

hnswlib is a header-only C++ library and vector indexing engine designed for high-dimensional approximate nearest neighbor search. It organizes large collections of embeddings into a searchable graph structure to enable rapid proximity queries and distance calculations.

The system utilizes Hierarchical Navigable Small World graphs to achieve fast vector similarity search. It distinguishes itself by allowing the definition of custom distance metrics and similarity functions to adapt calculations to specific data requirements.

The engine covers the full indexing lifecycle, including incremental index construction and the management of data points through additions and element removal. Query capabilities include both approximate and exact nearest neighbor search, supplemented by boolean search filtering to exclude candidates based on element labels.

The library supports index persistence via binary file serialization and provides configurations for parallel execution to distribute query and indexing tasks across multiple CPU cores.

Features

  • Hierarchical Proximity Graphs - Utilizes Hierarchical Navigable Small World graphs to achieve logarithmic search complexity through coarse-to-fine navigation.
  • Vector Indexing - Implements a high-performance indexing engine specifically designed for high-dimensional vector data and similarity search.
  • Vector Similarity Search - Implements algorithms and data structures for performing similarity search on high-dimensional vector embeddings.
  • Approximate Nearest Neighbor Search - Utilizes Hierarchical Navigable Small World graphs to trade absolute precision for significantly faster proximity lookups.
  • Graph - Constructs hierarchical proximity graphs by configuring link density to balance memory usage and retrieval recall.
  • Vector Indexing Engines - Acts as a high-performance engine for organizing vectors to enable rapid proximity queries and distance calculations.
  • HNSW Indexes - Provides a high-performance implementation of Hierarchical Navigable Small World (HNSW) indexes for approximate nearest neighbor search.
  • Incremental Vector Sync - Supports incremental index management by adding or removing elements without requiring a full rebuild.
  • Nearest Neighbor Searches - Implements algorithms for finding the closest vectors in high-dimensional space based on distance calculations.
  • Vector Distance Metrics - Provides the mathematical framework for implementing specialized similarity functions between high-dimensional vectors.
  • Customizable Distance Metrics - Allows the definition of custom similarity functions to adapt distance calculations to specific data requirements.
  • Greedy Graph Search - Implements greedy search traversal to efficiently navigate the graph layers toward the closest vector.
  • Header-only Libraries - Distributed as a header-only C++ library to enable compiler inlining and simplify integration.
  • Search Index Deletions - Allows for the removal of specific data points from the search index via unique identifiers.
  • Incremental Indexing Engines - Supports adding and updating vectors within the index without necessitating a full rebuild of the graph structure.
  • Index Persistence Utilities - Enables saving and loading the current index state to binary files for persistence across sessions.
  • Search Index Management - Includes tools for managing the index lifecycle, including marking elements as deleted to reclaim memory.
  • Dynamic Index Updating - Provides mechanisms to update index content and replace elements to ensure the dataset remains current.
  • Vector Databases - Provides the core indexing and retrieval layer necessary for building high-performance vector databases.
  • Multi-threaded Execution - Distributes independent search and indexing requests across multiple CPU cores to increase throughput.
  • Template-Based Metrics - Uses C++ template polymorphism to inject custom similarity functions without the overhead of virtual function calls.
  • AI & Machine Learning - Fast approximate nearest neighbors library
  • Machine Learning - Fast approximate nearest neighbor search library.

Star history

Star history chart for nmslib/hnswlibStar history chart for nmslib/hnswlib

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does nmslib/hnswlib do?

hnswlib is a header-only C++ library and vector indexing engine designed for high-dimensional approximate nearest neighbor search. It organizes large collections of embeddings into a searchable graph structure to enable rapid proximity queries and distance calculations.

What are the main features of nmslib/hnswlib?

The main features of nmslib/hnswlib are: Hierarchical Proximity Graphs, Vector Indexing, Vector Similarity Search, Approximate Nearest Neighbor Search, Graph, Vector Indexing Engines, HNSW Indexes, Incremental Vector Sync.

What are some open-source alternatives to nmslib/hnswlib?

Open-source alternatives to nmslib/hnswlib include: nmslib/hnsw — This project is a C++ vector similarity engine and implementation of the Hierarchical Navigable Small World algorithm.… unum-cloud/usearch — USearch is a high-performance vector similarity search engine and approximate nearest neighbor index designed for… lancedb/lancedb — LanceDB is a vector database and columnar data store designed to function as a versioned dataset manager and vector… alibaba/zvec — zvec is an embedded vector database engine and indexing library designed for high-dimensional similarity search. It… hora-search/hora — Hora is a vector similarity search library written in Rust designed for efficient approximate nearest neighbor… microsoft/sptag — SPTAG is a vector approximate nearest neighbor search library and distributed vector search engine. It provides a…

Open-source alternatives to Hnswlib

Similar open-source projects, ranked by how many features they share with Hnswlib.
  • nmslib/hnswnmslib avatar

    nmslib/hnsw

    5,257View on GitHub↗

    This project is a C++ vector similarity engine and implementation of the Hierarchical Navigable Small World algorithm. It provides a header-only library for performing approximate nearest neighbor searches in high-dimensional spaces, alongside Python bindings that expose these indexing and search capabilities to data science environments. The engine enables real-time embedding retrieval and high-dimensional similarity search using a multi-layered graph structure to balance search speed and accuracy. It supports custom distance metrics to calculate similarity between vectors in various mathema

    C++
    View on GitHub↗5,257
  • unum-cloud/usearchunum-cloud avatar

    unum-cloud/USearch

    3,888View on GitHub↗

    USearch is a high-performance vector similarity search engine and approximate nearest neighbor index designed for dense embeddings. It functions as a low-level vector database core and high-dimensional vector indexer, providing the primitives necessary to store and retrieve vectors across massive datasets. The engine distinguishes itself through hardware-level SIMD acceleration for distance kernels and a proximity-graph indexing system that enables fast retrieval across billions of vectors. It supports multi-precision vector quantization to balance memory usage and accuracy, and utilizes memo

    C++approximate-nearest-neighbor-searchclusteringdatabase
    View on GitHub↗3,888
  • lancedb/lancedblancedb avatar

    lancedb/lancedb

    9,031View on GitHub↗

    LanceDB is a vector database and columnar data store designed to function as a versioned dataset manager and vector search engine. It serves as a high-performance backend for indexing and retrieving high-dimensional embeddings, providing the foundation for machine learning data pipelines. The system distinguishes itself through a combination of cloud-native object storage and immutable version tracking, allowing for data time-travel and reproducible AI experiments. It integrates hybrid search capabilities, merging dense vector similarity with BM25 full-text search and SQL-like scalar filters

    HTMLapproximate-nearest-neighbor-searchimage-searchnearest-neighbor-search
    View on GitHub↗9,031
  • alibaba/zvecalibaba avatar

    alibaba/zvec

    5,198View on GitHub↗

    zvec is an embedded vector database engine and indexing library designed for high-dimensional similarity search. It functions as a hybrid search engine and a retrieval-augmented generation knowledge base, allowing for the storage and retrieval of dense and sparse vectors. The system is distinguished by its hybrid retrieval pipeline, which fuses vector similarity, full-text keyword matching, and scalar metadata filtering into single query operations. It supports a plugin-based model integration system for registering custom embedding models and rerankers, as well as language bindings for nativ

    C++ann-searchembedded-databaserag
    View on GitHub↗5,198
  • See all 30 alternatives to Hnswlib→