antgroup/vsag

vsag is a vector indexing library used for similarity search.

What it solves

VSAG is a vector indexing library designed for efficient similarity search across large-scale vector sets, particularly those that exceed available system memory. It simplifies the implementation of approximate nearest neighbor (ANN) search by providing automated parameter generation based on data scale and vector dimensions, removing the need for developers to deeply understand the underlying algorithms.

How it works

Written in C++, the library implements several specialized indexing algorithms to handle different data types and search requirements:

  • SINDI: A high-performance index optimized for sparse vector search.
  • HGraph: A graph-based index used for scenarios requiring high recall and low latency.
  • IVF: An inverted file index optimized for batch queries and large-scale searches.
  • LazyHGraph: An adaptive index that starts as a brute-force search for small datasets and automatically converts to HGraph as the data grows.

To reduce memory footprint, it supports various quantization methods including Product Quantization (PQ), Scalar Quantization (SQ4/SQ8), and RaBitQ. It is optimized for x86_64 and ARM architectures using instruction sets like AVX-512 and Neon.

Who it’s for

Developers building vector databases or similarity search systems who need a high-performance, cross-platform indexing engine with bindings for C++, Python (via pyvsag), and Node.js/TypeScript.

Highlights

  • Multi-language Support: Native C++ core with official Python and TypeScript bindings.
  • High-Performance Sparse Search: The SINDI algorithm significantly outperforms previous state-of-the-art solutions in queries per second (QPS).
  • Memory Efficiency: Supports multiple quantization levels and disk-based I/O for sparse vectors (SINDI_V2).
  • Hardware Optimized: Leverages CPU-specific optimizations (SSE, AVX, Neon, SVE) and optional acceleration via Intel-MKL or OpenBLAS.

Related

  • Project
  • Project
  • Project
  • Project
  • Project