BlockPruner: Fine-grained Pruning for Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhong, Longguang, Wan, Fanqi, Chen, Ruijun, Quan, Xiaojun, Li, Liangzhi
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916750288748544
author Zhong, Longguang
Wan, Fanqi
Chen, Ruijun
Quan, Xiaojun
Li, Liangzhi
author_facet Zhong, Longguang
Wan, Fanqi
Chen, Ruijun
Quan, Xiaojun
Li, Liangzhi
contents With the rapid growth in the size and complexity of large language models (LLMs), the costs associated with their training and inference have escalated significantly. Research indicates that certain layers in LLMs harbor substantial redundancy, and pruning these layers has minimal impact on the overall performance. While various layer pruning methods have been developed based on this insight, they generally overlook the finer-grained redundancies within the layers themselves. In this paper, we delve deeper into the architecture of LLMs and demonstrate that finer-grained pruning can be achieved by targeting redundancies in multi-head attention (MHA) and multi-layer perceptron (MLP) blocks. We propose a novel, training-free structured pruning approach called BlockPruner. Unlike existing layer pruning methods, BlockPruner segments each Transformer layer into MHA and MLP blocks. It then assesses the importance of these blocks using perplexity measures and applies a heuristic search for iterative pruning. We applied BlockPruner to LLMs of various sizes and architectures and validated its performance across a wide range of downstream tasks. Experimental results show that BlockPruner achieves more granular and effective pruning compared to state-of-the-art baselines.
format Preprint
id arxiv_https___arxiv_org_abs_2406_10594
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BlockPruner: Fine-grained Pruning for Large Language Models
Zhong, Longguang
Wan, Fanqi
Chen, Ruijun
Quan, Xiaojun
Li, Liangzhi
Computation and Language
With the rapid growth in the size and complexity of large language models (LLMs), the costs associated with their training and inference have escalated significantly. Research indicates that certain layers in LLMs harbor substantial redundancy, and pruning these layers has minimal impact on the overall performance. While various layer pruning methods have been developed based on this insight, they generally overlook the finer-grained redundancies within the layers themselves. In this paper, we delve deeper into the architecture of LLMs and demonstrate that finer-grained pruning can be achieved by targeting redundancies in multi-head attention (MHA) and multi-layer perceptron (MLP) blocks. We propose a novel, training-free structured pruning approach called BlockPruner. Unlike existing layer pruning methods, BlockPruner segments each Transformer layer into MHA and MLP blocks. It then assesses the importance of these blocks using perplexity measures and applies a heuristic search for iterative pruning. We applied BlockPruner to LLMs of various sizes and architectures and validated its performance across a wide range of downstream tasks. Experimental results show that BlockPruner achieves more granular and effective pruning compared to state-of-the-art baselines.
title BlockPruner: Fine-grained Pruning for Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2406.10594