Class LocallyAdaptiveVectorQuantization

java.lang.Object
io.github.jbellis.jvector.pq.LocallyAdaptiveVectorQuantization
All Implemented Interfaces:
VectorCompressor<LocallyAdaptiveVectorQuantization.QuantizedVector>

public class LocallyAdaptiveVectorQuantization extends Object implements VectorCompressor<LocallyAdaptiveVectorQuantization.QuantizedVector>
Implements Locally-Adaptive Vector Quantization (LVQ) as described in "Similarity search in the blink of an eye with compressed indices" (https://arxiv.org/abs/2304.04759). In particular, single-level LVQ-8 is used. To encode, a vector is first de-meaned by subtracting the global mean. Then, each component is quantized using a byte, where 0 = min and 255 = max. The bias and scale are stored for each component to allow for dequantization. Vectors are packed using Turbo LVQ as described in "Locally-Adaptive Quantization for Streaming Vector Search" (https://arxiv.org/pdf/2402.02044.pdf).