1 Commits

Author SHA1 Message Date
Matthijs Douze
dd72e4121d QINCo implementation in CPU Faiss (#3608)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3608

This is a straightforward implementation of QINCo in CPU Faiss, with encoding and decoding capabilities (not training).

For this, we translate a simplified version of some torch classes:

- tensors, restricted to 2D and int32 + float32

- Linear and Embedding layer

Then the QINCoStep and QINCo can just be defined as C++ objects that are copy-constructable.

There is some plumbing required in the wrapping layers to support the integration. Pytroch tensors are converted to numpy for getting / setting them in C++.

Reviewed By: asadoughi

Differential Revision: D59132952

fbshipit-source-id: eea4856507a5b7c5f219efcf8d19fe56944df088
2024-07-11 02:40:38 -07:00