🧊 TurboQuant Tools
Compress AI embeddings by 5–7× with near-lossless quality.
CLI + Python Library + MCP Server for extreme vector compression using Google's TurboQuant (PolarQuant + QJL) — wrapped in a clean numpy-first API.
Quick Start
pip install turboquant-tools
turboquant compress embeddings.npy --bits 3
from turboquant_tools import compress, decompress
import numpy as np
vectors = np.random.randn(1000, 384).astype(np.float32)
compressed = compress(vectors, bits=3)
print(f"Original: {vectors.nbytes / 1e6:.1f} MB")
print(f"Compressed: {compressed.nbytes / 1e6:.1f} MB")
CLI
# Compress embeddings
turboquant compress embeddings.npy --bits 3 --output compressed.tq
# Estimate savings without compressing
turboquant estimate embeddings.npy
# Decompress
turboquant decompress compressed.tq --output restored.npy
MCP Server
turboquant mcp-server
Exposes compress_embeddings, decompress_embeddings, estimate_savings, embed_and_compress.
How It Works
- PolarQuant — Random rotation + polar coordinate quantization (3-bit)
- QJL — Quantized Johnson-Lindenstrauss error correction (1-bit)
Result: ~5x compression with near-zero accuracy loss, no training needed.
Use Cases
- RAG pipelines — Store 5x more documents in the same RAM
- Local LLMs — Fit larger vector stores on your GPU/CPU
- Edge devices — Deploy vector search with minimal memory
- AI Agents — Compress embeddings between agent calls
License
MIT
Release files for turboquant-tools 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| turboquant_tools-0.1.2.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| turboquant_tools-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.3 kB
Release files / turboquant_tools-0.1.2.tar.gz
| Download URL | turboquant_tools-0.1.2.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fc79eed829048254c54751fed41df337c18d0217badc3f07712350d5ef254c2
|
|
BLAKE2b-256 checksum How to use checksums |
57f5c51d5da8f83f5ae0fb62979f4cfd7234118a56fa2044f20111a704113254
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 21, 2026.
Transparency logRelease files / turboquant_tools-0.1.2-py3-none-any.whl
| Download URL | turboquant_tools-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5c2b7d0c7a6d1c0df29f72cc83af4621ba604122bf338865a4721d9aac14aa2
|
|
BLAKE2b-256 checksum How to use checksums |
f75d1278e787f9a831ddefb8537b4a270fd75c244e47c6de8725305cee6f0d2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 21, 2026.
Transparency log