A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/erikbern/ann-benchmarks below:

erikbern/ann-benchmarks: Benchmarks of approximate nearest neighbor libraries in Python

Benchmarking nearest neighbors

Doing fast searching of nearest neighbors in high dimensional spaces is an increasingly important problem with notably few empirical attempts at comparing approaches in an objective way, despite a clear need for such to drive optimization forward.

This project contains tools to benchmark various implementations of approximate nearest neighbor (ANN) search for selected metrics. We have pre-generated datasets (in HDF5 format) and prepared Docker containers for each algorithm, as well as a test suite to verify function integrity.

We have a number of precomputed data sets in HDF5 format. All data sets have been pre-split into train/test and include ground truth data for the top-100 nearest neighbors.

Dataset Dimensions Train size Test size Neighbors Distance Download DEEP1B 96 9,990,000 10,000 100 Angular HDF5 (3.6GB) Fashion-MNIST 784 60,000 10,000 100 Euclidean HDF5 (217MB) GIST 960 1,000,000 1,000 100 Euclidean HDF5 (3.6GB) GloVe 25 1,183,514 10,000 100 Angular HDF5 (121MB) GloVe 50 1,183,514 10,000 100 Angular HDF5 (235MB) GloVe 100 1,183,514 10,000 100 Angular HDF5 (463MB) GloVe 200 1,183,514 10,000 100 Angular HDF5 (918MB) Kosarak 27,983 74,962 500 100 Jaccard HDF5 (33MB) MNIST 784 60,000 10,000 100 Euclidean HDF5 (217MB) MovieLens-10M 65,134 69,363 500 100 Jaccard HDF5 (63MB) NYTimes 256 290,000 10,000 100 Angular HDF5 (301MB) SIFT 128 1,000,000 10,000 100 Euclidean HDF5 (501MB) Last.fm 65 292,385 50,000 100 Angular HDF5 (135MB) COCO-I2I 512 113,287 10,000 100 Angular HDF5 (136MB) COCO-T2I 512 113,287 10,000 100 Angular HDF5 (136MB)

These are all as of April 2025, running all benchmarks on a r6i.16xlarge machine on AWS with --parallelism 31 and hyperthreading disabled. All benchmarks are single-CPU.

fashion-mnist-784-euclidean

TODO: update plots on http://ann-benchmarks.com.

The only prerequisite is Python (tested with 3.10.6) and Docker.

  1. Clone the repo.
  2. Run pip install -r requirements.txt.
  3. Run python install.py to build all the libraries inside Docker containers (this can take a while, like 10-30 minutes).
  1. Run python run.py (this can take an extremely long time, potentially days).
  2. Run python plot.py --x-scale logit --y-scale log to plot results.
  3. Run python create_website.py to create a website with lots of plots.

You can customize the algorithms and datasets as follows:

Add your algorithm in the folder ann_benchmarks/algorithms/{YOUR_IMPLEMENTATION}/ by providing

Check the available implementations for inspiration.

Built by Erik Bernhardsson with significant contributions from Martin Aumüller and Alexander Faithfull.

Design principles behind the benchmarking framework are described in the following publications:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4