facebookresearch / faiss

A library for efficient similarity search and clustering of dense vectors.
https://faiss.ai
MIT License
31.44k stars 3.64k forks source link

Introduce QuantizerTemplateScaling for SQ #3870

Closed alexanderguzhva closed 1 month ago

alexanderguzhva commented 1 month ago

replace

template <class Codec, bool uniform, int SIMD>
struct QuantizerTemplate {};

with

enum class QuantizerTemplateScaling { UNIFORM = 0, NON_UNIFORM = 1 };

template <class Codec, QuantizerTemplateScaling SCALING, int SIMD>
struct QuantizerTemplate {};

This allows adding more Scalar Quantizer scaling types (such as rowwise or rowwise + non-uniform) in the future.

facebook-github-bot commented 1 month ago

@mnorris11 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 month ago

@mnorris11 merged this pull request in facebookresearch/faiss@4e30901f8dcec89fdd49182f78cfb36eaaa61251.