Table of Contents
Fetching ...

STaMP: Sequence Transformation and Mixed Precision for Low-Precision Activation Quantization

Marco Federici, Riccardo Del Chiaro, Boris van Breugel, Paul Whatmough, Markus Nagel

TL;DR

STaMP introduces a sequence-dimension activation transform combined with mixed-precision quantization to reduce activation quantization error at very low bitwidths. By concentrating energy into a small set of tokens using transforms such as DCT/DWT (a practical stand-in for the optimal KLT), STaMP enables higher precision for a subset of activations while maintaining a fixed average bit budget. It complements prior feature-transform and weight-quantization techniques, delivering consistent gains across Vision-Language Models and Large Language Models with minimal overhead. The approach is training-free and integrates with existing PTQ pipelines, offering practical deployment benefits for large generative models on resource-constrained hardware.

Abstract

Quantization is the key method for reducing inference latency, power and memory footprint of generative AI models. However, accuracy often degrades sharply when activations are quantized below eight bits. Recent work suggests that invertible linear transformations (e.g. rotations) can aid quantization, by reparameterizing feature channels and weights. In this paper, we propose \textit{Sequence Transformation and Mixed Precision} (STaMP) quantization, a novel strategy that applies linear transformations along the \textit{sequence} dimension to exploit the strong local correlation in language and visual data. By keeping a small number of tokens in each intermediate activation at higher precision, we can maintain model accuracy at lower (average) activations bit-widths. We evaluate STaMP on recent LVM and LLM architectures, demonstrating that it significantly improves low bit width activation quantization and complements established activation and weight quantization methods including recent feature transformations.

STaMP: Sequence Transformation and Mixed Precision for Low-Precision Activation Quantization

TL;DR

STaMP introduces a sequence-dimension activation transform combined with mixed-precision quantization to reduce activation quantization error at very low bitwidths. By concentrating energy into a small set of tokens using transforms such as DCT/DWT (a practical stand-in for the optimal KLT), STaMP enables higher precision for a subset of activations while maintaining a fixed average bit budget. It complements prior feature-transform and weight-quantization techniques, delivering consistent gains across Vision-Language Models and Large Language Models with minimal overhead. The approach is training-free and integrates with existing PTQ pipelines, offering practical deployment benefits for large generative models on resource-constrained hardware.

Abstract

Quantization is the key method for reducing inference latency, power and memory footprint of generative AI models. However, accuracy often degrades sharply when activations are quantized below eight bits. Recent work suggests that invertible linear transformations (e.g. rotations) can aid quantization, by reparameterizing feature channels and weights. In this paper, we propose \textit{Sequence Transformation and Mixed Precision} (STaMP) quantization, a novel strategy that applies linear transformations along the \textit{sequence} dimension to exploit the strong local correlation in language and visual data. By keeping a small number of tokens in each intermediate activation at higher precision, we can maintain model accuracy at lower (average) activations bit-widths. We evaluate STaMP on recent LVM and LLM architectures, demonstrating that it significantly improves low bit width activation quantization and complements established activation and weight quantization methods including recent feature transformations.

Paper Structure

This paper contains 35 sections, 1 theorem, 17 equations, 15 figures, 5 tables.

Key Result

Theorem 1

The expected quantization error for activations ${\bm{X}}$ transformed by an orthogonal sequence transformation ${\bm{L}}$ and quantized using a min-max scale for each token is upper-bounded by the weighted sum of the expected norm of the transformed tokens:

Figures (15)

  • Figure 1: STaMP and feature transformations applied to PixArt-$\Sigma$ with 4-bit activations. The benefit of STaMP is orthogonal to (Hadamard) feature transformation, drastically reducing artifacts.
  • Figure 2: STaMP Linear Layer Pseudocode
  • Figure 3: Comparison of Upper-Bound and Quantization error
  • Figure 5: Autocorrelation
  • Figure 6: Energy Distribution
  • ...and 10 more figures

Theorems & Definitions (4)

  • Theorem 1
  • proof
  • proof
  • proof