Product Quantization
Also called PQ
Compressing vectors into tiny codes so billions fit in memory, at a small accuracy cost.
Think of it like
Describing a paint color by the nearest name in a small swatch book instead of exact RGB values.
Example
PQ shrinks a 1536-float vector into a handful of bytes, letting a single machine hold vectors that would otherwise need a cluster.
How it actually works
Product quantization splits each vector into subvectors and replaces each with the ID of its nearest centroid from a small learned codebook, turning floats into bytes. Distances are then approximated from precomputed tables, fast and memory-light. The compression is lossy, so recall drops a bit — usually recovered by re-ranking the top candidates with their full vectors.
For product teams
The reason massive vector search fits on modest hardware; expect a small, recoverable accuracy hit.
For engineers
Subspace codebook quantization to byte codes with table-based distance; lossy, typically re-ranked with exact vectors.
Related
- IVF Index — Frequently combined with an IVF index.
- Approximate Nearest Neighbor — Trades memory for approximate nearest neighbor accuracy.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome