Quantization trades memory and distance-computation speed for accuracy
Vector quantization solves the memory problem. A single float32 vector of 768 dimensions is 3072 bytes. A million of them is about 3 GB just for the raw vectors, before any index overhead. At 100 million vectors you are at 300 GB, which is more than most machines have and far more than fits comfortably in RAM. Quantization compresses each vector to a lower-precision representation - int8, or a few bits per dimension, or even one bit per dimension - which reduces the memory footprint by 4x to 32x depending on the scheme. The second, less obvious benefit is speed: lower-precision vectors fit more values per SIMD register, so distance computations are faster in addition to touching less memory. On modern CPUs, int8 dot products can be several times faster than float32 for the same number of dimensions, and binary dot products are faster still because they reduce to popcount operations.
The trade-off is accuracy. Quantization is lossy: you are approximating each vector with a lower-precision surrogate, and the distance you compute is an approximation of the true distance. The error is small for scalar quantization (int8) because 256 levels per dimension is enough to preserve the geometry of most embeddings, but it grows as you compress more aggressively. With binary quantization, each dimension is reduced to a single bit (sign), which is a very coarse approximation; the ranking it produces is noisy, and you need to retrieve more candidates and rescore them with the original vectors to recover accuracy. The fundamental trade-off is therefore memory and speed against recall. There is no quantization scheme that is free; you are always giving up some accuracy to gain some efficiency, and the right choice depends on how much accuracy your application can tolerate and how much memory you have. The mistake less experienced engineers make is assuming quantization always reduces recall. It can, but on many real datasets the recall drop with int8 scalar quantization is under one point, while memory drops 4x - a very favorable trade. The opposite mistake is assuming quantization is always safe and skipping the recall measurement entirely, which is how teams ship a 10-point recall regression without noticing.
Memory: float32 -> int8 is 4x; float32 -> binary is 32x; product quantization can land anywhere in between depending on the number of subspaces.
Speed: lower precision means faster SIMD distance computations and better cache utilization, often a bigger win than the memory savings alone.
Accuracy: scalar is the mildest, product is intermediate, binary is the most aggressive. All of them are lossy.
Interactions: quantization composes with HNSW - the graph is typically built over full-precision vectors, and quantized vectors are used for the distance computations during traversal.
The main alternative to quantization is to not quantize and instead put vectors on disk, relying on HNSW on disk with inline storage. That avoids the accuracy loss entirely but trades memory for I/O latency, which is usually much worse for interactive search. Another alternative is dimensionality reduction (PCA or a learned projection) before indexing, which reduces memory without introducing quantization error but changes the geometry and requires retraining. In practice, quantization is almost always the first lever because it is cheap to apply and easy to reverse - you can re-quantize or de-quantize without re-embedding. Version note: Qdrant has expanded its quantization options considerably in recent releases, including sub-byte and asymmetric schemes, so the old three-way choice between scalar, product, and binary is no longer complete. Check the release notes for your version before assuming a particular scheme is available or has particular defaults.
Version-dependent: the quantization_config API and the available schemes (scalar, product, binary, and the newer sub-byte and asymmetric variants) have changed across Qdrant releases. always_ram, quantile, and the exact set of configurable fields are not stable across major versions. Pin your client and server versions together when relying on quantization, and re-run your recall benchmark after any upgrade that touches the quantization path.
You enable scalar quantization on a 2M-vector collection and memory drops from 8 GB to 2.5 GB. How do you check whether recall changed?
A teammate says quantization is lossless because int8 has 256 levels. Explain why that is not correct and what the actual error looks like.
You need to cut a 40 GB index down to fit on a 16 GB machine. Walk through the quantization options in order of increasing aggressiveness and what recall impact you expect at each step.
Your application cannot tolerate more than a 1-point recall drop. Which quantization scheme do you pick and how do you validate it before rolling out?
Design a quantization strategy for a multi-tenant collection where some tenants have 1k vectors and others have 50M. How do you avoid penalizing small tenants with aggressive compression they do not need?
You quantize a collection and recall drops 4 points. Diagnose whether the loss is from the quantization itself, from the interaction with HNSW, or from the absence of rescoring, and describe the fix for each cause.
Derive the expected recall loss from scalar quantization as a function of the per-dimension quantile and the intrinsic dimensionality of the data. Where does the derivation fail and why?
You must serve a 1B-vector collection with a hard 20ms p99 and a recall target of 0.95. Propose a quantization and index design that meets both, and identify the single biggest risk to the design.