Home / Companies / Weaviate / Blog / Post Details
Content Deep Dive

How to Reduce Memory Requirements by up to 90%+ using Product Quantization

Blog post from Weaviate

Post Details
Company
Date Published
Author
Abdel Rodriguez, Zain Hasan
Word Count
3,225
Language
English
Hacker News Points
44
Summary

Product Quantization (PQ) is a technique used in Weaviate to compress vectors, reducing memory requirements while maintaining high search quality. PQ compression involves replacing exact vector coordinates with learned codes that represent general regions where the vector can be found. This results in a lossy algorithm, as some information is lost during compression. However, by adjusting the level of compression, users can balance memory usage and recall for their specific use case. In Weaviate v1.21, significant improvements were made to PQ, reducing recall loss while still achieving high compression ratios. These improvements include a rescoring trick that reads uncompressed vectors from disk during search to recalculate exact distances, improving recall without sacrificing performance.