{"id":13532227,"url":"https://github.com/granne/granne","last_synced_at":"2025-04-01T20:31:36.122Z","repository":{"id":51233345,"uuid":"226289498","full_name":"granne/granne","owner":"granne","description":"Graph-based Approximate Nearest Neighbor Search","archived":false,"fork":false,"pushed_at":"2024-07-08T15:36:08.000Z","size":785,"stargazers_count":318,"open_issues_count":10,"forks_count":25,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-06T23:35:30.793Z","etag":null,"topics":["approximate-nearest-neighbor-search","hnsw","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/granne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-06T09:12:47.000Z","updated_at":"2025-02-16T12:47:02.000Z","dependencies_parsed_at":"2024-01-14T01:17:43.051Z","dependency_job_id":"725c833f-e2f5-4d8a-aeb8-8f79cf6ed3c1","html_url":"https://github.com/granne/granne","commit_stats":{"total_commits":195,"total_committers":6,"mean_commits":32.5,"dds":0.3538461538461538,"last_synced_commit":"5f3ea2ef6cf33e868ce3b806efd80fc3cfb86e54"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/granne%2Fgranne","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/granne%2Fgranne/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/granne%2Fgranne/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/granne%2Fgranne/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/granne","download_url":"https://codeload.github.com/granne/granne/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709923,"owners_count":20821297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["approximate-nearest-neighbor-search","hnsw","rust"],"created_at":"2024-08-01T07:01:09.218Z","updated_at":"2025-04-01T20:31:31.105Z","avatar_url":"https://github.com/granne.png","language":"Rust","funding_links":[],"categories":["Rust","Awesome Vector Search Engine","Search"],"sub_categories":["Library"],"readme":"granne\\*\n----\n\n[![Crates.io](https://img.shields.io/crates/v/granne.svg)](https://crates.io/crates/granne)\n[![documentation](https://docs.rs/granne/badge.svg)](https://docs.rs/granne)\n[![license](http://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n**granne** (**g**raph-based **r**etrieval of **a**pproximate **n**earest **ne**ighbors) is a Rust library for approximate nearest neighbor search based on [Hierarchical Navigable Small World (HNSW) graphs](https://arxiv.org/abs/1603.09320) and is used in [Cliqz Search](https://beta.cliqz.com). It focuses on reducing memory usage in order to allow [indexing billions of vectors](https://0x65.dev/blog/2019-12-07/indexing-billions-of-text-vectors.html).\n\n## Features\n- Memory-mapped\n- Multithreaded index creation\n- Extensible indexes (add elements to an already built index)\n- Python bindings\n- Dense `float` or `int8` elements (cosine distance)\n\n## Installation\n\n#### Requirements\n\nYou will need to have `Rust` installed. This can be done by calling:\n```\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\nOr by visiting https://rustup.rs/ and following the instructions there.\n\n#### Rust\n\n```\n# build\ncargo build --release\n\n# test\ncargo test\n\n# bench\ncargo +nightly bench\n```\n\n#### Python\n\nSee [Python Bindings](py).\n\n#### Optional Requirements\n\ngranne can use `BLAS` (https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) to improve speed of some computations. On Debian/Ubuntu both `libblas-dev` and `libopenblas-dev` should work, with the latter being significantly faster.\n\n`BLAS` can be enabled by passing the `blas` feature during compilation, e.g.\n```\ncargo build --release --features \"blas\"\n```\n\nOn Mac OS there seems to be some issue ([maybe\nthis one](https://grokbase.com/t/r/r-sig-mac/106pkkknqd/problems-with-single-precision-routines-in-64-bit-veclib-blas))\nwith the default `BLAS` library. A workaround is to install e.g. `openblas` and link to that instead.\n\n----\n\\***granne** is Swedish and means **neighbor**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgranne%2Fgranne","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgranne%2Fgranne","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgranne%2Fgranne/lists"}