• bitcoinBitcoin(BTC)$77,391.000.72%
  • ethereumEthereum(ETH)$2,124.870.53%
  • tetherTether(USDT)$1.00-0.01%
  • binancecoinBNB(BNB)$648.271.29%
  • rippleXRP(XRP)$1.360.06%
  • usd-coinUSDC(USDC)$1.00-0.01%
  • solanaSolana(SOL)$85.941.79%
  • tronTRON(TRX)$0.3589840.85%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.040.29%
  • dogecoinDogecoin(DOGE)$0.1033690.22%
  • HyperliquidHyperliquid(HYPE)$54.5012.90%
  • whitebitWhiteBIT Coin(WBT)$57.040.51%
  • zcashZcash(ZEC)$674.6717.20%
  • USDSUSDS(USDS)$1.000.01%
  • leo-tokenLEO Token(LEO)$10.041.07%
  • cardanoCardano(ADA)$0.2488510.00%
  • bitcoin-cashBitcoin Cash(BCH)$372.170.59%
  • moneroMonero(XMR)$403.301.29%
  • chainlinkChainlink(LINK)$9.611.52%
  • CantonCanton(CC)$0.1547984.41%
  • the-open-networkToncoin(TON)$2.042.05%
  • stellarStellar(XLM)$0.143452-0.20%
  • USD1USD1(USD1)$1.000.02%
  • Ethena USDeEthena USDe(USDE)$1.00-0.02%
  • daiDai(DAI)$1.000.01%
  • suiSui(SUI)$1.071.67%
  • litecoinLitecoin(LTC)$53.86-0.85%
  • avalanche-2Avalanche(AVAX)$9.271.66%
  • MemeCoreMemeCore(M)$3.05-13.96%
  • hedera-hashgraphHedera(HBAR)$0.0886310.07%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • RainRain(RAIN)$0.007442-0.15%
  • shiba-inuShiba Inu(SHIB)$0.0000061.31%
  • crypto-com-chainCronos(CRO)$0.0688560.64%
  • Circle USYCCircle USYC(USYC)$1.120.00%
  • tether-goldTether Gold(XAUT)$4,532.860.96%
  • Global DollarGlobal Dollar(USDG)$1.00-0.01%
  • BittensorBittensor(TAO)$272.065.79%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • uniswapUniswap(UNI)$3.614.49%
  • nearNEAR Protocol(NEAR)$1.705.97%
  • mantleMantle(MNT)$0.666.32%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.140.76%
  • pax-goldPAX Gold(PAXG)$4,533.940.97%
  • polkadotPolkadot(DOT)$1.251.52%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.0626084.34%
  • OndoOndo(ONDO)$0.4018038.95%
  • HTX DAOHTX DAO(HTX)$0.0000021.84%
  • Falcon USDFalcon USD(USDF)$1.00-0.02%
  • AsterAster(ASTER)$0.685.23%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Meet Turbovec: A Rust Vector Index with Python Bindings, and Built on Google’s TurboQuant Algorithm

May 20, 2026
in AI & Technology
Reading Time: 7 mins read
A A
Meet Turbovec: A Rust Vector Index with Python Bindings, and Built on Google’s TurboQuant Algorithm
ShareShareShareShareShare

Vector search underpins most retrieval-augmented generation (RAG) pipelines. At scale, it gets expensive. Storing 10 million document embeddings in float32 consumes 31 GB of RAM. For dev teams running local or on-premise inference, that number creates real constraints.

A new open-source library called turbovec addresses this directly. It is a vector index written in Rust with Python bindings. It is built on TurboQuant, a quantization algorithm from Google Research. The same 10-million-document corpus fits in 4 GB with turbovec. On ARM hardware, search speed beats FAISS IndexPQFastScan by 12–20%.

YOU MAY ALSO LIKE

Hulu Bundle Subscribers Can Now Access Their Watch History And Recs In The Disney+ App

How to Build Knowledge Graph Generation Pipelines From Text With kg-gen, NetworkX Analytics, and Interactive Visualizations

The TurboQuant Paper

TurboQuant was introduced by Google’s research team. The Google team proposes TurboQuant as a data-oblivious quantizer. It achieves near-optimal distortion rates across all bit-widths and dimensions. It requires zero training and zero passes over the data.

Most production-grade vector quantizers, including FAISS’s Product Quantization, requires a codebook training step. You must run k-means over a representative sample of your vectors before indexing begins. If your corpus grows or shifts, you may need to retrain and rebuild the index entirely. TurboQuant skips all of that. It uses an analytical property of rotated vectors instead of a data-dependent calibration.

How turbovec Quantizes Vectors

The quantization pipeline has four steps:

(1) Each vector is normalized. The length (norm) is stripped and stored as a single float. Every vector becomes a unit direction on a high-dimensional hypersphere.

(2) A random rotation is applied. All vectors are multiplied by the same random orthogonal matrix. After rotation, each coordinate independently follows a Beta distribution. In high dimensions, this converges to Gaussian N(0, 1/d). This holds for any input data — the rotation makes the coordinate distribution predictable.

(3) Lloyd-Max scalar quantization is applied. Because the distribution is known analytically, the optimal bucket boundaries and centroids can be precomputed from the math alone. For 2-bit quantization, that means 4 buckets per coordinate. For 4-bit, it means 16 buckets. No data passes are needed.

(4) The quantized coordinates are bit-packed into bytes. A 1536-dimensional vector shrinks from 6,144 bytes in FP32 to 384 bytes at 2-bit. That is a 16x compression ratio.

At search time, the query is rotated once into the same domain. Scoring happens directly against the codebook values. The scoring kernel uses SIMD intrinsics — NEON on ARM and AVX-512BW on modern x86, with an AVX2 fallback — with nibble-split lookup tables for throughput.

TurboQuant achieves distortion within approximately 2.7x of the information-theoretic Shannon lower bound.

Recall and Speed: The Numbers

All benchmarks use 100K vectors, 1,000 queries, k=64, and report the median of 5 runs.

For recall, turbovec compares against FAISS IndexPQ (LUT256, nbits=8, float32 LUT). This is a strong baseline: FAISS uses a higher-precision LUT at scoring time and k-means++ for codebook training. Despite this, TurboQuant and FAISS are within 0–1 point at R@1 for OpenAI embeddings at d=1536 and d=3072. Both converge to 1.0 recall by k=4–8. GloVe at d=200 is harder. At that dimension, TurboQuant trails FAISS by 3–6 points at R@1, closing by k≈16–32.

On speed, ARM results (Apple M3 Max) show turbovec beating FAISS IndexPQFastScan by 12–20% across every configuration. On x86 (Intel Xeon Platinum 8481C / Sapphire Rapids, 8 vCPUs), turbovec wins every 4-bit configuration by 1–6%. It runs within ~1% of FAISS on 2-bit single-threaded. Two configurations sit slightly behind FAISS: 2-bit multi-threaded at d=1536 and d=3072. There, the inner accumulate loop is too short for unrolling amortization. FAISS’s AVX-512 VBMI path holds the edge in those two cases (2–4%).

Python API

Installation is a single command: pip install turbovec. The primary class is TurboQuantIndex, initialized with a dimension and bit width.

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.tq")

A second class, IdMapIndex, supports stable external uint64 IDs that survive deletes. Removal is O(1) by ID. This is useful for document stores where vectors are frequently updated or deleted.

turbovec integrates with LangChain (pip install turbovec[langchain]), LlamaIndex (pip install turbovec[llama-index]), and Haystack (pip install turbovec[haystack]). The Rust crate is available via cargo add turbovec.

Marktechpost’s Visual Explainer

What is turbovec?

turbovec is a vector index written in Rust with Python bindings. It is built on Google Research’s TurboQuant algorithm — a data-oblivious quantizer that requires zero codebook training. A 10 million document corpus that occupies 31 GB as float32 fits in 4 GB with turbovec.

⚡ 16x compression at 2-bit

💨 Beats FAISS on ARM by 12–20%

🔒 Fully local — no data egress

📦 MIT licensed

Installation

Install the Python package from PyPI with a single command. For Rust, add the crate via Cargo.

# Python
pip install turbovec

# Rust
cargo add turbovec

Note: To build from source, install maturin then run maturin build –release inside the turbovec-python/ directory. For Rust, run cargo build –release.

Basic Usage — TurboQuantIndex

TurboQuantIndex is the primary class. Initialize it with a vector dim and a bit_width of 2 or 4. Vectors are indexed immediately on add() — no training step required.

from turbovec import TurboQuantIndex

index = TurboQuantIndex(dim=1536, bit_width=4)

# Add vectors (numpy float32 array, shape [n, dim])
index.add(vectors)
index.add(more_vectors)  # incremental adds are fine

# Search: returns top-k scores and positional indices
scores, indices = index.search(query, k=10)

Stable IDs — IdMapIndex

Use IdMapIndex when you need external uint64 IDs that survive deletes. Removal is O(1) by ID — useful for document stores where vectors change over time.

import numpy as np
from turbovec import IdMapIndex

index = IdMapIndex(dim=1536, bit_width=4)

# Map vectors to your own uint64 external IDs
index.add_with_ids(vectors, np.array([1001, 1002, 1003], dtype=np.uint64))

# Search returns your external IDs, not positional indices
scores, ids = index.search(query, k=10)

# O(1) delete by external ID\nindex.remove(1002)

Save & Load an Index

Both index types support persistent storage. TurboQuantIndex writes to .tq files. IdMapIndex writes to .tvim files.

from turbovec import TurboQuantIndex, IdMapIndex

# TurboQuantIndex  —>  .tq
index.write("my_index.tq")
loaded = TurboQuantIndex.load("my_index.tq")

# IdMapIndex  —>  .tvim
index.write("my_index.tvim")
loaded = IdMapIndex.load("my_index.tvim")

Framework Integrations

turbovec ships optional extras for LangChain, LlamaIndex, and Haystack. Install the extra that matches your stack.

# LangChain
pip install turbovec[langchain]

# LlamaIndex
pip install turbovec[llama-index]

# Haystack
pip install turbovec[haystack]

Tip: Each integration plugs turbovec in as a drop-in vector store. See docs/integrations/ in the repo for full usage examples with each framework.

Using turbovec in Rust

The Rust API mirrors the Python API. Both TurboQuantIndex and IdMapIndex are available. All x86_64 builds target AVX2 as baseline; AVX-512 is enabled at runtime via feature detection.

use turbovec::TurboQuantIndex;

let mut index = TurboQuantIndex::new(1536, 4);
index.add(&vectors);

let results = index.search(&queries, 10);

index.write("index.tv").unwrap();
let loaded = TurboQuantIndex::load("index.tv").unwrap();

📚 Full API: docs/api.md

⭐ github.com/RyanCodrai/turbovec

Key Takeaways

  • No codebook training. turbovec indexes vectors instantly — no k-means, no rebuilds as the corpus grows.
  • 16x compression. A 1536-dim float32 vector shrinks from 6,144 bytes to 384 bytes at 2-bit quantization.
  • Faster than FAISS on ARM. turbovec beats FAISS IndexPQFastScan by 12–20% on ARM across every configuration.
  • Near-optimal distortion. TurboQuant achieves distortion within ~2.7x of the Shannon lower bound — provably near the theoretical limit.
  • Fully local. No managed service, no data egress — pairs with any open-source embedding model for an air-gapped RAG stack.

Check out the Repo here. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us


Credit: Source link

ShareTweetSendSharePin

Related Posts

Hulu Bundle Subscribers Can Now Access Their Watch History And Recs In The Disney+ App
AI & Technology

Hulu Bundle Subscribers Can Now Access Their Watch History And Recs In The Disney+ App

May 20, 2026
How to Build Knowledge Graph Generation Pipelines From Text With kg-gen, NetworkX Analytics, and Interactive Visualizations
AI & Technology

How to Build Knowledge Graph Generation Pipelines From Text With kg-gen, NetworkX Analytics, and Interactive Visualizations

May 20, 2026
GitHub confirms 3,800 internal repos stolen through poisoned VS Code extension as supply chain worm hits Microsoft’s Python SDK
AI & Technology

GitHub confirms 3,800 internal repos stolen through poisoned VS Code extension as supply chain worm hits Microsoft’s Python SDK

May 20, 2026
Airbnb Expands Into Hotel Bookings And Even Grocery Deliveries
AI & Technology

Airbnb Expands Into Hotel Bookings And Even Grocery Deliveries

May 20, 2026
Next Post
US puts pressure on Palestinian leaders to withdraw bid for UN vice-presidency role – The Guardian

US puts pressure on Palestinian leaders to withdraw bid for UN vice-presidency role - The Guardian

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Addtech AB (publ.) 2026 Q4 – Results – Earnings Call Presentation (OTCMKTS:ADDHY) 2026-05-20

Addtech AB (publ.) 2026 Q4 – Results – Earnings Call Presentation (OTCMKTS:ADDHY) 2026-05-20

May 20, 2026
A-Star: Small Bets Still Crucial for VC-Style Returns

A-Star: Small Bets Still Crucial for VC-Style Returns

May 20, 2026
WHCD shooting suspect displayed anti-Trump sentiments in writings

WHCD shooting suspect displayed anti-Trump sentiments in writings

May 14, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!