Embedded Rust + Python hybrid vector DB (HNSW, BM25, WAND, ColBERT) — 0.187ms 1%-filtered search.
Project details
SutraDB v5.5.0 is an MIT-licensed embedded Rust + Python hybrid vector DB (pip install sutradb-core==5.5.0 + standalone Rust server). Features runtime AVX-512/AVX2/NEON SIMD, HNSW, BM25, WAND sparse, ColBERT, a RoaringBitmap planner (0.187 ms P50 / 4,914 QPS on 100K×768d 1%-filtered), 32× BQ (9.2 MiB RAM), instant .sutra.idx restarts, and 3× kill -9 verified binary WAL.
सूत्र DB (SutraDB) v5.5.0 is an open-source, MIT-licensed embedded Rust + Python hybrid vector database engineered for sub-millisecond AI retrieval without Docker or heavy multi-container stacks. Powered by a unified native Rust core (NativeCollection), zero-copy PyO3 ABI3 NumPy bindings, and a standalone zero-Python Rust server (sutradb-server), SutraDB brings Dense HNSW, BM25, WAND Sparse, ColBERT MaxSim, and Roaring metadata filtering into a single package.
Most local RAG and voice AI pipelines force a painful trade-off: spin up multiple heavy services (Qdrant + Elasticsearch + rerankers) or settle for pure-Python vector stores that choke on tenant filters and burn gigabytes of RAM. SutraDB v5.5.0 eliminates that trade-off with hardware SIMD, single-slab memory arenas, and instant disk restarts.
VectorArena, SQ8Arena, BQArena, PQArena) with runtime CPU auto-dispatch for AVX-512F, AVX2 + FMA, and ARM NEON — plus zero-copy 2D NumPy ingestion (70.5K docs/s).RoaringBitmap Filtered Planner (412× Speedup): Resolves exact matching IDs first; for restrictive filters (valid_count <= 2048 or < 3% up to 4096), skips HNSW graph hops and runs an exact SIMD scan over only matching IDs (0.187 ms P50, 4,914 QPS, 100% Recall@10).92.1% Recall@10), SQ8 (4×) (97.9% Recall@10), and parallel PQ (32×)..sutra.idx sidecar (3.07 s cold load at 100K × 768d), backed by a buffered SWB1 binary WAL with partial-tail crash healing.--no-default-features), constant-time API key RBAC (Admin / Write / Read + collection prefixes), Prometheus 0.0.4 latency histograms, and a zero-build Embedded Developer Workbench (http://localhost:8765/ui).Measured on a 2-vCPU x86_64 (AVX2/FMA) machine (293.0 MiB raw FP32, Cosine, top_k=10):
| Engine Mode | P50 Latency | P99 Latency | Throughput | Vector/Index RAM | Recall@10 |
|---|---|---|---|---|---|
| 1%-Filtered (Roaring SIMD) | 0.187 ms | 0.297 ms | 4,913.9 QPS | 326.2 MiB | 100.00% |
HNSW Unfiltered (m=16) | 0.417 ms | 0.645 ms | 2,291.2 QPS | 326.2 MiB | 100.00% |
| 1-Bit BQ (Mmap-Evicted 32×) | 2.043 ms | 3.547 ms | 436.2 QPS | 9.2 MiB | 92.10% |
| SQ8 (Mmap-Evicted 4×) | 6.516 ms | 9.139 ms | 141.5 QPS | 73.2 MiB | 97.90% |
| Flat (Rust AVX2 SIMD) | 14.236 ms | 25.960 ms | 68.1 QPS | 293.0 MiB | 100.00% |
| NumPy Exact GEMV | 35.019 ms | 44.403 ms | 27.4 QPS | 293.0 MiB | 100.00% |
Verified with 332/332 automated CI tests (98 Rust + 234 Python, 0 Clippy warnings) and benches/peak_stress_test.py:
kill -9 Crash Cycles: 744 / 744 HTTP-200 acknowledged surviving docs recovered from SWB1 WAL (0 ghost deletes).+0.00 MiB RSS growth (291.32 MiB steady).3,055 mixed ops with live compact()/save(), RBAC, and exact Prometheus parity (0 HTTP 500s).Embedded Python (Prebuilt Linux, macOS & Windows wheels):
pip install sutradb-core==5.5.0
Comments
0Start the conversation
Share the first comment.