Quantization Techniques
Module 3: Vector Quantization Techniques
This notebook demonstrates how to use scalar and binary quantization with multi-vector collections in Qdrant.
Install the Qdrant client and fastembed libraries.
Load the ColPali vision-language model for generating multi-vector embeddings from document images.
Embed sample document images. Each image produces 1030 vectors of 128 dimensions - 1024 image patches plus 6 instruction tokens.
Scalar Quantization
Scalar quantization converts float32 values to 8-bit integers (uint8), reducing memory by 4x.
Binary Quantization
Binary quantization represents each component as a single bit (positive/negative), achieving 32x compression.
Search with Rescoring
Qdrant provides automatic rescoring: the quantized index quickly finds candidates, then re-ranks them using the original float32 vectors for accuracy.
Impact of Rescoring
Let's compare results with and without rescoring to see the impact on result quality.