Repository navigation
v3.3.0 — Product Quantization (PQ) with Asymmetric Distance Computation (ADC)
सूत्र DB (SutraDB) v3.3.0 Release Notes
🚀 Industrial Milestone: Product Quantization (PQ) with ADC
SutraDB v3.3 introduces Product Quantization (PQ) with Asymmetric Distance Computation (ADC), bringing industrial-grade memory compression and sub-millisecond similarity queries directly into SutraDB's native Rust SIMD core and Python SDK.
📦 Key Highlights & Capabilities
-
Sub-Space Vector Decomposition (
$M$ Subspaces):- Decomposes high-dimensional vector spaces into
$M$ orthogonal sub-spaces (e.g. 1536 dims into 96 sub-spaces of 16 dims). - Trains k-means centroids (
$K=256$ ) for each sub-space with automatic$M$ divisor selection viasuggest_m. - Compresses 32-bit floating point vectors into 1-byte code indices per subspace, delivering up to 64x RAM reduction (e.g. 100K 128-dim vectors in ~3.2 MB RAM).
- Decomposes high-dimensional vector spaces into
-
Asymmetric Distance Computation (ADC):
- Unquantized query sub-vectors are projected against codebook centroids once to precompute an
$M \times 256$ float Look-Up Table (LUT), fitting entirely inside CPU L1 cache. - Vector distance calculation is reduced to table lookup indexing and SIMD addition, bypassing all floating-point multiplications.
- Two-stage search: fast ADC candidate ranking + full-precision exact reranking of top candidate pool for >95% recall.
- Unquantized query sub-vectors are projected against codebook centroids once to precompute an
-
Native Rust Core & PyO3 Integration:
-
PQConfig,PQCodebook, andPQVectorimplemented insrc/distance/pq.rs. - Native collection bindings
train_pqandenable_pqexposed viasrc/py_api.rsandsrc/collection.rs.
-
-
Python SDK & Embedded Web UI Integration:
- Pure Python / NumPy fallback implementation in
sutradb.quantization.PQCodebook. -
col.train_pq()andcol.enable_pq()integrated with automatic ADC two-stage reranking insutradb.core.Collection. - REST microservice endpoint
POST /collections/{name}/pqand embedded 2026 dark-mode web console button for 1-click PQ training.
- Pure Python / NumPy fallback implementation in
-
Exhaustive Testing:
- 82 total passing automated tests across Rust (19 tests) and Python (63 tests).
📥 Installation
pip install --upgrade sutradb-core