Hasty Briefsbeta

Scaling HNSWs

11 days ago
  • #Redis
  • #Vector-Similarity
  • #HNSW
  • The author is taking a break from HNSW development to work on other data structures.
  • Redis's new HNSW type is stable and complete, prompting a detailed blog post on advanced findings.
  • HNSWs are space-hungry due to pointers, layers, and vector components, with solutions like 8-bit quantization.
  • Redis Vector Sets use 8-bit quantization by default for speed and space efficiency.
  • Threading is used in Redis for HNSW reads and partially for writes to improve performance.
  • Memory reclamation in HNSWs is addressed by ensuring bidirectional links and heuristic-based neighbor linking.
  • HNSWs in Redis are exposed as composable data structures, allowing scaling across multiple instances.
  • Loading times for HNSWs are optimized by serializing nodes and neighbors directly.
  • JSON filters are introduced to allow conditional searches within HNSWs.
  • Memory usage for in-memory HNSWs is deemed acceptable for many use cases, with 3GB for 3 million Word2Vec entries.
  • The author encourages further research into HNSWs and their applications beyond AI.