Skip to content
⌘K

hnswlib

Header-only C++/python library for fast approximate nearest neighbors.

health 31contrib –5.4k

Overview & architecture

C++ standard
–
Build systems
–
License
Apache-2.0
Languages
C++
Last release
v0.9.0 · Mar 28, 2026

Repository activity

snapshot Nov 23, 2026
GitHub stars
latest
5.4k▲ 31
Merged PRs (30d)
latest
0
Contributors (90d)
latest
2▲ 1
Issue first response p50
–
No snapshots yet.
242 open issues72 open PRs0 commits (30d)

Recent notable activity

  • RFC / tracking
    Proposal: exact uint8 L2 space returning float (about 2x QPS on SIFT-1M)

    Would an exact uint8 space that returns float distances be welcome upstream? I wrote u8_space.h, a SpaceInterface with a one-byte-per-coordinate payload and exact squared L2 (exact in float32 for dim and could be exposed in the Python…

    #697 · by ToukoUrsin
  • Release
    hnswlib v0.9.0

    Fixed incorrect results in bruteforce search with filter (#514) by @lukaszsmolinski Fixed missing normalization check in BFIndex (#514) by @lukaszsmolinski Throw an exception when fewer than k elements are available (#514) by @lukaszsmolinski Remove unused variable (#531) by @lulyon Change cosine similarity to…

    ilyajob05v0.9.0
  • Release
    hnswlib v0.8.0

    Highlights: Multi-vector document search and epsilon search (for now, only in C++) By default, there is no statistic aggregation, which speeds up the multi-threaded search (it does not seem like people are using it anyway: Issue #495). Various bugfixes and improvements get_items now have return_type parameter, which…

    yurymalkovv0.8.0
  • Release
    hnswlib v0.7.0

    version 0.7.0 Added support to filtering (#402, #430) by @kishorenc Added python interface for filtering (though note its performance is limited by GIL) (#417) by @gtsoukas Added support for replacing the elements that were marked as delete with newly inserted elements (to control the size of the index, #418) by…

    yurymalkovv0.7.0
  • Release
    hnswlib v0.6.2

    Fixed a bug in saving of large pickles. The pickles with > 4GB could have been corrupted. Thanks Kai Wohlfahrt for reporting. Thanks to (@GuyAv46) hnswlib inner product now is more consitent accross architectures (SSE, AVX, etc).

    yurymalkovv0.6.2
  • Release
    hnswlib v0.6.1

    Thanks to (@tony-kuo) hnswlib AVX512 and AVX builds are not backwards-compatible with older SSE and non-AVX512 architectures. Thanks to (@psobot) there is now a sensible message instead of segfault when passing a scalar to get_items. Thanks to (@urigoren) hnswlib has a lazy index creation python wrapper.

    yurymalkovv0.6.1
  • Release
    hnswlib v0.6.0

    Thanks to (@dyashuni) hnswlib now uses github actions for CI, there is a search speedup in some scenarios with deletions. unmark_deleted(label) is now also a part of the python interface (note now it throws an exception for double deletions). Thanks to (@slice4e) we now support AVX512; thanks to (@LTLA) the cmake…

    yurymalkovv0.6.0
  • Release
    hnswlib v0.5.2

    Bugfixes and improvements. Many thanks to: @marekhanus for fixing the missing arguments, adding support for python 3.8, 3.9 in Travis, improving python wrapper and fixing typos/code style; @apoorv-sharma for fixing the bug int the insertion/deletion logic; @shengjun1985 for simplifying the memory reallocation logic;…

    yurymalkovv0.5.2
  • Release
    hnswlib v0.5.0

    Added support for pickling indices, support for PEP-517 and PEP-518 building, small speedups, bugfixes and documentation improvements. The setup.py file now resides in the root. Many thanks to @dbespalov, @dyashuni, @groodt, @uestc-lfs, @vinnitu, @fabiencastan, @JinHai-CN, @js1010!

    yurymalkovv0.5.0

Stories

Major changeFor you

hnswlib: Proposal: exact uint8 L2 space returning float (about 2x QPS on SIFT-1M)

Would an exact uint8 space that returns float distances be welcome upstream? I wrote u8_space.h, a SpaceInterface with a one-byte-per-coordinate payload and exact squared L2 (exact in float32 for dim and could be exposed in the Python…

Why it matters: An open RFC/proposal that is still up for discussion. hnswlib is in AI & Accelerated Computing (one of your focus areas).

Maintainers & organizations

every claim links to its source

Maintainers

No maintainers recorded yet.

Top contributors

Releases & changelog

  • hnswlib v0.10.0-rc.2pre-release / patch

    What's Changed Prepare v0.10.0-rc.2: fix rc.1 by @ilyajob05 in Full Changelog:

  • hnswlib v0.10.0-rc.1pre-release / patch

    What's Changed Optional no-exceptions C++ API: *NoExceptions methods return Status / StatusOr so the headers can be compiled with -fno-exceptions (-DHNSWLIB_ENABLE_EXCEPTIONS=OFF). Throwing methods remain the default. (#619, #678) by @michaelbautin Stream saveIndex / loadIndex over std::ostream / std::istream, plus…

  • hnswlib v0.9.0major

    Fixed incorrect results in bruteforce search with filter (#514) by @lukaszsmolinski Fixed missing normalization check in BFIndex (#514) by @lukaszsmolinski Throw an exception when fewer than k elements are available (#514) by @lukaszsmolinski Remove unused variable (#531) by @lulyon Change cosine similarity to…

  • hnswlib v0.8.0major

    Highlights: Multi-vector document search and epsilon search (for now, only in C++) By default, there is no statistic aggregation, which speeds up the multi-threaded search (it does not seem like people are using it anyway: Issue #495). Various bugfixes and improvements get_items now have return_type parameter, which…

  • hnswlib v0.7.0major

    version 0.7.0 Added support to filtering (#402, #430) by @kishorenc Added python interface for filtering (though note its performance is limited by GIL) (#417) by @gtsoukas Added support for replacing the elements that were marked as delete with newly inserted elements (to control the size of the index, #418) by…

  • hnswlib v0.6.2

    Fixed a bug in saving of large pickles. The pickles with > 4GB could have been corrupted. Thanks Kai Wohlfahrt for reporting. Thanks to (@GuyAv46) hnswlib inner product now is more consitent accross architectures (SSE, AVX, etc).

  • hnswlib v0.6.1

    Thanks to (@tony-kuo) hnswlib AVX512 and AVX builds are not backwards-compatible with older SSE and non-AVX512 architectures. Thanks to (@psobot) there is now a sensible message instead of segfault when passing a scalar to get_items. Thanks to (@urigoren) hnswlib has a lazy index creation python wrapper.

  • hnswlib v0.6.0major

    Thanks to (@dyashuni) hnswlib now uses github actions for CI, there is a search speedup in some scenarios with deletions. unmark_deleted(label) is now also a part of the python interface (note now it throws an exception for double deletions). Thanks to (@slice4e) we now support AVX512; thanks to (@LTLA) the cmake…

  • hnswlib v0.5.2

    Bugfixes and improvements. Many thanks to: @marekhanus for fixing the missing arguments, adding support for python 3.8, 3.9 in Travis, improving python wrapper and fixing typos/code style; @apoorv-sharma for fixing the bug int the insertion/deletion logic; @shengjun1985 for simplifying the memory reallocation logic;…

  • hnswlib v0.5.0major

    Added support for pickling indices, support for PEP-517 and PEP-518 building, small speedups, bugfixes and documentation improvements. The setup.py file now resides in the root. Many thanks to @dbespalov, @dyashuni, @groodt, @uestc-lfs, @vinnitu, @fabiencastan, @JinHai-CN, @js1010!

Contribution opportunities

0 published

No published opportunities

Cards are published only for real, open, unassigned issues with maintainer engagement. Contribution scanning is off for this project.

Why this score

Health 31Contribution friendliness –computed 20h ago
  • Activity0.00
    0 merged PRs in 30 days (full marks at 20); 0 commits in 30 days (full marks at 60) [health score: no data for maintainer responsiveness, backlog pressure; weights renormalized]health
  • Onboarding0.25
    has CI; missing contributing guide, mainstream build (CMake/Bazel/Meson), docs sitecontrib
  • Release cadence0.67
    last release 239 days ago (full marks within 90, zero after 730); 3 releases in 365 days (full marks at 4) [health score: no data for maintainer responsiveness, backlog pressure; weights renormalized]health
  • Contributor breadth0.41
    2 unique contributors in 90 days (full marks at 25); top contributor has 59% of commits; stars count for at most 5% of this signal [health score: no data for maintainer responsiveness, backlog pressure; weights renormalized]health

Each signal is normalized to 0–1 with fixed thresholds; scores are weighted sums × 100. Stars are not an input.

Maintain, review, build and signals

other opportunities that concern this project
  • RFC / designhnswlibOct 10, 2026

    Would an exact uint8 space that returns float distances be welcome upstream? I wrote u8_space.h, a SpaceInterface with a one-byte-per-coordinate payload and exact squared L2 (exact in float32 for dim and could be exposed in the Python bindings (the existing L2SpaceI returns int, so it needs HierarchicalNSW ). On ANN-Benchmarks SIFT-128 (1M vectors, 10k official queries, M=22, efC=200, ef=42)…

    issueupdated 42d ago0 comments