WUSH: Trasformazioni Adattive Quasi Ottimali per la Quantizzazione di LLM
WUSH: Near-Optimal Adaptive Transforms for LLM Quantization
November 30, 2025
Autori: Jiale Chen, Vage Egiazarian, Torsten Hoefler, Dan Alistarh
cs.AI
Abstract
La quantizzazione a bassa larghezza di bit è un approccio standard per il deployment di grandi modelli linguistici. Tuttavia, alcuni pesi e attivazioni estremi ampliano l'intervallo dinamico e riducono la risoluzione effettiva del quantizzatore. Una comune strategia di mitigazione consiste nell'applicare alcune trasformazioni ortogonali fisse, come le matrici di Hadamard, prima della quantizzazione, operazione che tipicamente riduce l'intervallo dinamico. Ciononostante, queste trasformazioni ignorano le statistiche dei dati, e la loro ottimalità non è attualmente compresa. In questo lavoro, deriviamo per la prima volta trasformazioni lineari ottimali in forma chiusa, applicate a blocchi, per la quantizzazione congiunta di pesi e attivazioni, utilizzando quantizzatori standard senza dati per formati numerici comuni. Nello specifico, forniamo le derivazioni delle trasformazioni adattive (data-aware) ottimali per quantizzatori a blocchi con arrotondamento al valore più vicino (RTN) e scalati secondo il valore assoluto massimo (AbsMax), sia per formati interi che in virgola mobile. La costruzione risultante, che chiamiamo WUSH, combina una struttura base di Hadamard con una componente dipendente dai dati basata sui momenti del secondo ordine, producendo una trasformazione non ortogonale che è dimostrabilmente ottimale sotto lievi assunzioni e rimane strutturata per un'implementazione efficiente. I risultati sperimentali preliminari mostrano che il nostro approccio migliora costantemente la trasformazione di Hadamard per i formati comuni.
English
Quantization to low bitwidth is a standard approach for deploying large language models, however, a few extreme weights and activations stretch the dynamic range and reduce the effective resolution of the quantizer. A common mitigation approach is to apply some fixed orthogonal transforms, such as Hadamard matrices, before quantization, which typically reduces the dynamic range. Yet, these transforms ignore the statistics of the data, and their optimality is currently not understood. In this work, we derive, for the first time, closed-form optimal linear blockwise transforms for joint weight-activation quantization using standard data-free quantizers for common numerical formats. Specifically, we provide derivations of the optimal adaptive (data-aware) transforms for round-to-nearest (RTN), AbsMax-scaled block quantizers for both integer and floating-point formats. The resulting construction, which we call WUSH, combines a Hadamard backbone with a data-dependent component based on second-order moments, yielding a non-orthogonal transform that is provably optimal under mild assumptions and remains structured for efficient implementation. Preliminary experimental results show that our approach consistently improves upon the Hadamard transform for common formats.