Skip to main content

TurboQuant for MLX (arXiv:2504.19874)

Project description

turboquant-mlx

turboquant-mlx packages a small MLX-oriented reference implementation of the TurboQuant building blocks described in arXiv:2504.19874:

  • orthogonal rotations
  • scalar codebooks
  • polar quantization for keys and values
  • a 1-bit QJL sketch
  • outlier channel handling

Installation

python -m pip install turboquant-mlx

For development:

python -m pip install -e ".[dev]"
pytest

Runtime requirements

The package depends on mlx and therefore targets Apple Silicon macOS environments where MLX is supported. The test suite uses a lightweight stub for mlx.core so package logic can still be validated in environments where the Metal runtime is unavailable.

Package contents

  • Rotation: fast Walsh-Hadamard or dense QR rotations
  • Codebook: scalar quantization codebooks and persistence helpers
  • PolarQuant: key/value encode-decode helpers
  • SplitTurboQuant: paper-style mixed-precision split quantization for 2.5/3.5-bit setups
  • QJL: 1-bit quantized Johnson-Lindenstrauss sketch
  • OutlierHandler: EMA-based outlier channel selection for routing channels into the higher-bit split quantizer

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_mlx-0.1.0.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_mlx-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file turboquant_mlx-0.1.0.tar.gz.

File metadata

  • Download URL: turboquant_mlx-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for turboquant_mlx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e4b899fda39f14955b8ace2f5e78348038272d68ce20e048fbd9497f942ce011
MD5 d46de6cfa76bc6e14d2c7e48f3d63d24
BLAKE2b-256 af02cb31e021417c8e949aee089b93057b689b376d7d54716788da7ff48e6e3f

See more details on using hashes here.

File details

Details for the file turboquant_mlx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: turboquant_mlx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for turboquant_mlx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12589a77aea87f7d1046123a1c5d9cd8dfcaa3693adfaa924ea0990d784949a1
MD5 e68ebfd0b148aa46b1a182933bde0cb1
BLAKE2b-256 d25b9e8635664626ff5851fd831da05f314b882d3ea0f7a4468bfb37cae138a0

See more details on using hashes here.

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