Source-linked AI summary

ShatterQuant: Breaking Uniform Precision with Block-Wise Mixed-Precision on a Systolic Transformer Hardware Accelerator

Mikolaj Walczak, Edward Humes, Chao Fang, Marian Verhelst, Tinoosh Mohsenin

arXiv:2610.00207v1cs.ARcs.AIeess.IV

TL;DR

Transformers’ computation and memory costs make low-precision deployment attractive, but aggressive quantization can harm model quality and conventional accelerators struggle with mixed-precision blocks. ShatterQuant co-designs blockwise post-training quantization with a configurable transformer accelerator. It reports competitive DeiT accuracy at lower effective bitwidth and comparable PixelDiT generation quality.

  • Problem

    Aggressive low-precision quantization can harm classification accuracy or generation quality because transformer parameters have nonuniform quantization sensitivity, while GPUs struggle to efficiently support mixed-precision blocks.

    Source: §1 · p. 2
  • Method

    ShatterQuant assigns mixed-precision bit widths to weight blocks and couples quantization block size with configurable accelerator PE configurations.

    Source: §1 · p. 2, §3.3 · p. 4
  • Results

    Within 3.3% of state-of-the-art mixed-precision methods on DeiT at a 2-bit lower effective bitwidth, with comparable generation quality on PixelDiT.

    Source: §5 · p. 8
  • Takeaways & Limitations

    The results demonstrate that fine-grained intra-tensor mixed-precision quantization can be efficient through hardware-software co-design.

    Source: §5 · p. 8

    Future work will extend mixed-precision quantization to activations and autoregressive transformers and explore multi-processor integration.

    Source: §5 · p. 8

Abstract

from arXiv · show

Due to limited support for intra-tensor heterogeneous precision in conventional accelerators, neural network quantization remains largely restricted to per-tensor precision assignment. We present ShatterQuant, a hardware-software co-designed framework enabling mixed-precision quantization within each tensor by assigning independent bit-widths to blocks of a weight projection. ShatterQuant couples precision granularity with PE configuration, such that each precision determines an effective block height. We introduce (1) a hardware-aware post-training method that assigns intra-tensor precision based on block-level standard deviation and weight sensitivity; (2) the ShatterQuant Transformer Accelerator supporting 1/2/4/8-bit weight precision, precision-dependent PE configuration, block rescaling, and integrated softmax and piecewise-linear nonlinearities; and (3) an evaluation of model-hardware tradeoffs using an implementation in the TSMC 16nm PDK operating at 1 GHz, achieving 1.5 TOPS, 760 GOPS/$mm^2$ area efficiency, and 2.8 TOPS/W energy efficiency. On DeiT and ImageNet-1K, ShatterQuant achieves accuracy within $3.3\%$ of state-of-the-art mixed-precision techniques while using a 2 bit lower effective bitwidth, while for PixelDiT demonstrates comparable generation quality. ShatterQuant demonstrates how fine-grained intra-tensor mixed-precision can be realized through hardware-software co-design.

1 Introduction

Transformers offer strong vision and generation performance but incur substantial computation and memory traffic, especially across diffusion denoising steps. ShatterQuant addresses quantization’s precision-support gap with block-level mixed precision and a hardware-software co-designed accelerator.

1 Introduction

  • Transformer inference incurs substantial computation and memory traffic, amplified in diffusion models by repeated denoising steps.Prior cost-reduction approaches include architecture search, distillation, pruning, and state-space architectures.Source: §1 · pp. 1–2
  • Aggressive sub-8-bit quantization can degrade accuracy or generation quality because transformer parameters differ in quantization sensitivity.Block-wise quantization independently scales smaller tensor groups, permitting more flexible precision reduction.Source: §1 · p. 2
  • ShatterQuant combines hardware-aware post-training quantization with a custom accelerator because current GPUs struggle to efficiently support mixed-precision blocks.The stated challenges are non-uniform memory accesses and fixed-function compute datapaths.Source: §1 · p. 2
  • The contributions span block-level mixed-precision quantization, a configurable accelerator, and implementation tradeoff evaluation on DeiT and PixelDiT.The accelerator supports 1-, 2-, 4-, and 8-bit weights with 8-bit activations and couples block size to PE configuration.Source: §1 · p. 2

2 Related Work

Related work spans diffusion-transformer architectures, mixed-precision quantization, and specialized transformer accelerators. ShatterQuant distinguishes itself through grouped sub-channel quantization paired with dedicated hardware support.

2.1 Diffusion Transformers

  • PixelDiT operates directly in the pixel domain without a latent autoencoder, while ShatterQuant targets core ViT-style linear projections, softmax, and nonlinearities.The approach also applies to PixelDiT’s attention and feed-forward structure; other operations are offloaded to external processors.Source: §2.1 · p. 2

2.2 Mixed Precision Quantization

  • Prior quantization work spans weight PTQ, quantization-aware training, calibration methods, layer-sensitivity mixed precision, and channel-wise intra-tensor quantization.ShatterQuant instead enables grouped sub-channel quantization with dedicated hardware support.Source: §2.2 · p. 2

2.3 Hardware Accelerators

  • Prior transformer accelerators optimize low-bit inference, dataflows, memory, and attention, but largely use coarse-grained precision or evaluate modern models only narrowly.Some exploit sparsity by skipping operations rather than varying weight precision.Source: §2.3 · p. 2

3 Proposed Approach

The proposed approach is organized around model architecture, intra-tensor blockwise mixed precision, post-training quantization, and accelerator design. ShatterQuant applies to linear projections through calibration, quantization with rounding correction, and hardware deployment.

3 Proposed Approach

  • ShatterQuant is presented as a four-part approach covering architecture, blockwise mixed precision, post-training quantization, and accelerator design.Source: §3 · p. 2
  • Figure 2 places PixelDiT alongside the ViT architecture as a representative vision diffusion model.Source: Figure 2 · p. 3
  • The linear-projection workflow proceeds through calibration and initial weight setting, quantization with weight-rounding correction, and hardware deployment.Source: Figure 2 · p. 3

3.1 Model Architecture

The architecture follows the ViT pipeline from patch projection through attention and feed-forward layers. ShatterQuant targets parameterized linear and attention operations in both conventional ViTs and PixelDiT, while offloading other operations.

3.1 Model Architecture

  • An input image is divided into patches, projected into the embedding dimension, and combined with an optional class token and learned positional embedding.Source: §3.1 · p. 3
  • Each transformer layer projects embeddings into queries, keys, and values, then computes scaled dot-product attention across heads.Each head has dimension d_k = D/H.Source: §3.1 · p. 3
  • Concatenated head outputs are projected before a feed-forward network applies a nonlinear activation; residuals and LayerNorm complete the layer.The feed-forward network uses W1 and W2, with D_ff typically set to 4D.Source: §3.1 · p. 3
  • PixelDiT adds patch-wise and pixel-wise pathways and conditioning-based AdaLN, while retaining linear projections and attention operations.Source: §3.1 · p. 3
  • ShatterQuant targets conventional ViTs and PixelDiT, handling parameterized linear and attention operations on its accelerator.Initial and final linear operations, LayerNorm, RoPE, reshaping, and scaling are offloaded to external processors.Source: §3.1 · pp. 3–4

3.2 Intra-Tensor Blockwise Mixed Precision

ShatterQuant assigns each weight block its own precision and scale, while activations remain tensor-wise 8-bit quantized. Block precision also determines how weights are packed into 8-bit representations.

3.2 Intra-Tensor Blockwise Mixed Precision

  • Weights are normalized by a tensor-wise AbsMax scale, then quantized using block-specific precision and scale.Block scales are constrained to powers of two and represented by a signed 6-bit exponent and 2-bit precision.Source: §3.2 · p. 4
  • Weight quantization applies to the block containing each element, with supported precisions of 8, 4, 2, or 1 bit.Source: §3.2 · p. 4
  • Lower weight precision packs two, four, or eight weights—and corresponding output columns—into each 8-bit representation, while activations use a tensor-wise scale.Source: §3.2 · p. 4

3.3 Post-Training Blockwise Quantization

The post-training method assigns precision across superblocks using their standard deviations, then reconstructs weights with learned rounding and power-of-two scale choices. For PixelDiT, it adapts calibration and precision assignment to generation trajectories and timestep-varying activations.

3.3 Post-Training Blockwise Quantization

  • Superblocks with greater standard deviation receive fewer bits, while those with lower standard deviation receive higher bitwidths, according to CDF cutoffs.Each superblock occupies the same number of weights as a single 1-bit block.Source: §3.3 · p. 4
  • LS-ViT reconstruction adapts AdaRound to blockwise weights and learns power-of-two block scales alongside per-weight rounding decisions.The two fully quantized exponent candidates are annealed with the same regularizer against the least-squares Hessian objective.Source: §3.3 · p. 4

3.3.1 Extension to PixelDiT.

  • PixelDiT adaptation uses trajectory-output squared error for Hessian estimation, eight timestep-bin activation scales, and relative variance to assign precision.After reconstruction, activation scales across layers are further optimized to minimize trajectory MSE from the full-precision model.Source: §3.3.1 · p. 4

3.4 ShatterQuant Transformer Accelerator

The accelerator combines an 8-bit activation path with a systolic array supporting 1-, 2-, 4-, and 8-bit weights, plus accumulation and integrated quantization. Its PE configuration aligns with block precision, while rescaling and nonlinear operations remain in the integer pipeline.

3.4 ShatterQuant Transformer Accelerator

  • The accelerator combines weight, scale, bias, and feature buffers, an 8-bit activation and 1/2/4/8-bit systolic array, a 32-bit accumulator, and an integrated quantizer.AXI-Stream handles data streaming, while AXI-Lite handles configuration and initialization.Source: §3.4 · p. 4

3.4.1 ShatterQuant Processing Element.

  • A barrel rotator lets each weight-stationary PE support 1-, 2-, 4-, and 8-bit weights using a unified 8-bit multiplier and 32-bit result.As precision falls, the PE reuses input features across cycles to generate two, four, or eight output columns.Source: §3.4.1 · p. 4

3.4.2 ShatterQuant PE Array.

  • The p×p PE array propagates weights and biases downward, features and precision metadata across, and partial sums to the output accumulator.Its buffer and scale organization ties software block size to PE configuration; lower precision expands effective processing width.Source: §3.4.2 · pp. 4–5, Figure 3 · p. 5

3.4.3 ShatterQuant Output Accumulator.

  • The output accumulator rescales partial sums at block boundaries rather than dequantizing each block, enabling integer-domain accumulation.Rescaling shifts by s_i−s_i+1: positive differences shift right, negative differences shift left.Source: §3.4.3 · p. 5

3.4.4 ShatterQuant Quantizer.

  • The integrated quantizer performs requantization and nonlinear operations in integer arithmetic, using piecewise-linear approximations instead of impractical large lookup tables.For softmax, the 128 factor scales the bounded exponential to the int8 range, while s_O sets the output scale and following-layer input scale.Source: §3.4.4 · pp. 5–6
  • Figure 4 shows per-layer effective bitwidths for DeiT and PixelDiT-XL under specified precision splits; Table 1 compares ImageNet-1K Top-1 accuracy and effective weight bitwidth for three DeiT variants.Both evaluations use a 4×4 PE configuration.Source: Figure 4 · p. 6, Table 1 · p. 6

4 Results

Results evaluate ShatterQuant’s model performance, hardware implementation, and hardware–software trade-offs. The reported findings span DeiT and PixelDiT quality, accelerator efficiency, and the effect of PE configuration.

4.1 Model Performance

  • At max Δ3.3% accuracy difference, ShatterQuant spans 1–8-bit effective precision against coarse-grained per-tensor assignments; PixelDiT retains similar generation capability at gFID 14.4.The PixelDiT gFID increase is attributed to increased quantization noise.Source: §4.1 · pp. 6–7

4.2 Hardware Implementation

  • The accelerator was synthesized in TSMC 16nm at 1 GHz, evaluating four PE arrays from 4×4 through 32×32 with memory capacity and workload held constant.Source: §4.2 · p. 7
  • On-chip buffers occupy 86% of area at 4×4 and 79% at 32×32; at 32×32, the PE array accounts for 13% of area and 40% of power.Total area ranges from 1.60 to 1.92 mm2, while power ranges from 64 to 521 mW.Source: §4.2 · p. 7
  • The accelerator reports 1.5 TOPS MAC throughput at 521 mW, with 760 GOPS/mm2 area efficiency and 2.8 TOPS/W energy efficiency.Source: §4.2 · p. 7

4.3 Hardware-Software Co-Analysis

  • Larger PE arrays improve energy efficiency at the cost of model accuracy; at 32×32 with 20% 1-bit weights, DeiT-Base retains substantially higher accuracy than DeiT-Tiny.Source: §4.3 · p. 8, Figure 6 · p. 8
  • For PixelDiT with a 20% 4-bit and 80% 8-bit split, gFiD rises to 50 at 16×16, versus 14 at 4×4.Source: §4.3 · p. 8, Figure 7 · p. 8

5 Conclusion

ShatterQuant co-designs block-wise mixed-precision quantization with a configurable systolic accelerator for transformer inference. It reports efficient implementation and competitive DeiT and PixelDiT results, while identifying further work on activations and autoregressive transformers.

  • ShatterQuant jointly optimizes quantization, integer-only execution, and a configurable systolic accelerator supporting dynamic 1/2/4/8-bit computation.Source: §5 · p. 8
  • The TSMC 16nm implementation achieves 1.5 TOPS, 760 GOPS/mm2 area efficiency, and 2.8 TOPS/W energy efficiency, with DeiT accuracy within 3.3% of state-of-the-art mixed-precision methods at a 2-bit lower effective bitwidth and comparable PixelDiT generation quality.Source: §5 · p. 8
  • Future work includes extending mixed-precision quantization to activations and autoregressive transformers, exploring multi-processor integration, and approximating advanced layers.The named layers include RoPE positional embeddings, mixture-of-experts, and state-based architectures.Source: §5 · p. 8
Loading 2610.00207v1…