Table of Contents
Fetching ...

RaanA: A Fast, Flexible, and Data-Efficient Post-Training Quantization Algorithm

Yongyi Yang, Jianyang Gao, Wei Hu

TL;DR

RaanA introduces a unified post-training quantization framework for LLMs that is fast, data-efficient, and flexible in bit allocation. It combines RaBitQ-H, a Randomized Hadamard-based variant of RaBitQ, with AllocateBits, an integer-programming-based method that optimally distributes bit-widths across layers under a total budget. The approach achieves competitive accuracy with greatly reduced calibration data and hardware requirements, and supports zero-shot calibration. Extensive experiments demonstrate strong performance, fast quantization times on CPU, and meaningful ablations validating the contributions, with practical impact for deploying large models in resource-constrained environments.

Abstract

Post-training Quantization (PTQ) has become a widely used technique for improving inference efficiency of large language models (LLMs). However, existing PTQ methods generally suffer from crucial limitations such as heavy calibration data requirements and inflexible choice of target number of bits. In this paper, we propose RaanA, a unified PTQ framework that overcomes these challenges by introducing two novel components: 1) RaBitQ-H, a variant of a randomized vector quantization method RaBitQ, designed for fast, accurate, and highly efficient quantization; and 2) AllocateBits, an algorithm that optimally allocates bit-widths across layers based on their quantization sensitivity. RaanA achieves competitive performance with state-of-the-art quantization methods while being extremely fast, requiring minimal calibration data, and enabling flexible bit allocation. Extensive experiments demonstrate RaanA's efficacy in balancing efficiency and accuracy. The code is publicly available at https://github.com/FFTYYY/RaanA .

RaanA: A Fast, Flexible, and Data-Efficient Post-Training Quantization Algorithm

TL;DR

RaanA introduces a unified post-training quantization framework for LLMs that is fast, data-efficient, and flexible in bit allocation. It combines RaBitQ-H, a Randomized Hadamard-based variant of RaBitQ, with AllocateBits, an integer-programming-based method that optimally distributes bit-widths across layers under a total budget. The approach achieves competitive accuracy with greatly reduced calibration data and hardware requirements, and supports zero-shot calibration. Extensive experiments demonstrate strong performance, fast quantization times on CPU, and meaningful ablations validating the contributions, with practical impact for deploying large models in resource-constrained environments.

Abstract

Post-training Quantization (PTQ) has become a widely used technique for improving inference efficiency of large language models (LLMs). However, existing PTQ methods generally suffer from crucial limitations such as heavy calibration data requirements and inflexible choice of target number of bits. In this paper, we propose RaanA, a unified PTQ framework that overcomes these challenges by introducing two novel components: 1) RaBitQ-H, a variant of a randomized vector quantization method RaBitQ, designed for fast, accurate, and highly efficient quantization; and 2) AllocateBits, an algorithm that optimally allocates bit-widths across layers based on their quantization sensitivity. RaanA achieves competitive performance with state-of-the-art quantization methods while being extremely fast, requiring minimal calibration data, and enabling flexible bit allocation. Extensive experiments demonstrate RaanA's efficacy in balancing efficiency and accuracy. The code is publicly available at https://github.com/FFTYYY/RaanA .

Paper Structure

This paper contains 37 sections, 2 theorems, 22 equations, 13 tables, 5 algorithms.

Key Result

Corollary 4.2

Fix the model input ${\boldsymbol{x}}$ and parameter ${\boldsymbol{\theta}}$, and suppose ${\boldsymbol{\epsilon}} = {\boldsymbol{\epsilon}}^{(k)}(b)$ satisfies ass:subgaussian-error, then the following statement holds with probability at least $0.99$: where we use $\lesssim$ to hide constant coefficients and small $O(1/d)$ terms.

Theorems & Definitions (3)

  • Corollary 4.2: Informal
  • Theorem B.2
  • proof