# TurboVec — High-Performance Rust Vector Index with Python Bindings > A vector similarity search index built on TurboQuant quantization, written in Rust with first-class Python bindings for embedding-based retrieval and RAG workloads. ## Install Save in your project root: # TurboVec — High-Performance Rust Vector Index with Python Bindings ## Quick Use ```bash pip install turbovec # Python usage from turbovec import Index index = Index(dim=384, metric="cosine") index.add(vectors, ids) results = index.search(query_vector, k=10) ``` ## Introduction TurboVec is an open-source vector similarity search index that achieves high throughput through aggressive quantization via its TurboQuant engine. Written in Rust with native Python bindings, it targets developers building RAG pipelines, semantic search, and embedding-based retrieval systems who need fast approximate nearest neighbor search without running a separate database server. ## What TurboVec Does - Indexes high-dimensional embedding vectors for fast approximate nearest neighbor search - Uses TurboQuant quantization to compress vectors while preserving search quality - Provides a Python API via PyO3 bindings for seamless integration with ML pipelines - Supports cosine similarity, inner product, and L2 distance metrics - Leverages SIMD instructions (AVX-512, NEON) for hardware-accelerated search ## Architecture Overview TurboVec consists of a Rust core that implements the quantization and indexing algorithms, exposed to Python through PyO3 bindings. The TurboQuant layer compresses floating-point vectors into compact quantized representations, reducing memory footprint while enabling SIMD-accelerated distance computations. The index structure supports incremental inserts and concurrent reads, making it suitable for both batch indexing and online serving. ## Self-Hosting & Configuration - Install via pip for Python projects — no separate server process needed - The index runs in-process as a library, embedding directly into your application - Configure quantization precision, distance metric, and index parameters at creation time - Persist indexes to disk for reload across process restarts - Build from source with Rust and maturin for custom compilation targets ## Key Features - Sub-millisecond query latency on million-scale vector collections - TurboQuant compression reduces memory usage compared to full-precision indexes - Native SIMD acceleration on x86 (AVX-512) and ARM (NEON) architectures - Zero-copy Python bindings through PyO3 for minimal overhead - Embeddable library design — no external server or network calls required ## Comparison with Similar Tools - **FAISS** — Meta's vector search library; TurboVec focuses on quantization-first design with Rust safety - **Qdrant** — a vector database server; TurboVec is an embeddable library, not a standalone service - **Milvus** — distributed vector DB for large scale; TurboVec targets single-node in-process use - **Annoy** — Spotify's ANN library; TurboVec offers more flexible quantization and SIMD optimization - **USearch** — a compact ANN engine; TurboVec differentiates with TurboQuant compression ## FAQ **Q: When should I use TurboVec instead of a vector database?** A: Use TurboVec when you want in-process vector search without running a separate service — ideal for CLI tools, notebooks, and lightweight applications. **Q: How does TurboQuant affect search accuracy?** A: Quantization trades a small amount of recall for significant memory and speed improvements. For most embedding models, the recall loss is under 2%. **Q: Can I use it with embeddings from any model?** A: Yes. TurboVec is model-agnostic — any fixed-dimension embedding vector works. **Q: Does it support GPU acceleration?** A: Currently CPU-only with SIMD optimization. GPU support is on the roadmap. ## Sources - https://github.com/RyanCodrai/turbovec - https://github.com/RyanCodrai/turbovec/blob/main/README.md --- Source: https://tokrepo.com/en/workflows/asset-5baea868 Author: AI Open Source