HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nmslib
hnswlib
C++2018–2024
nmslib / hnswlib

hnswlib

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

10Distinct people
12Mentions
1Explicit recommenders
5.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

https://github.com/nmslib/hnswlib Used it to index 40M text snippets in the legal domain. Allows incremental adding. I love how it just works. You know, doesn’t ANNOY me or…

leobg used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year12 dated mentions

Observed mentions: 2018-11-20 11:24:36 UTC to 2024-05-02 16:55:34 UTC.

0123452018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC303
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC514
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC211

What Hacker News says

12 sources
zcesur·May 2, 2024Submission

Show HN: I built vector search for COSS podcasts & livestreams

Hey HN! I built COSSgpt using videos from the Open Source Founder Podcast [1] and livestreams from COSS Office Hours [2][3] I transcribed the VODs using Whisper and vectorized fixed-size segments from the transcripts with MPNet on Replicate GPUs. I made these segments overlap a little to prevent semantic meaning being lost inbetween segments Then I indexed the vectors using HNSWLib in-memory vectorstore [4] and persisted the entire vectorstore into Tigris object storage [5] to cache multimedia and vectors across all Fly.io regions I built the app in Elixir, almost entirely server-side rendered with minimal diffs sent to the client over WebSockets using Phoenix LiveView. I also used Livebook [6] a ton when I was building the multimedia processing & ML pipeline. I'm super bullish on Elixir for building webapps and/or MLops! Let me know what
Read the rest
2 points · Open discussion
sebmnt·Nov 9, 2023Submission

Show HN: Moodflix – a movie recommendation engine based on your mood

Last week I released Moodflix (https://moodflix.streamlit.app), a movie recommendation engine based to find movies based on your mood. Moodflix was created on top of a movie dataset of 10k movies from The Movie Database. I vectorised the films using Hugging Face's T5 model (https://huggingface.co/docs/transformers/model_doc/t5) using the film's plot synopsis, genres and languages. Then I indexed the vectors using hnswlib (https://github.com/nmslib/hnswlib). LLMs can understand a movie's plot pretty well and distill the similarities between a user's query (mood) to the movie's plot and genres. I have got feedback from close friends around linking movies to other review sites like IMDB or Rotten Tomatoes, linking movies to sites to stream the movie and adding movie posters. I would also love to hear from the community what things you like,
Read the rest
what you want to see and what things you consider can be improved.
6 points · Open discussion
hnswlib (https://github.com/nmslib/hnswlib) is a strong alternative to faiss that I have enjoyed using for multiple projects. It is simple and has great performance on CPU. After working through several projects that utilized local hnswlib and different databases for text and vector persistence, I integrated hnswlib with sqlite to create an embedded vector search engine that can easily scale up to millions of embeddings. For self-hosted situations of under 10M embeddings and less than insane throughput I think this combo is hard to beat. https://github.com/jiggy-ai/hnsqlite
In Faiss: A library for efficient similarity search
great post and my favorite CS topic, LSH is particularly relevant to machine learning because of its use in indexing of embeddings, which are now omnipresent in ML (from word2vec to transformers to image and graph embeddings etc, etc.) it is now supported in ElasticSearch KNN index (they use HNSWLIB but you can call it a descendant of original LSH in a way) check out ANN benchmarks [0] for comparison of LSH performance to other state of the art methods like proximity graphs/HNSWLIB [1] and quantization/SCANN [2] As an introduction LSH (with MinHash) is also described in detail in the book "Mining Of Massive Datasets", ch.3, "Finding Similar items", highly recommended [3] if you want to play with LSH, python "annoy" library is the best place to start [4] [0] https://github.com/erikbern/ann-benchmarks [1] https://github.com/google-research/
Read the rest
In Introduction to Locality-Sensitive Hashing

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.