Package-level declarations

Types

Link copied to clipboard
class OptimizedScalarQuantizer(similarityFunction: VectorSimilarityFunction, lambda: Float = DEFAULT_LAMBDA, iters: Int = DEFAULT_ITERS)

This is a scalar quantizer that optimizes the quantization intervals for a given vector. This is done by optimizing the quantiles of the vector centered on a provided centroid. The optimization is done by minimizing the quantization loss via coordinate descent.

Link copied to clipboard

A version of ByteVectorValues, but additionally retrieving score correction offset for Scalar quantization scores.

Link copied to clipboard

Quantized vector reader

Link copied to clipboard

Calculates and adjust the scores correctly for quantized vectors given the scalar quantization parameters

Link copied to clipboard
class ScalarQuantizer(minQuantile: Float, maxQuantile: Float, bits: Byte)

Will scalar quantize float vectors into int8 byte values. This is a lossy transformation. Scalar quantization works by first calculating the quantiles of the float vector values. The quantiles are calculated using the configured confidence interval. The minQuantile, maxQuantile are then used to scale the values into the range 0, 127 and bucketed into the nearest byte values.