Pruning Large Language Models to Intra-module Low-rank Architecture with Transitional Activations

Bowen Shen, Zheng Lin, Daren Zha, Wei Liu, Jian Luan +2 more
7/8/2024
cs.CLcs.AI

No official code found. Best implementation: XiaoMi/transact-pruning (3 stars, Apache-2.0, last commit 2024-11-28). 1 more below.

Abstract

Structured pruning fundamentally reduces computational and memory overheads of large language models (LLMs) and offers a feasible solution for end-side LLM deployment. Structurally pruned models remain dense and high-precision, highly compatible with further tuning and compression. However, as the coarse-grained structured pruning poses large damage to the highly interconnected model, achieving a high compression ratio for scaled-up LLMs remains a challenge. In this paper, we introduce a task-agnostic structured pruning approach coupled with a compact Transformer architecture design. The proposed approach, named TransAct, reduces transitional activations inside multi-head attention (MHA) and multi-layer perceptron (MLP) modules, while preserving the inter-module activations that are sensitive to perturbations. Hence, the LLM is pruned into an intra-module low-rank architecture, significantly reducing weights, KV Cache and attention computation. TransAct is implemented on the LLaMA model and evaluated on downstream benchmarks. Results verify the optimality of our approach at high compression with respect to both efficiency and performance. Further, ablation studies reveal the strength of activation-guided iterative pruning and provide experimental analysis on the redundancy of MHA and MLP modules.

View on arXivView PDF

Code Implementations(2)

Please refer to https://github.com/XiaoMi/transact-pruning for the code

00Jun 5, 20241 years ago
Apache-2.0

This repository is the official implementation of the ACL 2024 paper: Pruning Large Language Models to Intra-module Low-rank Architecture with Transitional Activations.

30Shell, PythonNov 28, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{shen2024pruning,
  title  = {Pruning Large Language Models to Intra-module Low-rank Architecture with Transitional Activations},
  author = {Bowen Shen and Zheng Lin and Daren Zha and Wei Liu and Jian Luan and Bin Wang and Weiping Wang},
  year   = {2024},
  eprint = {2407.05690},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.05690v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.05690.svg)](https://codeofpaper.com/paper/2407.05690)

Discussion