📐 Mathematical Formula & Derivation
RAM_{GB} = \frac{N_{vec} \times \left( D \times B_{elem} + M_{HNSW} \times 8 + \text{Meta}_{bytes} \right) \times 1.15}{10^9} 🔬 Engineering Methodology & Benchmark Analysis
High-performance semantic search relies on Hierarchical Navigable Small World (HNSW) graphs kept in system RAM. Each vector requires memory not only for its floating-point dimensions, but also for bidirectional graph edges (typically M=16 to M=32 links per node).
At 10 million 1536-dimensional Float32 vectors, raw embeddings consume 61.4 GB, while HNSW graph pointers and payload indexes push total RAM past 75 GB.
Applying Scalar Quantization (SQ8) or Binary Quantization shrinks memory footprint by 75% to 95% with minimal recall loss when paired with oversampling and rescoring.
🛠️ Step-by-Step Engineering Calculation Guide
- Total Number of Vectors / Chunks (Millions): Configure "Total Number of Vectors / Chunks (Millions)" (default benchmark: 10) or select an industry preset.
- Embedding Model Dimensions (d): Configure "Embedding Model Dimensions (d)" (default benchmark: 1536) or select an industry preset.
- Vector Index Quantization Mode: Configure "Vector Index Quantization Mode" (default benchmark: 4) or select an industry preset.
- In-Memory Metadata Payload per Vector (Bytes): Configure "In-Memory Metadata Payload per Vector (Bytes)" (default benchmark: 256) or select an industry preset.