SpectrumQuant: Spectrum Alignment for LLM Quantization
Organizations: Indian Institute of Science Bengaluru-560012, Karnataka, India
Abstract
Orthogonal transforms have emerged as an effective tool for low-bit quantization of large language models (LLMs), as they reshape activation distributions without changing the underlying model function. Existing approaches typically rely either on fixed data-agnostic transforms, such as Hadamard rotations, or on calibration-time optimization of learned rotations. We study rotation selection from first principles and show that maximizing covariance leads to spectral alignment and provides a principled criterion for constructing quantization-friendly orthogonal transforms. Based on this insight, we propose SpectrumQuant, a closed-form rotation method that estimates activation covariance from calibration data and uses it to construct a covariance-aware orthogonal transform for post-training quantization. Our formulation characterizes quantization-friendly rotations as compositions of alignment and mixing components, while recovering Hadamard matrices as a special case. Interestingly, a class of butterfly matrices belongs to this category. In the realm of LLM quantization, SpectrumQuant bridges the gap between data-agnostic structured rotations and learned rotations, providing an effective and efficient data-aware alternative for post-training quantization. Experiments on Llama and Mistral models show that SpectrumQuant is competitive with state-of-the-art rotation strategies while requiring less than one-third of the GPU memory and significantly less time than learned rotations approaches like SpinQuant and DartQuant.
Figures & tables
| Data-Agnostic Rotation (QuaRot, QuIP#) | Learned Rotation (SpinQuant, OSTQuant) | Calibration-Optimized Rotation (DartQuant, ButterflyQuant) | Non-Orthogonal Transform (WUSH, CAT) | SpectrumQuant (Ours) | |
| Closed-form | ✓ | ✗ | ✗ | ✓ | ✓ |
| Data-aware | ✗ | ✓ | ✓ | ✓ | ✓ |
| Zero inference overhead | ✓ | ✓ | ✓ | ✗ | ✓ |
| Cost | Method | 7B | 13B | 70B |
| GPU hour (h) | SpinQuant | 0.41 | 0.84 | 46.40 |
| DartQuant | 0.32 | 0.57 | 3.74 | |
| SpectrumQuant | 0.26 | 0.35 | 2.25 | |
| Memory (GiB) | SpinQuant | 18.23 | 32.21 | 218.72 |
| DartQuant | 15.79 | 27.80 | 128.21 | |
| SpectrumQuant | 4.51 | 7.05 | 22.42 |
| Method | Llama-2 7B | Llama-2 13B | Llama-3 8B | Mistral 7B | Llama-2 70B | |||||
| PPL | zero-shot 8 | PPL | zero-shot 8 | PPL | zero-shot 8 | PPL | zero-shot 8 | PPL | zero-shot 8 | |
| FP16 | 16.88 | 63.66 | 20.85 | 65.99 | 8.92 | 66.54 | 17.04 | 67.74 | 11.09 | 70.07 |
| QuaRot | 25.57 1.22 | 59.73 0.36 | 24.64 0.45 | 63.34 0.38 | 12.10 0.13 | 59.70 0.61 | 20.11 0.42 | 64.37 0.21 | 11.68 0.14 | 68.66 0.36 |
| SpinQuant | 22.92 0.67 | 59.23 0.54 | 24.93 0.88 | 63.19 0.50 | 11.67 0.09 | 61.36 0.44 | 19.50 0.26 | 65.18 0.18 | 12.26 0.14 | 68.58 0.50 |
| DartQuant | 20.46 0.20 | 60.99 0.43 | 24.47 0.60 | 64.30 0.14 | 10.95 0.05 | 62.74 0.35 | 18.73 0.30 | 65.34 0.28 | 12.00 0.08 | 68.87 0.42 |
| SpectrumQuant ( ) | 21.50 0.46 | 60.06 0.32 | 24.53 0.56 | 63.71 0.58 | 10.99 0.12 | 62.57 0.50 | 18.77 0.17 | 65.45 0.34 | 12.00 0.11 | 68.94 0.54 |
| Model | Dataset | WikiText2 | PTB | C4 |
| Llama-2 7B | WikiText2 | |||
| PTB | ||||
| C4 | ||||
| Mistral 7B v0.3 | WikiText2 | |||
| PTB | ||||
| C4 |
| No. of samples | WikiText2 | PTB | C4 | Avg. PPL |
| 64 | 6.169 ±0.033 | 49.07 ±2.24 | 8.393 ±0.065 | 21.21 ±0.76 |
| 128 | 6.28 ±0.06 | 49.86 ±1.31 | 8.37 ±0.06 | 21.50 ±0.46 |
| 256 | 6.188 ±0.038 | 50.22 ±2.12 | 8.429 ±0.023 | 21.61 ±0.72 |
| Model | WikiText2 | PTB | C4 | Avg. PPL | zero-shot 8 |
| Llama-2 7B | 6.21 ±0.04 | 49.93 ±1.00 | 8.49 ±0.10 | 21.54 ±0.38 | 60.26 ±0.46 |
| Llama-3 8B | 7.74 ±0.06 | 13.34 ±0.07 | 12.57 ±0.09 | 11.22 ±0.07 | 62.85 ±0.74 |
| Mistral 7B v0.3 | 5.66 ±0.02 | 43.03 ±1.20 | 9.01 ±0.01 | 19.23 ±0.41 | 64.56 ±0.30 |
| Quant | SpinQuant | DartQuant | SpectrumQuant | |
| Decode Tokens/sec | 18.330 | 18.337 | 18.246 | 18.397 |
| Decode ms/Token | 54.6 | 54.5 | 54.8 | 54.4 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Bits | Method | Wiki | PTB | C4 | Avg |
| (W-A-KV) | |||||
| 16 | Full Precision | 5.47 | 37.91 | 7.26 | 16.88 |
| 4-4-4 | QuaRot | ||||
| SpinQuant | |||||
| DartQuant | |||||
| SpectrumQuant ( ) |
| Bits | Method | WG | SIQA | PIQA | OBQA | LAMB | HS | ARC-E | ARC-C | Avg |
| (W-A-KV) | ||||||||||
| 16 | Full Precision | 69.06 | 46.16 | 79.05 | 44.20 | 73.90 | 76.02 | 74.54 | 46.33 | 63.66 |
| 4-4-4 | QuaRot | |||||||||
| SpinQuant | ||||||||||
| DartQuant | ||||||||||
| SpectrumQuant ( ) |
| Bits | Method | Wiki | PTB | C4 | Avg |
| (W-A-KV) | |||||
| 16 | Full Precision | 4.88 | 50.94 | 6.73 | 20.85 |
| 4-4-4 | QuaRot | ||||
| SpinQuant | |||||
| DartQuant | |||||
| SpectrumQuant ( ) |
| Bits | Method | WG | SIQA | PIQA | OBQA | LAMB | HS | ARC-E | ARC-C | Avg |
| (W-A-KV) | ||||||||||
| 16 | Full Precision | 72.14 | 47.39 | 80.52 | 45.20 | 76.73 | 79.38 | 77.44 | 49.15 | 65.99 |
| 4-4-4 | QuaRot | |||||||||
| SpinQuant | ||||||||||
| DartQuant | ||||||||||
| SpectrumQuant ( ) |
| Bits | Method | Wiki | PTB | C4 | Avg |
| (W-A-KV) | |||||
| 16 | Full Precision | 6.14 | 11.18 | 9.45 | 8.92 |
| 4-4-4 | QuaRot | ||||
| SpinQuant | |||||
| DartQuant | |||||
| SpectrumQuant ( ) |
| Bits | Method | WG | SIQA | PIQA | OBQA | LAMB | HS | ARC-E | ARC-C | Avg |
| (W-A-KV) | ||||||||||
| 16 | Full Precision | 73.32 | 47.19 | 80.96 | 45.00 | 75.63 | 79.14 | 77.82 | 53.24 | 66.54 |
| 4-4-4 | QuaRot | |||||||||
| SpinQuant | ||||||||||
| DartQuant | ||||||||||
| SpectrumQuant ( ) |
| Bits | Method | Wiki | PTB | C4 | Avg |
| (W-A-KV) | |||||
| 16 | Full Precision | 5.32 | 37.34 | 8.48 | 17.04 |
| 4-4-4 | QuaRot | ||||
| SpinQuant | |||||
| DartQuant | |||||
| SpectrumQuant ( ) |
| Bits | Method | WG | SIQA | PIQA | OBQA | LAMB | HS | ARC-E | ARC-C | Avg |
| (W-A-KV) | ||||||||||
| 16 | Full Precision | 74.74 | 47.65 | 82.05 | 47.60 | 75.00 | 80.67 | 80.01 | 54.18 | 67.74 |
| 4-4-4 | QuaRot | |||||||||
| SpinQuant | ||||||||||
| DartQuant | ||||||||||
| SpectrumQuant ( ) |
| Bits | Method | Wiki | PTB | C4 | Avg |
| (W-A-KV) | |||||
| 16 | Full Precision | 3.32 | 24.25 | 5.71 | 11.09 |
| 4-4-4 | QuaRot | ||||
| SpinQuant | |||||
| DartQuant | |||||
| SpectrumQuant ( ) |
| Bits | Method | WG | SIQA | PIQA | OBQA | LAMB | HS | ARC-E | ARC-C | Avg |
| (W-A-KV) | ||||||||||
| 16 | Full Precision | 77.98 | 49.13 | 82.75 | 48.80 | 79.58 | 83.80 | 81.02 | 57.51 | 70.07 |
| 4-4-4 | QuaRot | |||||||||
| SpinQuant | ||||||||||
| DartQuant | ||||||||||
| SpectrumQuant ( ) |
LLM Quantization
Large language model quantization reduces numerical precision to lower memory use and accelerate training or inference.
See all 380 papers