OSTQuant: Refining Large Language Model Quantization with Orthogonal and Scaling Transformations for Better Distribution Fitting

Xing Hu, Yuan Cheng, Dawei Yang, Zhixuan Chen, Zukang Xu, JiangyongYu, Xuchen, Zhihang Yuan, Zhe jiang, Sifan Zhou

Quantizing Large Language Models (LLMs) is a critical technique for reducing memory footprint and accelerating inference. However, the presence of high-magnitude outliers in activations and weights often leads to significant precision loss. These outliers force the quantization range to expand, causing the majority of values to be represented with very few bits, effectively squashing the useful information.

The QSUR Metric and OSTQuant

To address this, researchers from Houmo AI, Nanjing University, and Southeast University propose OSTQuant. The framework moves beyond heuristic fixes by treating quantization as a distribution-fitting problem. It introduces a formal metric, Quantization Space Utilization Rate (QSUR), which measures the ratio of the volume occupied by the data to the volume of the quantization hypercube. By maximizing QSUR, the model ensures that data "fits" better within its allocated bits.

Comparison of different transformations on data distribution and QSUR. OSTQuant (d) achieves the highest utilization by optimally rotating and scaling the data.

Methodology: Reshaping the Distribution

OSTQuant employs learnable orthogonal and scaling transformations ($T = \Lambda O$) to reshape data distributions before quantization. Unlike previous methods that use fixed rotations, OSTQuant optimizes these transformations for each layer:

  1. Scaling ($\Lambda$): A diagonal matrix that balances inter-channel variances.
  2. Orthogonal ($O$): A rotation matrix optimized on the Stiefel manifold using Riemannian Adam. This rotation "smears" outliers across multiple dimensions, reducing their individual impact on the quantization scale and allowing for a tighter fit.
  3. KL-Top Loss: To prevent overfitting on small calibration sets (typically ~1,000 samples), the authors introduce KL-Top loss. This loss function computes KL-divergence only over the top-$k$ highest-probability tokens from the teacher model, focusing the optimization on critical semantic information rather than the noise in the vocabulary's long tail.

Results and Performance

The effectiveness of OSTQuant is particularly evident in aggressive quantization settings. In the W4A4KV4 configuration (4-bit weights, activations, and KV cache), OSTQuant reduced the performance gap by 32% on LLaMA-3-8B compared to previous state-of-the-art methods like SpinQuant.

Input distributions for MHSA and FFN layers before and after OSTQuant. The transformation effectively suppresses outliers, leading to a more uniform distribution suitable for quantization.

In 4-bit weight-only settings, the method retains 99.5% of the original floating-point accuracy. A key advantage of OSTQuant is its efficiency; calibration for a LLaMA-3-8B model takes only 20 minutes on a single A800 GPU. Once optimized, the transformations are fused into the model weights, resulting in zero runtime overhead during inference. This leads to over 2x inference speedup and 3.5x memory savings compared to FP16.

Conclusion

OSTQuant provides a principled approach to LLM quantization by optimizing the geometry of data distributions. By introducing the QSUR metric and learnable transformations, it enables near-lossless 4-bit quantization, paving the way for efficient deployment of massive models on commodity hardware.

Summary updated

BibTeX
@inproceedings{hu2025ostquant,
  author = {Xing Hu and Yuan Cheng and Dawei Yang and Zhixuan Chen and Zukang Xu and JiangyongYu and XUCHEN and Zhihang Yuan and Zhe jiang and Sifan Zhou},
  title = {{OSTQuant: Refining Large Language Model Quantization with Orthogonal and Scaling Transformations for Better Distribution Fitting}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=rAcgDBdKnP},
}
Figure