ASVD: Activation-aware Singular Value Decomposition for Compressing Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yuan, Zhihang, Shang, Yuzhang, Song, Yue, Yang, Dawei, Wu, Qiang, Yan, Yan, Sun, Guangyu
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912556824657920
author Yuan, Zhihang
Shang, Yuzhang
Song, Yue
Yang, Dawei
Wu, Qiang
Yan, Yan
Sun, Guangyu
author_facet Yuan, Zhihang
Shang, Yuzhang
Song, Yue
Yang, Dawei
Wu, Qiang
Yan, Yan
Sun, Guangyu
contents In this paper, we introduce a new post-training compression paradigm for Large Language Models (LLMs) to facilitate their wider adoption. We delve into LLM weight low-rank decomposition, and find that the challenges of this task stem from (1) the distribution variance in the LLM activations and (2) the sensitivity difference among various kinds of layers. To address these issues, we propose a training-free approach called Activation-aware Singular Value Decomposition (ASVD). Specifically, ASVD manages activation outliers by transforming the weight matrix based on the activation distribution. This transformation allows the outliers in the activation matrix to be absorbed into the transformed weight matrix, thereby enhancing decomposition accuracy. Additionally, we propose an efficient iterative calibration process to optimize layer-specific decomposition by addressing the varying sensitivity of different LLM layers. In this way, ASVD can compress a network by 10%-30%. Based on the success of the low-rank decomposition of projection matrices in the self-attention module, we further introduce ASVD to compress the KV cache. By reducing the channel dimension of KV activations, memory requirements for KV cache can be largely reduced. ASVD can further achieve 50% KV cache reductions without performance drop in a training-free manner.
format Preprint
id arxiv_https___arxiv_org_abs_2312_05821
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle ASVD: Activation-aware Singular Value Decomposition for Compressing Large Language Models
Yuan, Zhihang
Shang, Yuzhang
Song, Yue
Yang, Dawei
Wu, Qiang
Yan, Yan
Sun, Guangyu
Computation and Language
In this paper, we introduce a new post-training compression paradigm for Large Language Models (LLMs) to facilitate their wider adoption. We delve into LLM weight low-rank decomposition, and find that the challenges of this task stem from (1) the distribution variance in the LLM activations and (2) the sensitivity difference among various kinds of layers. To address these issues, we propose a training-free approach called Activation-aware Singular Value Decomposition (ASVD). Specifically, ASVD manages activation outliers by transforming the weight matrix based on the activation distribution. This transformation allows the outliers in the activation matrix to be absorbed into the transformed weight matrix, thereby enhancing decomposition accuracy. Additionally, we propose an efficient iterative calibration process to optimize layer-specific decomposition by addressing the varying sensitivity of different LLM layers. In this way, ASVD can compress a network by 10%-30%. Based on the success of the low-rank decomposition of projection matrices in the self-attention module, we further introduce ASVD to compress the KV cache. By reducing the channel dimension of KV activations, memory requirements for KV cache can be largely reduced. ASVD can further achieve 50% KV cache reductions without performance drop in a training-free manner.
title ASVD: Activation-aware Singular Value Decomposition for Compressing Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2312.05821