CPP implementation of using Product Quantization (PQ - a classic vector quantization algorithm for approximating inner products and Euclidean distances) to encode a given set of vectors into quantized form using the trained parameters, originally from nanopq.
The nanopq python code is for training, and the ported C/C++ code loads the trained parameters and performs quantized encoding of a given set of vectors.
A test script is also included that verifies that the quantized vectors output by the C/C++ code matches the quantized vectors generated by the original Python code.
- Jégou, H., Douze, M., & Schmid, C. (2011). Product Quantization for Nearest Neighbor Search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(1), 117–128. doi:10.1109/tpami.2010.57
- Blalock, D.W., & Guttag, J.V. (2021). Multiplying Matrices Without Multiplying. International Conference on Machine Learning
- nanopq - Pure python implementation of product quantization for nearest neighbor search