Commit Graph

1 Commits (e7d5577dd021824d738c52bde3933ccde7c94065)

Author SHA1 Message Date
Alexandr Guzhva b9bf2490a3 Add facilities for approximate evaluation of min-k distances via heap. Affects RQ / PRQ / RQ_LUT / PRQ_LUT (#2633)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2633

The core idea.
Instead of putting every element of the dataset into MaxHeap, split the dataset into buckets and let every bucket track elements min-1, min-2 or min-3 distances.

Applied to ResidualQuantizer class for vector codec purposes.

An example
```
rq.approx_topk_mode = faiss.APPROX_TOPK_BUCKETS_B16_D2
```

Reviewed By: mdouze

Differential Revision: D42044398

fbshipit-source-id: 43169026476650442806a31d1c1aa2d5d5028e65
2023-01-03 14:39:11 -08:00