World
Turbovec: a Rust Vector Index That Fits 10M Documents in 4 GB RAM and Searches Faster Than Faiss

A 10 million document corpus takes 31 GB of RAM as float32. turbovec fits it in 4 GB and searches it faster than FAISS.
turbovec is a Rust vector index with Python bindings, built on Google Research's TurboQuant algorithm — a data-oblivious quantizer with near-optimal distortion and no separate training phase. Building RAG where privacy, memory, or latency matters? You're in the right place.
Vectors and queries are 2-D float32 arrays of shape (n, dim) — other dtypes are rejected rather than silently converted, so cast with np.asarray(x, dtype=np.float32) first if needed. Need stable ids that survive deletes? Use IdMapIndex.
Restrict results to a candidate set produced by another system (SQL, BM25, ACL, time window, …): filtering happens inside the SIMD kernel at 32-vector block granularity. Blocks with no allowed slots are short-circuited before any LUT lookup or scoring work, and individual non-allowed slots inside scored blocks are dropped at heap-insert. Selective allowlists (small fraction of the index allowed) therefore avoid most of the SIMD cost rather than paying it and discarding the result afterwards.
Source: Hacker News
Most read in this category
Loading article…