Skip to main content
QUICK REVIEW

[Paper Review] Outlier Suppression+: Accurate quantization of large language models by equivalent and optimal shifting and scaling

Xiuying Wei, Yuncheng Zhang|arXiv (Cornell University)|Apr 18, 2023
Topic ModelingComputer Science6 citations
TL;DR

Outlier Suppression+ (OS+) proposes a novel post-training quantization framework for large language models that uses channel-wise shifting and scaling to suppress asymmetric and concentrated outliers in activations. By equivalently migrating these operations to subsequent layers and optimizing shift/scale values for minimal output change, OS+ achieves near-floating-point performance at 8-bit and 6-bit, with a 15.5% accuracy gain on 4-bit BERT, setting a new SOTA.

ABSTRACT

Post-training quantization~(PTQ) of transformer language models faces significant challenges due to the existence of detrimental outliers in activations. We observe that these outliers are concentrated in specific channels and are asymmetric across channels. To address this issue, we propose the Outlier Suppression+~(OS+) framework, which contains the channel-wise shifting for asymmetry and channel-wise scaling for concentration. We show that these operations can be seamlessly migrated into subsequent modules while maintaining equivalence. Second, we propose a fast and stable scheme to calculate effective shifting and scaling values. The channel-wise shifting aligns the center of each channel for removal of outlier asymmetry. The channel-wise scaling quantitatively evaluates changes brought by migration and quantization for better quantization burden balance. We validate our OS+ under both standard and fine-grained quantization settings with models including BERT, OPT, BLOOM, BLOOMZ, and LLaMA. Comprehensive results across various tasks demonstrate the superiority of our approach. Especially, with standard quantization, OS+ can achieve near-floating-point performance on both small models and large language models on 8-bit and 6-bit. Besides, we establish a new state-of-the-art for 4-bit BERT with 15.5\% improvement. Our code is available at \url{https://github.com/ModelTC/Outlier_Suppression_Plus}.

Motivation & Objective

  • To address the challenge of detrimental outliers in post-training quantization of large language models, which degrade model accuracy.
  • To identify and exploit a previously overlooked characteristic: asymmetric outlier distributions across channels.
  • To develop a method that maintains full-precision equivalence while minimizing quantization error through optimized shifting and scaling.
  • To enable efficient, hardware-friendly quantization without additional training or inference overhead.
  • To achieve state-of-the-art performance across standard and fine-grained quantization settings on diverse LLMs.

Proposed method

  • Introduces channel-wise shifting to eliminate asymmetry in outlier distributions across channels, reducing overall tensor range.
  • Applies channel-wise scaling to concentrate and suppress extreme outlier values, minimizing their impact on quantization.
  • Designs a unified migration pattern that transfers the effects of shifting and scaling to subsequent layers, preserving full-precision model output.
  • Proposes a fast and stable optimization scheme to compute effective shift and scale values based on minimizing output change, not just activation or weight quantization error.
  • Uses a quantitative objective function to balance quantization burden across layers, ensuring minimal end-to-end output deviation.
  • Implements the transformation via parameter updates in previous layers, enabling deployment without extra computation or retraining.

Experimental results

Research questions

  • RQ1Why do outliers in transformer activations cause significant performance degradation in post-training quantization?
  • RQ2How can asymmetric outlier distributions across channels be systematically addressed to improve quantization accuracy?
  • RQ3Can shifting and scaling operations be applied in a way that maintains full-precision equivalence while reducing quantization error?
  • RQ4What optimization strategy for shift and scale values leads to minimal end-to-end output change in quantized models?
  • RQ5Can this method achieve state-of-the-art performance across diverse LLMs at low bit-widths like 4-bit, 6-bit, and 8-bit?

Key findings

  • OS+ achieves near-floating-point performance on both small and large language models at 8-bit and 6-bit quantization, with minimal accuracy drop.
  • On 4-bit BERT, OS+ achieves a 15.5% accuracy improvement over prior methods, setting a new state-of-the-art.
  • The method reduces the output quantization error to 1334.89 on the tested layer, significantly lower than OS (6182.52) and SQ (3535.86).
  • Calibration for OPT-175B takes only about 20 minutes, demonstrating efficiency in practice.
  • Inference latency is improved by up to 1.5×, with no additional computational overhead in deployed models.
  • Quantized large models outperform smaller FP16 models under fixed storage constraints, indicating robustness and scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.