← All questions
Retrieval & EmbeddingsMedium· Quantization· Memory Optimization

You have a 30.7 GB flat index but only 1 GB of RAM. Wha...

With 10 million vectors and 1 GB of RAM, you are limited to roughly 100 bytes per vector. By choosing a configuration like m=96, you can compress the 768-dimensional vectors into a manageable size that fits in memory. This process involves two distinct steps: quantization to reduce the index size and a subsequent rescoring stage over exact vectors to repair the ranking accuracy lost during compression.

Code playground (Python)