Saved in:
Bibliographic Details
Main Authors: Yi, Ke, Liu, Zengke, Zhang, Jianwei, Li, Chengyuan, Zhang, Tong, Lin, Junyang, Zhou, Jingren
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.20361
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929585383276544
author Yi, Ke
Liu, Zengke
Zhang, Jianwei
Li, Chengyuan
Zhang, Tong
Lin, Junyang
Zhou, Jingren
author_facet Yi, Ke
Liu, Zengke
Zhang, Jianwei
Li, Chengyuan
Zhang, Tong
Lin, Junyang
Zhou, Jingren
contents Large language models have demonstrated promising capabilities upon scaling up parameters. However, serving large language models incurs substantial computation and memory movement costs due to their large scale. Quantization methods have been employed to reduce service costs and latency. Nevertheless, outliers in activations hinder the development of INT4 weight-activation quantization. Existing approaches separate outliers and normal values into two matrices or migrate outliers from activations to weights, suffering from high latency or accuracy degradation. Based on observing activations from large language models, outliers can be classified into channel-wise and spike outliers. In this work, we propose Rotated Runtime Smooth (RRS), a plug-and-play activation smoother for quantization, consisting of Runtime Smooth and the Rotation operation. Runtime Smooth (RS) is introduced to eliminate channel-wise outliers by smoothing activations with channel-wise maximums during runtime. The rotation operation can narrow the gap between spike outliers and normal values, alleviating the effect of victims caused by channel-wise smoothing. The proposed method outperforms the state-of-the-art method in the LLaMA and Qwen families and improves WikiText-2 perplexity from 57.33 to 6.66 for INT4 inference.
format Preprint
id arxiv_https___arxiv_org_abs_2409_20361
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Rotated Runtime Smooth: Training-Free Activation Smoother for accurate INT4 inference
Yi, Ke
Liu, Zengke
Zhang, Jianwei
Li, Chengyuan
Zhang, Tong
Lin, Junyang
Zhou, Jingren
Machine Learning
Artificial Intelligence
Large language models have demonstrated promising capabilities upon scaling up parameters. However, serving large language models incurs substantial computation and memory movement costs due to their large scale. Quantization methods have been employed to reduce service costs and latency. Nevertheless, outliers in activations hinder the development of INT4 weight-activation quantization. Existing approaches separate outliers and normal values into two matrices or migrate outliers from activations to weights, suffering from high latency or accuracy degradation. Based on observing activations from large language models, outliers can be classified into channel-wise and spike outliers. In this work, we propose Rotated Runtime Smooth (RRS), a plug-and-play activation smoother for quantization, consisting of Runtime Smooth and the Rotation operation. Runtime Smooth (RS) is introduced to eliminate channel-wise outliers by smoothing activations with channel-wise maximums during runtime. The rotation operation can narrow the gap between spike outliers and normal values, alleviating the effect of victims caused by channel-wise smoothing. The proposed method outperforms the state-of-the-art method in the LLaMA and Qwen families and improves WikiText-2 perplexity from 57.33 to 6.66 for INT4 inference.
title Rotated Runtime Smooth: Training-Free Activation Smoother for accurate INT4 inference
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2409.20361