A C++ library with Python bindings for efficient similarity search and clustering of dense vectors, with optional GPU acceleration.
RyanCodrai/turbovec
An in-process vector index for Python and Rust that compresses embeddings to 2 or 4 bits per dimension using TurboQuant and searches them directly.
Open-source alternative to:FAISS
- Stars
- 17,411
- Forks
- 1,488
- Open issues
- 23
- Last commit
- 15 days ago
What is it?
turbovec is a vector index library for Python and Rust. It stores each embedding at 2 or 4 bits per dimension using the TurboQuant quantization method and runs nearest-neighbour search on the compressed form with SIMD kernels, so the index stays in process memory rather than in a separate service.
The project targets retrieval workloads such as RAG pipelines, where large sets of embeddings would otherwise need float32 storage. It supports adding and removing vectors without retraining, incremental persistence through a sync call that writes only changes, and an IdMapIndex variant keyed by user-defined uint64 ids. Search can be restricted with an allowlist of ids. Drop-in integrations for LangChain, LlamaIndex, Haystack and Agno are provided.
It is a brute-force scan rather than a graph index, so query cost grows linearly with corpus size. Quantization is lossy, and the project documents benchmarks against FAISS on OpenAI and GloVe embeddings.
Key features
- 01Stores vectors at 2 or 4 bits per dimension, about 7.8x smaller than float32 at 4-bit.
- 02Runs SIMD-optimised search directly on compressed codes, with a Python and a Rust API.
- 03Adds and removes vectors without a training step or index rebuild.
- 04Incremental sync() writes only changed data and saves atomically.
- 05Supports id-based indexing and allowlist filtering at search time.
Use cases
- Building a local RAG retriever that keeps embeddings in process memory.
- Searching large embedding collections on a machine with limited RAM.
- Adding a vector store to a LangChain or LlamaIndex application without running a separate database.
- Offline or privacy-sensitive semantic search where no data should leave the process.
Quick start
- 1
Install the Python package from PyPI
pip install turbovec - 2
Build and index vectors with TurboQuantIndex (see README example)
Things to know
- Scans every vector, so it is not suited to very large corpora with strict latency needs.
- Quantization is lossy, so results are approximate rather than exact float results.
Topics
FAQ
- What is turbovec?
- An in-process vector index for Python and Rust that compresses embeddings to 2 or 4 bits per dimension using TurboQuant and searches them directly. turbovec is a vector index library for Python and Rust. It stores each embedding at 2 or 4 bits per dimension using the TurboQuant quantization method and runs nearest-neighbour search on the compressed form with SIMD kernels, so the index stays in process memory rather than in a separate service.
- Is turbovec free to use? What license does it have?
- turbovec is open source under the MIT license. Check the license terms before using it in commercial products.
- Is turbovec still maintained?
- Actively maintained. The last commit to turbovec was on Oct 7, 2026.
- What can I use turbovec for?
- Building a local RAG retriever that keeps embeddings in process memory. Searching large embedding collections on a machine with limited RAM. Adding a vector store to a LangChain or LlamaIndex application without running a separate database. Offline or privacy-sensitive semantic search where no data should leave the process.
- How do I install turbovec?
- Install the Python package from PyPI: pip install turbovec Build and index vectors with TurboQuantIndex (see README example)
- Where can I get turbovec?
- The source code and installation instructions are on GitHub: https://github.com/RyanCodrai/turbovec
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A local vector index and RAG toolkit that cuts storage by about 97% by recomputing embeddings on demand, so you can search personal data on your laptop.
Open-source pipeline that renders web pages and PDFs as screenshots and retrieves them visually, so tables and charts survive for RAG.
A free, open-source 10-week online course on building LLM applications with RAG, vector search, agents, evaluation and monitoring.
Official Python client library for the Qdrant vector search engine, with sync and async REST/gRPC access and a local in-memory mode.
A step-by-step educational project that builds Retrieval-Augmented Generation from scratch in JavaScript using local LLMs and no cloud APIs.