LO-BCQ: Block Clustered Quantization for 4-bit (W4A4) LLM Inference

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Elangovan, Reena, Sakr, Charbel, Raghunathan, Anand, Khailany, Brucek
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917274173046784
author Elangovan, Reena
Sakr, Charbel
Raghunathan, Anand
Khailany, Brucek
author_facet Elangovan, Reena
Sakr, Charbel
Raghunathan, Anand
Khailany, Brucek
contents Post-training quantization (PTQ) is a promising approach to reducing the storage and computational requirements of large language models (LLMs) without additional training cost. Recent PTQ studies have primarily focused on quantizing only weights to sub-8-bits while maintaining activations at 8-bits or higher. Accurate sub-8-bit quantization for both weights and activations without relying on quantization-aware training remains a significant challenge. We propose a novel quantization method called block clustered quantization (BCQ) wherein each operand tensor is decomposed into blocks (a block is a group of contiguous scalars), blocks are clustered based on their statistics, and a dedicated optimal quantization codebook is designed for each cluster. As a specific embodiment of this approach, we propose a PTQ algorithm called Locally-Optimal BCQ (LO-BCQ) that iterates between the steps of block clustering and codebook design to greedily minimize the quantization mean squared error. When weight and activation scalars are encoded to W4A4 format (with 0.5-bits of overhead for storing scaling factors and codebook selectors), we advance the current state-of-the-art by demonstrating <1% loss in inference accuracy across several LLMs and downstream tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2502_05376
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LO-BCQ: Block Clustered Quantization for 4-bit (W4A4) LLM Inference
Elangovan, Reena
Sakr, Charbel
Raghunathan, Anand
Khailany, Brucek
Machine Learning
Post-training quantization (PTQ) is a promising approach to reducing the storage and computational requirements of large language models (LLMs) without additional training cost. Recent PTQ studies have primarily focused on quantizing only weights to sub-8-bits while maintaining activations at 8-bits or higher. Accurate sub-8-bit quantization for both weights and activations without relying on quantization-aware training remains a significant challenge. We propose a novel quantization method called block clustered quantization (BCQ) wherein each operand tensor is decomposed into blocks (a block is a group of contiguous scalars), blocks are clustered based on their statistics, and a dedicated optimal quantization codebook is designed for each cluster. As a specific embodiment of this approach, we propose a PTQ algorithm called Locally-Optimal BCQ (LO-BCQ) that iterates between the steps of block clustering and codebook design to greedily minimize the quantization mean squared error. When weight and activation scalars are encoded to W4A4 format (with 0.5-bits of overhead for storing scaling factors and codebook selectors), we advance the current state-of-the-art by demonstrating <1% loss in inference accuracy across several LLMs and downstream tasks.
title LO-BCQ: Block Clustered Quantization for 4-bit (W4A4) LLM Inference
topic Machine Learning
url https://arxiv.org/abs/2502.05376