Back to directory

EOQ: Entropy-Optimal Quantization for LLMs

A quantization method for large language models that rotates weights toward a Gaussian distribution before applying optimal centroids, shrinking a model's memory footprint with close to full-precision accuracy.

EOQ: Entropy-Optimal Quantization for LLMs

EOQ's core technique, called PolarQuant, quantizes a model's weights in three steps: block-normalizing weights by their L2 norm, applying a Walsh-Hadamard rotation that reshapes the weight distribution to approximate a Gaussian, and then quantizing with Lloyd-Max centroids, which are optimal for that distribution. Compact storage keeps one byte per weight for the resulting integer codes and norms.

On a Qwen3.5-9B model, the project's own benchmarks report the Hadamard rotation step as responsible for about 98 percent of the accuracy improvement over plain quantization, with Lloyd-Max centroids adding a smaller additional gain on top of rotation; a recommended configuration combining the method with 4-bit integer quantization is reported to use roughly a third of the VRAM of an FP16 baseline at a small accuracy cost. The method also runs on Apple Silicon through MLX with 4-bit quantization.

It is written in Python, and an accompanying arXiv preprint describes the method.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.