Compression and quantization concepts
These are the topics in this section, each on its own page with a stable path you can bookmark or share.
What topics are covered in this section?
- What is vector quantization?
- What is scalar quantization (SQ)?
- What is product quantization (PQ)?
- What is int8 quantization?
- What is FP16 (half precision)?
- What is BF16 precision?
- What is full-precision reranking?
- What is approximate distance computation?
- What is quantization error?
- What is compression-aware graph construction?
- What is adaptive quantization?
- What is two-stage retrieval (quantize then rerank)?
Compression and quantization concepts explain how vectors shrink for memory and faster distance estimates, and how reranking restores quality after approximate comparisons on codes.
What problems does quantization solve for HNSW?
Full-precision graphs burn RAM proportional to dimensions and count. Scalar, product, int8, FP16, BF16, and related schemes cut bytes and often accelerate distance math, at the cost of quantization error. Approximate distance computation on codes needs full-precision reranking or two-stage retrieval to protect recall. Compression-aware construction and adaptive quantization explore building edges with the same codes used at query time.
Compression is not free recall – it is a negotiated trade.
How does Weaviate use these ideas?
Weaviate supports rotational, product, scalar, and binary quantization paths with rescoring against stored uncompressed vectors. RQ is a strong default starting point for many HNSW collections; PQ needs training awareness under drift. HFresh applies RQ at multiple bit widths for centroids versus postings. Enabling compression changes memory, latency, and recall together – measure all three.
Part VI’s compression chapter is the curriculum home for this topic.
Where should you go next?
Read vector quantization, PQ, SQ, full-precision reranking, and two-stage retrieval pages, then Part VI. For disk-first topologies, see HFresh discussions in scaling and hardware-aware frontier pages.
This section is about smaller codes on the hot path. Next, open “What is vector quantization?” or Part VI’s compression chapter, then Weaviate quantization docs when you are ready to enable a codec.