Table of Contents
Fetching ...

MixQuant: Pushing the Limits of Block Rotations in Post-Training Quantization

Sai Sanjeet, Ian Colbert, Pablo Monteagudo-Lago, Giuseppe Franco, Yaman Umuroglu, Nicholas J. Fraser

TL;DR

This work investigates activation outliers in post-training quantization for large language models when using block Hadamard rotations. It provides a non-asymptotic, geometry-driven theory showing outlier suppression depends on how activation mass is distributed across blocks, and proposes MixQuant, which uses MassDiff permutations to equalize per-block mass and then merges the resulting permutations into surrounding weights to avoid extra inference cost. Empirical results on Llama3 and Qwen3 show MixQuant substantially improves perplexity and zero-shot accuracy across block sizes and formats, recovering up to about 90% of full-vector rotation performance at small block sizes. The framework also includes ablations and discusses limitations, with open-source code to enable reproducibility and integration into PTQ pipelines.

Abstract

Recent post-training quantization (PTQ) methods have adopted block rotations to diffuse outliers prior to rounding. While this reduces the overhead of full-vector rotations, the effect of block structure on outlier suppression remains poorly understood. To fill this gap, we present the first systematic, non-asymptotic analysis of outlier suppression for block Hadamard rotations. Our analysis reveals that outlier suppression is fundamentally limited by the geometry of the input vector. In particular, post-rotation outliers are deterministically minimized when the pre-rotation $\ell_1$ norm mass is evenly distributed across blocks. Guided by these insights, we introduce MixQuant, a block rotation-aware PTQ framework that redistributes activation mass via permutations prior to rotation. We propose a greedy mass diffusion algorithm to calibrate permutations by equalizing the expected blockwise $\ell_1$ norms. To avoid adding inference overhead, we identify permutation-equivariant regions in transformer architectures to merge the resulting permutations into model weights before deployment. Experiments show that MixQuant consistently improves accuracy across all block sizes, recovering up to 90% of the full-vector rotation perplexity when quantizing Llama3 1B to INT4 with block size 16, compared to 46% without permutations.

MixQuant: Pushing the Limits of Block Rotations in Post-Training Quantization

TL;DR

This work investigates activation outliers in post-training quantization for large language models when using block Hadamard rotations. It provides a non-asymptotic, geometry-driven theory showing outlier suppression depends on how activation mass is distributed across blocks, and proposes MixQuant, which uses MassDiff permutations to equalize per-block mass and then merges the resulting permutations into surrounding weights to avoid extra inference cost. Empirical results on Llama3 and Qwen3 show MixQuant substantially improves perplexity and zero-shot accuracy across block sizes and formats, recovering up to about 90% of full-vector rotation performance at small block sizes. The framework also includes ablations and discusses limitations, with open-source code to enable reproducibility and integration into PTQ pipelines.

Abstract

Recent post-training quantization (PTQ) methods have adopted block rotations to diffuse outliers prior to rounding. While this reduces the overhead of full-vector rotations, the effect of block structure on outlier suppression remains poorly understood. To fill this gap, we present the first systematic, non-asymptotic analysis of outlier suppression for block Hadamard rotations. Our analysis reveals that outlier suppression is fundamentally limited by the geometry of the input vector. In particular, post-rotation outliers are deterministically minimized when the pre-rotation norm mass is evenly distributed across blocks. Guided by these insights, we introduce MixQuant, a block rotation-aware PTQ framework that redistributes activation mass via permutations prior to rotation. We propose a greedy mass diffusion algorithm to calibrate permutations by equalizing the expected blockwise norms. To avoid adding inference overhead, we identify permutation-equivariant regions in transformer architectures to merge the resulting permutations into model weights before deployment. Experiments show that MixQuant consistently improves accuracy across all block sizes, recovering up to 90% of the full-vector rotation perplexity when quantizing Llama3 1B to INT4 with block size 16, compared to 46% without permutations.
Paper Structure (36 sections, 10 theorems, 33 equations, 8 figures, 7 tables, 1 algorithm)

This paper contains 36 sections, 10 theorems, 33 equations, 8 figures, 7 tables, 1 algorithm.

Key Result

Proposition 3.0

Let $X \in \mathbb{R}^d$ be an activation vector, and let $R \in \mathbb{R}^{d \times d}$ be a normalized Hadamard matrix. Define $\delta = \Vert X \Vert_1 / \left(d \Vert X \Vert_\infty\right)$, then the rotation of $X$ by $R$ satisfies

Figures (8)

  • Figure 1: We visualize input activation distributions sampled from 2048 tokens of WikiText2 at the third down projection layer in Llama3 1B under four configurations: (a) original model, (b) block Hadamard rotation with $b = 32$, (c) block Hadamard rotation with $b = 128$, and (d) full-vector rotation. As $b \to d$, the activation range decreases, showing block rotations can reduce outlier suppression effectiveness.
  • Figure 2: Given pre-trained weights and activations, MixQuant first computes a permutation that equalizes the per-block activation mass. The permuted weights and activations are then rotated. Finally, the permuted and rotated weights and activations are then rounded to a target alphabet defined by a bit width, scaling factor, and zero point.
  • Figure 3: In blue, we show the values of $\delta$ and the normalized post-rotation range $\Vert XR \Vert_\infty / \Vert X \Vert_\infty$ for 1024 tokens sampled from the third down projection layer of Llama3 Grattafiori2024Llama and Qwen3 Yang2025Qwen models, using activations from WikiText2 merity2016pointer. The reference value $1/\sqrt{d}$ is shown in red, below which Proposition \ref{['prop:prop1']} guarantees range reduction. Although most tokens lie above this sufficient threshold, range reduction is observed consistently, and the degree of reduction is strongly correlated with $\delta$. For comparison, Gaussian and Laplacian distributions are first fit to the empirical activations on a per-token basis, and $\delta$ values are then computed from samples drawn from these fitted distributions; their resulting $\delta$ distributions differ substantially from those observed for real LLM activations.
  • Figure 4: In green, we plot, for each block size $b$, the empirical mean and standard deviation of $\max_j \delta_{\{j\}} \Vert X_{\{j\}} \Vert_\infty$, normalized by $\Vert X \Vert_\infty$. Statistics are computed over all down projection layers using 10K tokens sampled from the WikiText2 dataset merity2016pointer. For reference, the $1/\sqrt{b}$ trend is shown in black and the $1/b$ trend is shown in blue.
  • Figure 5: MixQuant replaces full-vector rotation $R$ with permutation $P$ and block rotation $\Tilde{R}$, as shown here for the feedforward network in the standard transformer architecture. Importantly, this subgraph is a permutation-equivariant region (formally defined in Definition \ref{['def:permutation-equivariant-region']}) but it is not rotation-equivariant due to the Swish activation function. So, $P$ can be merged into the surrounding weights prior to inference, while $R$ and $\Tilde{R}$ remain as online rotations.
  • ...and 3 more figures

Theorems & Definitions (20)

  • Proposition 3.0: When Full-Vector Hadamard Rotations Suppress Outliers
  • Remark 3.1: Compute Requirements of Hadamard Rotations
  • Proposition 3.1: When Block Hadamard Rotations Suppress Outliers
  • Corollary 3.1: Deterministic Evolution of Post-Rotation Outliers
  • Proposition 3.1: Probabilistic Evolution of Post-Rotation Outliers
  • Definition 4.1: Permutation-Equivariant Region
  • Remark 4.2: Merging Permutations
  • Proposition D.0: When Full-Vector Hadamard Rotations Suppress Outliers
  • proof
  • Remark D.1: Outlier Suppression and Energy Concentration for Full-Vector Hadamard Rotations
  • ...and 10 more