faiss/demos
Matthijs Douze bb4c987b5c Demo of residual quantizer distance computer for LaserKNN (#2283)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2283

This is a demonstration for:

- how to use a distance computer to compute query-to-code distances with a residual quantizer

- how to construct a ResidualCoarseQuantizer that uses a prefix of residalquantizer codes

See related doc https://docs.google.com/document/d/1g97lrMXVYh5FcQzw23v_sUE22ybHfCFxtbHyFJwxKKE/edit?usp=sharing

Reviewed By: alexanderguzhva

Differential Revision: D34958088

fbshipit-source-id: edb06ee350de67f855e96ae57a3862fbf14f6e54
2022-04-06 12:42:24 -07:00
..
CMakeLists.txt Demo of residual quantizer distance computer for LaserKNN (#2283) 2022-04-06 12:42:24 -07:00
README.md
demo_auto_tune.py
demo_client_server_ivf.py Fix faiss_contrib (#1478) 2020-10-20 04:35:19 -07:00
demo_imi_flat.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
demo_imi_pq.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
demo_ivfpq_indexing.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
demo_nndescent.cpp Add NNDescent to faiss (#1654) 2021-02-25 16:48:28 -08:00
demo_ondisk_ivf.py Fix faiss_contrib (#1478) 2020-10-20 04:35:19 -07:00
demo_residual_quantizer.cpp Demo of residual quantizer distance computer for LaserKNN (#2283) 2022-04-06 12:42:24 -07:00
demo_sift1M.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00
demo_weighted_kmeans.cpp Enable clang-format + autofix. 2021-02-25 04:46:10 -08:00

README.md

Demos for a few Faiss functionalities

demo_auto_tune.py

Demonstrates the auto-tuning functionality of Faiss

demo_ondisk_ivf.py

Shows how to construct a Faiss index that stores the inverted file data on disk, eg. when it does not fit in RAM. The script works on a small dataset (sift1M) for demonstration and proceeds in stages:

0: train on the dataset

1-4: build 4 indexes, each containing 1/4 of the dataset. This can be done in parallel on several machines

5: merge the 4 indexes into one that is written directly to disk (needs not to fit in RAM)

6: load and test the index