Skip to main content

Module quantize

Module quantize 

Source
Expand description

Scalar quantization for vector search.

Per-dimension linear quantization: maps float32 values to a reduced integer representation using per-dimension min/max computed across the dataset. Distances are computed asymmetrically: stored vectors at reduced precision, query vector at float32.

Currently implements Int8 only. The user-facing [QuantizationType] enum lives in luci-mapping and includes recognized-but-unimplemented variants (Int4, Bbq); those are rejected at mapping parse time so they cannot reach this layer. See [[code-must-not-lie]], [[optimization-knn-int8-quantization]], and [[quantization]].

Structs§

QuantizedVectors
Int8 quantized vectors with per-dimension calibration data.