Repolode
RyanCodrai

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. 1

    Install the Python package from PyPI

    pip install turbovec
  2. 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