← All questions
Retrieval & EmbeddingsHard· Quantization· ColBERTv2· Embeddings

Why does ColBERTv2's centroid-plus-residual quantizatio...

The effectiveness of ColBERTv2’s compression lies in its use of a centroid index and a quantized residual. By storing the token’s identity in the codebook, the system offloads the ‘between-cluster’ variance, which is the most significant part of the vector’s identity. This allows the residual to focus only on the ‘within-cluster’ spread, which requires fewer bits to represent accurately compared to quantizing the raw vector, which would have to account for the entire distribution range.

Code playground (Python)