Skip to main content

Hadamard-Lloyd Weight Quantization for LLMs (placeholder reservation)

Project description

HLWQ — Hadamard-Lloyd Weight Quantization

Status: name reservation (v0.0.1). The full implementation will land in subsequent releases.

HLWQ is a post-training weight quantization technique for large language models. It compresses each block of weights via three steps:

  1. Per-block normalization to the unit hypersphere
  2. Walsh-Hadamard rotation to transform coordinates into approximately Gaussian random variables
  3. Lloyd-Max scalar quantization with centroids matched to the post-rotation Gaussian distribution

The combination achieves near-lossless compression at 5 bits per weight on Qwen3.5-9B (PPL 6.40 vs FP16 baseline 6.37), without any calibration data.

Reference

Vicentino, C. PolarQuant: Optimal Gaussian Weight Quantization via Hadamard Rotation for LLM Compression. arXiv:2603.29078, 2026.

Naming history

This technique was originally published under the name PolarQuant in the arxiv paper above. It is being rebranded to HLWQ (Hadamard-Lloyd Weight Quantization) to disambiguate from an unrelated, earlier algorithm also named PolarQuant published by Google Research:

Han, I., Kacham, P., Karbasi, A., Mirrokni, V., and Zandieh, A. PolarQuant: Quantizing KV Caches with Polar Transformation. arXiv:2502.02617, 2025.

Han et al.'s PolarQuant addresses KV cache compression with a random rotation (polar transformation). HLWQ addresses weight compression with a deterministic Walsh-Hadamard rotation. The applications and rotation mechanisms differ; only the historical name overlapped, and HLWQ is the disambiguated brand going forward.

License

Apache-2.0

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

hlwq-0.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

hlwq-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file hlwq-0.0.1.tar.gz.

File metadata

  • Download URL: hlwq-0.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hlwq-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7ef440765060678c44877b5799ed750846cb4d1ff7ece0711bace36babbd5a2e
MD5 2210dafc5362e57d6e9a95e18396ca70
BLAKE2b-256 604bc786b7cb2359254247021fce8ba01b89940d7913a2704405b6f6fc7cde83

See more details on using hashes here.

File details

Details for the file hlwq-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: hlwq-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hlwq-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d48f474262588b13e5d2fb35a34e2a18d476bf83cd74df2937caaecd4823b892
MD5 0441446833eff079a59ac4b98b0dda15
BLAKE2b-256 e73ce21ac09dbdc635a846a52bbf8b3e86e3dafc8c0644a7601a9bf36e2de36a

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