Skip to main content

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.

PyPI Python License Tests


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

  1. PolarQuant — Random rotation + polar coordinate quantization (3-bit)
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turboquant_tools-0.1.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turboquant_tools-0.1.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

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

Hashes for turboquant_tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7fc79eed829048254c54751fed41df337c18d0217badc3f07712350d5ef254c2
MD5 d029077bc1ef03a9d7c4056eb5e073c4
BLAKE2b-256 57f5c51d5da8f83f5ae0fb62979f4cfd7234118a56fa2044f20111a704113254

See more details on using hashes here.

Provenance

The following attestation bundles were made for turboquant_tools-0.1.2.tar.gz:

Publisher: release.yml on FreezeVII/turboquant-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file turboquant_tools-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for turboquant_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c2b7d0c7a6d1c0df29f72cc83af4621ba604122bf338865a4721d9aac14aa2
MD5 8e7b8ff496600d637da8b8ebbeb54d86
BLAKE2b-256 f75d1278e787f9a831ddefb8537b4a270fd75c244e47c6de8725305cee6f0d2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for turboquant_tools-0.1.2-py3-none-any.whl:

Publisher: release.yml on FreezeVII/turboquant-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page