Leech Lattice Vector Quantization: Using 24-Dimensional Geometry to Compress LLMs
*(English translation of a Chinese-language explainer post from zhichai.net.)*
Introduction
Large language models contain billions—even hundreds of billions—of parameters, making storage and compute costs enormous. In March 2026, a paper from Qualcomm AI Research (Tycho van der Ouderaa and colleagues) applied one of mathematics' most beautiful structures—the Leech lattice, the optimal sphere packing in 24-dimensional space—to LLM quantization.
Background: The Sphere Packing Problem
- 1-D/2-D: packing is trivial or hexagonal (~90.69% density, the honeycomb pattern).
- 3-D: Kepler conjectured the face-centered cubic packing (~74.05%) in 1611; proven by Thomas Hales in 1998.
- 8-D and 24-D: In 2017, Maryna Viazovska proved E8 is optimal in 8 dimensions; with Henry Cohn and others, she proved the same for the Leech lattice in 24 dimensions. She won the 2022 Fields Medal for this work.
- Scalar quantization (each parameter independently) hits a fundamental information-theoretic limit.
- Vector quantization (VQ) groups parameters for joint compression but faces codebook explosion (2⁴⁸ entries for 24 parameters × 2 bits), intractable nearest-neighbor search, and memory bandwidth issues.
- Extended Golay code search: exploits the Golay–Leech connection for efficient nearest-neighbor search without enumeration.
- Indexing and shell (angle) search: direct lattice-point-to-bitstring indexing and flexible rate allocation across shells.
- Fully parallelized dequantization kernel: a GPU kernel that converts bitstrings back to floating-point weights at inference speed comparable to QuIP#.
- Higher-dimensional lattices (48-D, 72-D) with other extremal structures.
- Activation quantization alongside weight quantization.
- Quantization-aware training vs. post-training quantization.
- Hardware co-design for lattice operations.
- Extension to multimodal models.
The Leech lattice (John Leech, 1965) has remarkable properties:
1. Optimal packing in 24 dimensions. 2. Kissing number 196,560 — each sphere touches nearly 200,000 neighbors, ~10× random packing. 3. No short vectors (after normalization, no points within distance 2 of the origin). 4. Extreme symmetry via the Conway group Co₀ (over 8×10¹⁸ elements), linked to sporadic simple groups. 5. Universal optimality (Cohn et al., 2019): optimal for a broad class of energy-minimization problems.
It can be constructed from the extended binary Golay code, a perfect error-correcting code that corrects 3 errors per 24-bit block.
The LLM Compression Problem
A Llama 3.1 405B model stored in FP16 requires ~810GB. Quantization reduces parameters from 16-bit floats to 4-, 3-, or 2-bit representations at the cost of accuracy.
Prior work: QuIP# (2024) used Hadamard incoherence processing plus E8-lattice codebooks; QTIP used trellis-coded quantization (TCQ).
The LLVQ Method
LLVQ (Leech Lattice Vector Quantization) asks: use 24-dimensional Leech instead of 8-dimensional E8. Higher dimension yields better rate-distortion trade-offs, and Gaussian-like post-Hadamard weight distributions pair naturally with the lattice's geometry.
Key technical solutions:
Results
Benchmarked against QuIP#, QTIP, AQLM, GPTVQ, and PVQ on WikiText-2/C4 perplexity and zero-shot tasks:
1. Lowest perplexity across Llama 2 and Llama 3 families at 2, 3, and 4 bits. 2. Largest gains at 2-bit extreme compression, where scalar methods essentially fail. 3. Biggest advantage on 405B-scale models. 4. Inference speed comparable to QuIP#.
Example (Llama 2 7B at 2 bits, WikiText-2 perplexity): FP16 ≈ 5.1; QuIP# ≈ 8.5; LLVQ ≈ 8.0 — better quality at the same 8× compression.
Outlook
References
1. van der Ouderaa, T. F. A., van Baalen, M., Whatmough, P., & Nagel, M. (2026). Leech Lattice Vector Quantization for Efficient LLM Compression. *arXiv:2603.11021*. https://arxiv.org/abs/2603.11021 2. Cohn, H., Kumar, A., Miller, S. D., Radchenko, D., & Viazovska, M. (2017). The sphere packing problem in dimension 24. *Annals of Mathematics*, 185(3), 1017-1033. https://doi.org/10.4007/annals.2017.185.3.8 3. Tseng, A., Chee, J., Sun, Q., Kuleshov, V., & De Sa, C. (2024). QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks. *ICML 2024*. https://arxiv.org/abs/2402.04396 4. Chee, J., Cai, Y., Kuleshov, V., & De Sa, C. (2024). QTIP: Quantization with Trellises and Incoherence Processing. *NeurIPS 2024*. https://arxiv.org/abs/2406.11235 5. Conway, J. H., & Sloane, N. J. A. (2013). *Sphere Packings, Lattices and Groups* (3rd ed.). Springer. ISBN: 978-1-4757-6568-7