CLI + MCP Server + Python Library for TurboQuant-based embedding compression
Project description
🧊 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file turboquant_tools-0.1.2.tar.gz.
File metadata
- Download URL: turboquant_tools-0.1.2.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fc79eed829048254c54751fed41df337c18d0217badc3f07712350d5ef254c2
|
|
| MD5 |
d029077bc1ef03a9d7c4056eb5e073c4
|
|
| BLAKE2b-256 |
57f5c51d5da8f83f5ae0fb62979f4cfd7234118a56fa2044f20111a704113254
|
Provenance
The following attestation bundles were made for turboquant_tools-0.1.2.tar.gz:
Publisher:
release.yml on FreezeVII/turboquant-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
turboquant_tools-0.1.2.tar.gz -
Subject digest:
7fc79eed829048254c54751fed41df337c18d0217badc3f07712350d5ef254c2 - Sigstore transparency entry: 1892494937
- Sigstore integration time:
-
Permalink:
FreezeVII/turboquant-tools@c0344374b53f81372f6d658dcef939cfacce640f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/FreezeVII
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c0344374b53f81372f6d658dcef939cfacce640f -
Trigger Event:
push
-
Statement type:
File details
Details for the file turboquant_tools-0.1.2-py3-none-any.whl.
File metadata
- Download URL: turboquant_tools-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5c2b7d0c7a6d1c0df29f72cc83af4621ba604122bf338865a4721d9aac14aa2
|
|
| MD5 |
8e7b8ff496600d637da8b8ebbeb54d86
|
|
| BLAKE2b-256 |
f75d1278e787f9a831ddefb8537b4a270fd75c244e47c6de8725305cee6f0d2e
|
Provenance
The following attestation bundles were made for turboquant_tools-0.1.2-py3-none-any.whl:
Publisher:
release.yml on FreezeVII/turboquant-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
turboquant_tools-0.1.2-py3-none-any.whl -
Subject digest:
f5c2b7d0c7a6d1c0df29f72cc83af4621ba604122bf338865a4721d9aac14aa2 - Sigstore transparency entry: 1892495132
- Sigstore integration time:
-
Permalink:
FreezeVII/turboquant-tools@c0344374b53f81372f6d658dcef939cfacce640f -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/FreezeVII
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c0344374b53f81372f6d658dcef939cfacce640f -
Trigger Event:
push
-
Statement type: