| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
| 3 | """TurboQuant: KV-cache quantization for vLLM. |
| 4 | |
| 5 | Hadamard rotation + per-coordinate Lloyd-Max scalar quantization for |
| 6 | keys, uniform quantization for values. |
| 7 | |
| 8 | The core algorithmic pattern implemented for key quantization (Hadamard |
| 9 | rotation followed by deterministic scalar quantization and |
| 10 | re-normalization) was originally established in DRIVE (Vargaftik et al., |
| 11 | NeurIPS 2021) and EDEN (Vargaftik et al., ICML 2022). This formulation is |
| 12 | also mathematically equivalent to the scalar case of the HIGGS |
| 13 | quantization method (Malinovskii et al., "Pushing the Limits of Large |
| 14 | Language Model Quantization via the Linearity Theorem", NAACL 2025; |
| 15 | preprint arXiv:2411.17525), which subsequently generalized these concepts. |
| 16 | |
| 17 | A first application of this approach to KV-cache compression is in "Cache |
| 18 | Me If You Must: Adaptive Key-Value Quantization for Large Language Models" |
| 19 | (Shutova et al., ICML 2025; preprint arXiv:2501.19392). All of these |
| 20 | foundational and application references pre-date the TurboQuant paper |
| 21 | (Zandieh et al., ICLR 2026). |
| 22 | """ |
| 23 | |
| 24 | from vllm.model_executor.layers.quantization.turboquant.config import TurboQuantConfig |
| 25 | |
| 26 | __all__ = ["TurboQuantConfig"] |