# Turbovec **Turbovec is a vector search index that fits a 10M-document corpus in 4 GB of RAM instead of 31 GB, and searches it faster than [[FAISS]].** It is written in Rust with Python bindings, built on Google Research's [[TurboQuant]] quantization. The point: you keep most of FAISS's recall while paying a fraction of the memory. For 1536-dimensional embeddings that means roughly **16x compression**, vectors squeezed down to 2 or 4 bits each. ## What makes it different - **Online ingestion.** Add vectors and they're indexed. No training phase, no parameter tuning to babysit. - **SIMD search.** Hand-written NEON (ARM) and AVX-512BW (x86) kernels do the scoring. - **Filter at search time.** Id allowlists or slot bitmasks restrict results without over-fetching first. - **Fully local.** No managed service, no network hop. The index is a file you `write()` and `load()`. - **Framework integrations** for LangChain, LlamaIndex, Haystack, and Agno. ## How TurboQuant works 1. Normalize each vector to a unit direction. 2. Apply a random orthogonal rotation so coordinates follow predictable Beta distributions. 3. Calibrate per-coordinate, mapping empirical quantiles to canonical distributions. 4. Quantize with Lloyd-Max scalar buckets (4 for 2-bit, 16 for 4-bit). 5. Re-normalize lengths at scoring time to correct the quantization bias. ## Usage ```python from turbovec import TurboQuantIndex index = TurboQuantIndex(dim=1536, bit_width=4) index.add(vectors) scores, indices = index.search(query, k=10) index.write("my_index.tv") ``` ## Numbers worth keeping - Recall within **0.2–1.9 points** of FAISS IndexPQ at R@1 across 2-bit/4-bit configs. - ARM: **10–19% faster** than FAISS FastScan. x86: wins 4-bit by ~5%, slightly behind on 2-bit. - `pip install turbovec`; Python >= 3.9; targets x86-64-v3 (AVX2) minimum with AVX-512 runtime detection. - License: MIT. Latest version 0.8.0 (June 2026). ## Reception (HN, August 2026) The [HN thread](https://news.ycombinator.com/item?id=49349898) split cleanly: **Demand signals.** Requests clustered around embedding it in existing storage — LanceDB, DuckDB, SQLite bindings — plus WASM compilation for in-browser search. The use cases people actually described: local privacy-first search, codebase indexing, personal wiki indexing. Exactly the "index as a file" niche. **Pushback worth keeping:** - FAISS as the benchmark baseline was challenged — it's no longer state of the art, so "faster than FAISS" undersells the real competition ([[Qdrant]] already integrates TurboQuant, usearch, oxirs) - TurboQuant itself carries baggage: commenters pointed to academic-misconduct allegations in the paper's OpenReview thread - Alternatives debate: [[Matryoshka Embeddings]] achieve similar memory savings by truncating dimensions, no exotic quantizer needed; one report of 8x compression for ~3.5% quality loss with simpler methods - Documentation quality drew "vibe coded" complaints The criticisms narrow the claim rather than kill it: the win is the memory-per-recall ratio in an embeddable local index, not overall vector-search supremacy. ## References - https://github.com/RyanCodrai/turbovec - https://pypi.org/project/turbovec/ - HN discussion: https://news.ycombinator.com/item?id=49349898 ## Related - [[TurboQuant]] - [[FAISS]] - [[Embeddings]] - [[Semantic Search]] - [[Vector Store]] - [[Retrieval-Augmented Generation (RAG)]] - [[AI Retrieval Patterns]] - [[Cloudflare Vectorize]] - [[qmd]] - [[Rust]]