Browse by type
New: We have recently open-sourced the GPU implementation of RaBitQ for high-dimensional vector search. See cuvs_rabitq.
The RaBitQ Library provides efficient and lightweight implementations of the RaBitQ quantization algorithm (1-bit version and multi-bit version) and its applications in high-dimensional vector search. It also provides a GPU implementation. The core algorithm RaBitQ is based on the research from VectorDB group at Nanyang Technological University, Singapore.
The library is developped by Yutong Gou, Jianyang Gao, Yuexuan Xu, Jifan Shi and Zhonghao Yang.
The library provides the following key features:
RaBitQLib supports estimating similarity metrics including Euclidean distance, inner product and cosine similarity.
RaBitQ is a vector quantization algorithm as a drop-in replacement of binary and scalar quantization. The key advantages of RaBitQ include
In this library, we provide simple interfaces to support advanced features of RaBitQ. The details are presented in the documentation.
In the library, RaBitQ is combined with IVF, HNSW and QG to deliever different trade-offs among time, space and accuracy.
Using RaBitQ with IVF and HNSW targets a balance between memory consumption and query performance. Only the quantization codes produced by RaBitQ are stored and the raw data vectors are not accessed during querying. Thus, these methods consume less memory than the raw dataset. Using 4-bit, 5-bit and 7-bit quantization usually suffices to produce 90%, 95% and 99% recall respectively without reranking.
Using RaBitQ with QG targets the best query performance by using more memory. It creates multiple quantization codes for every vector to optimize the data access pattern. Thus, QG usually consumes 2x memory of the raw dataset.
The RaBitQ algorithm has been implemented in many real-world systems in industry including
We acknowledge Alexandr Guzhva, Li Liu, Chao Gao, Silu Huang, Jiabao Jin, Xiaoyao Zhong and Jinjing Zhou for valuable feedbacks.
Please provide a reference of our paper if it helps in your systems or research projects.
Jianyang Gao, Yutong Gou, Yuexuan Xu, Yongyi Yang, Cheng Long, Raymond Chi-Wing Wong, "Practical and Asymptotically Optimal Quantization of High-Dimensional Vectors in Euclidean Space for Approximate Nearest Neighbor Search", SIGMOD 2025, available at https://arxiv.org/abs/2409.09913
$ claude mcp add RaBitQ-Library \
-- python -m otcore.mcp_server <graph>