[Enhance]: Integrate TurboQuant/PolarQuant zero-overhead vector quantization for compressed ANNS indexing
Maintainer thường phản hồi trong vòng 1 ngày
@richyreachy đang làm issue này rồi.
Từ ngày 7/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Affected Component
HNSW index, vector quantization layer, index builder, Python API
Current Behavior
zvec currently relies on standard vector quantization approaches (e.g., scalar or product quantization) that carry unavoidable memory overhead. Traditional quantization methods must compute and store full-precision quantization constants (scale/zero-point) for every small block of data, adding 1–2 extra bits per value. This overhead partially defeats the compression goal: a 4-bit quantization scheme in practice consumes closer to 5–6 bits per dimension, increasing memory footprint and slowing down index building and similarity search. There is no built-in support for theoretically-optimal, data-oblivious quantizers that eliminate this overhead while preserving recall accuracy.
Desired Improvement
Integrate support for TurboQuant and its constituent algorithms (PolarQuant and QJL) as a quantization backend option within zvec's index building and search pipeline.
Proposed changes:
-
PolarQuant quantizer: Add a quantization codec that converts Cartesian vector coordinates to polar form, applying recursive polar transforms so that the angular component can be quantized without storing per-block normalization constants. This eliminates the memory overhead associated with scale factors.
-
QJL residual correction: After primary quantization with PolarQuant, apply the Quantized Johnson-Lindenstrauss 1-bit residual pass to the remaining error. This step requires zero memory overhead and removes quantization bias, producing more accurate inner-product / dot-product estimates for ANNS scoring.
-
TurboQuant codec: Expose a unified
TurboQuantquantization option that chains PolarQuant + QJL, configurable via abitsparameter (e.g., 3-bit, 4-bit). -
Python API: Surface the new codec through the existing Python API, e.g.:
index = zvec.Index(quantization="turboquant", bits=4) -
No training / fine-tuning requirement: The implementation must be data-oblivious — no dataset-specific codebook training should be required.
Reference: TurboQuant (ICLR 2026) — https://arxiv.org/abs/2504.19874; PolarQuant (AISTATS 2026) — https://arxiv.org/abs/2502.02617; QJL — https://arxiv.org/abs/2406.03482
Impact
- Lower memory usage: Quantizing vectors to 3–4 bits with zero overhead (no stored scale constants) reduces index memory by 6× or more compared to 32-bit storage, enabling larger datasets to fit in RAM.
- Faster queries: By operating at lower bit-widths, inner-product computations over compressed vectors are significantly cheaper. Benchmarks show up to 8× speedup in attention-logit throughput on H100 GPUs at 4-bit vs 32-bit.
- No accuracy loss: TurboQuant achieves near-lossless recall (matching full-precision results on standard ANNS benchmarks such as GloVe d=200) without any dataset-specific codebook training, making it immediately usable on arbitrary embedding spaces.
- Faster index building: The data-oblivious design eliminates the expensive training phase required by methods like PQ or RaBitQ, dramatically reducing time-to-index for large collections.
- Drop-in adoption: Exposing TurboQuant as a named codec in the Python API allows existing zvec users to opt in with a single parameter change, lowering the barrier for adoption in production RAG and semantic search pipelines.
- Ngôn ngữ chính
- C++
- Star
- 16.3k
- Fork
- 1k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của alibaba/zvec
-
[Feature]: IVF_TIEREDQ index type, with a learned variable-bit codec (25–44% less index memory than `IVF_RABITQ` at equal recall)Có thể đã có người làm @richyreachy đã nhận 7 ngày trước. Đang mởfeature
alibaba/zvec#909 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support an opt-in portable x86 FastPFOR build without SSE4.1Có thể đã có người làm @egolearner đã nhận 20 ngày trước. Đang mở
alibaba/zvec#875 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhance]: Reduce vector index block fragmentation caused by frequent flushesCó thể đã có người làm @feihongxu0824 đã nhận 22 ngày trước. Đang mởenhancement
alibaba/zvec#869 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Performance]:High-selectivity range filter materializes a full bitmap — `bitset_set_list` ~49% CPU, dwarfing the ANN searchCó thể đã có người làm @zhourrr đã nhận 22 ngày trước. Đang mởenhancement
alibaba/zvec#868 · 13 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Performance] Warm-query latency on small collections with query() and query_internal_ids() in v0.8.0Có thể làm lại được @egolearner đã nhận 33 ngày trước và không có pull request nào đang mở. Đang mở
alibaba/zvec#841 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
deprecation internal refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
realloc(ptr, 0) on glibc leaves the freed block in the capture as a leakCó thể đã có người làm @ADAMAMZAR đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bloomberg/memray#1097 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
new-compilers request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
compiler-explorer/compiler-explorer#9640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
deepseek-ai/DeepEP#839 ·
Maintainer thường phản hồi trong vòng 6 ngày