TL;DR
EntroPack is a calibration-free weight compression method that uses $E_8$ lattice quantization and entropy coding to achieve arbitrary, fine-grained bitrates. By combining a novel sampled storage estimation for fast encoding with a parallelized GPU decoder, it achieves significantly lower reconstruction error than fixed-width formats like NF4 while maintaining low inference latency.
What Problem Does This Paper Address?
Deploying large neural networks is often a battle against memory budgets. Standard quantization formats are "fixed-width" (e.g., INT8, FP8, or 4-bit NF4), offering only a few coarse storage options. If your model needs 4.5 bits to maintain quality but your hardware only supports 4-bit or 8-bit paths, you're stuck between a model that is too large or one that performs poorly.
Entropy coding (assigning shorter codes to more frequent values) allows for "fractional" bitrates, but it introduces two major headaches:
- Search Complexity: Finding the exact quantization scale to hit a specific target bitrate usually requires repeatedly encoding the entire model, which is computationally expensive.
- Decoding Latency: Entropy decoding is traditionally a serial process, making it difficult to implement efficiently on parallel hardware like GPUs without bottlenecking inference.
Methods
EntroPack tackles these challenges through a pipeline designed for both flexibility and GPU efficiency:
- Row-Normalized $E_8$ Lattice Quantization: Instead of quantizing weights individually, EntroPack groups them into blocks of eight and maps them to the $E_8$ lattice. This lattice is mathematically proven to be a highly efficient way to pack points in 8D space, reducing quantization noise.
- Conditional Probability Modeling: The $E_8$ lattice consists of two "cosets" (integer and half-integer grids). EntroPack uses a probability model that conditions the coordinate distribution on the coset, squeezing out more redundancy.
- Fast Rate Selection: To avoid the "repeated encoding" problem, the authors use Sampled Target-Rate Search. By quantizing only a small sample of rows and using their probability model to estimate the total size, they can find the optimal quantization scale in a fraction of the time.
- Tiled rANS Decoding: The compressed data is organized into independently decodable "tiles." This allows a GPU to decode many symbols in parallel using Range Asymmetric Numeral Systems (rANS).
- Fused GPU Reconstruction: The decoding, lattice point recovery, and row rescaling are all fused into a single GPU kernel. This avoids materializing intermediate tensors and keeps latency low.
Datasets
The authors evaluated EntroPack across three distinct domains to prove its versatility:
- Image Generation: Z-Image-Turbo (a diffusion transformer).
- Audio-Video Generation: MiniMax-H3.
- Language Modeling: Qwen3.8-27B.
They compared EntroPack against a wide array of baselines, including standard formats (INT8, FP8, NF4, FP4) and recent research methods like HyperQuant and HRTN.
Key Insights and Ideas
- Lattice vs. Scalar: Moving from scalar quantization to lattice quantization provides a better "rate-distortion" trade-off, essentially getting more accuracy for every bit spent.
- Decoupling Precision from Storage: EntroPack allows you to choose the storage bitrate (e.g., 4.2 bpp) independently of the numerical format used for computation (e.g., BF16 or FP8).
- Efficiency through Sampling: The discovery that sampling just a few rows provides a highly accurate estimate of the full tensor's entropy-coded size is what makes the "arbitrary bitrate" feature practical for real-world use.
- Parallelism is Key: By using a tiled layout, the authors overcome the primary weakness of entropy coding on GPUs, making it viable for compute-intensive workloads like diffusion denoising.
Key Results
EntroPack consistently outperforms established fixed-width formats. As shown in Figure 1, it maintains a lower relative $L_2$ error across the entire bitrate spectrum compared to competitors.
- Accuracy: At a 4 bits-per-parameter (bpp) target, EntroPack achieved 24% lower relative $L_2$ weight error than the popular NF4 format while actually using slightly less storage.
- Encoding Speed: EntroPack is remarkably fast. Compressing Z-Image-Turbo took only 3.5 seconds, compared to over 30 seconds for other entropy-coded methods like HRTN or HyperQuant.
- Inference Overhead: For diffusion models, the on-the-fly reconstruction added only about 7.7% to 9.9% latency compared to an uncompressed BF16 model, which is lower than many other floating-point quantization paths.
Limitations and Future Work
- Dense Materialization: Currently, the decoder reconstructs a dense weight tensor in memory before the matrix multiplication. The authors suggest that fusing the decoder directly with the matrix-product kernel could further reduce memory traffic and latency.
- Static Weights Only: The current method is designed for static model weights. Extending this to dynamic tensors like activations or Key-Value (KV) caches would require new, low-latency probability modeling techniques.
- Conversion Cost: While much faster than previous entropy methods, it still requires more work during model conversion than a simple one-pass fixed-width quantization.
Summary updated