The Problem

Vector indexes typically require a training step that consumes compute time and becomes stale as data evolves. Trained quantization methods like FAISS PQ demand codebook retraining when the dataset changes, and adding new vectors often requires index rebuilds. This creates operational overhead for dynamic workloads where data arrives continuously or dimensions shift between deployments.

What This Does

turbovec implements TurboQuant, a data-oblivious vector compression approach that avoids training entirely. The Rust core lives in turbovec/src/ with nine source files: lib.rs, codebook.rs, encode.rs, pack.rs, rotation.rs, search.rs, and io.rs handle the index logic, compression, and persistence. Python bindings are in turbovec-python/src/lib.rs, exposing TurboQuantIndex via pyproject.toml and Cargo.toml. Compression operates at 2-4 bits per dimension, and benchmarks across benchmarks/suite/ show recall converging to 1.0 by k=4–8 at 4-bit, with results published in JSON files like recalld15364bit.json. Speed benchmarks in benchmarks/suite/ compare against FAISS FastScan on both ARM (Apple M3 Max) and x86 (Sapphire Rapids) configurations, with results visualized in docs/ SVGs.

How To Use It

Setup: pip install turbovec or from source cd turbovec && cargo build --release cd turbovec-python && pip install -e .

Configuration: No environment variables or keys are required. The index is configured at construction via dim and bitwidth parameters, as documented in the Python and Rust examples in the README.

Running it: from turbovec import TurboQuantIndex

index = TurboQuantIndex(dim=1536, bitwidth=4) index.add(vectors) scores, indices = index.search(query, k=10) index.write("myindex.tq") loaded = TurboQuantIndex.load("myindex.tq")

The entry point turbovec-python/src/lib.rs binds the Rust TurboQuantIndex struct, and Cargo.toml files manage the Rust/Python dependency chain.

Real-World Use

A search-as-a-service platform ingesting new user embeddings hourly can use turbovec without retraining codebooks. When a batch of new vectors arrives, they're added directly via index.add(), and search latency remains stable. The data-oblivious property means the same index serves both historical and incoming data without rebuilds—a meaningful reduction in deployment pipeline complexity for rapidly changing datasets.

Code Health & Issues

Tests: One test file exists (turbovec/tests/concurrent_search.rs); CI is configured via .github/workflows/release.yml with a CI/CD pipeline. License: LICENSE file present (MIT). Lockfile: Cargo.lock is committed, ensuring reproducible builds. No structural red flags were detected: CI runs on every release, a license is included, and the dependency graph is explicit in the three Cargo.toml files.

The Bottom Line

turbovec delivers a practical middle ground for vector search: no training step, competitive recall at 2–4 bits, and search speeds that match or exceed FAISS FastScan on both ARM and x86. The codebase is clean, well-structured, and immediately usable via pip install turbovec or cargo add turbovec. It's worth evaluating for workloads with dynamic data or where minimizing pipeline overhead is a priority, though teams already invested in trained codebook pipelines may see limited incremental benefit.