Pruning Foundation Models for High Accuracy without Retraining

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zhao, Pu, Sun, Fei, Shen, Xuan, Yu, Pinrui, Kong, Zhenglun, Wang, Yanzhi, Lin, Xue
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910658021294080
author Zhao, Pu
Sun, Fei
Shen, Xuan
Yu, Pinrui
Kong, Zhenglun
Wang, Yanzhi
Lin, Xue
author_facet Zhao, Pu
Sun, Fei
Shen, Xuan
Yu, Pinrui
Kong, Zhenglun
Wang, Yanzhi
Lin, Xue
contents Despite the superior performance, it is challenging to deploy foundation models or large language models (LLMs) due to their massive parameters and computations. While pruning is a promising technique to reduce model size and accelerate the inference, the traditional pruning techniques can hardly be applied for LLMs as they need to finetune the model on the full dataset with multiple epochs consuming massive data and hardware resources. To deal with this problem, post-training pruning methods are proposed to prune LLMs in one-shot without retraining. However, their accuracy after pruning may suffer from certain performance degradation due to the lack of retraining with massive data. To address this issue, in this paper, we first formulate the post-training problem for layer-wise LLM compression to simultaneously prune multiple weights in LLMs. Next, we provide an optimal solution for this problem and design our post-training pruning algorithm for both unstructured and semi-structured sparsity. Our extensive experiments demonstrate the superior performance of the proposed methods in comparison to SOTA baselines across various LLM families including transformer-based LLMs and Mamba-based LLMs. Code link: https://github.com/piuzha/APT
format Preprint
id arxiv_https___arxiv_org_abs_2410_15567
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Pruning Foundation Models for High Accuracy without Retraining
Zhao, Pu
Sun, Fei
Shen, Xuan
Yu, Pinrui
Kong, Zhenglun
Wang, Yanzhi
Lin, Xue
Machine Learning
Artificial Intelligence
Computation and Language
Despite the superior performance, it is challenging to deploy foundation models or large language models (LLMs) due to their massive parameters and computations. While pruning is a promising technique to reduce model size and accelerate the inference, the traditional pruning techniques can hardly be applied for LLMs as they need to finetune the model on the full dataset with multiple epochs consuming massive data and hardware resources. To deal with this problem, post-training pruning methods are proposed to prune LLMs in one-shot without retraining. However, their accuracy after pruning may suffer from certain performance degradation due to the lack of retraining with massive data. To address this issue, in this paper, we first formulate the post-training problem for layer-wise LLM compression to simultaneously prune multiple weights in LLMs. Next, we provide an optimal solution for this problem and design our post-training pruning algorithm for both unstructured and semi-structured sparsity. Our extensive experiments demonstrate the superior performance of the proposed methods in comparison to SOTA baselines across various LLM families including transformer-based LLMs and Mamba-based LLMs. Code link: https://github.com/piuzha/APT
title Pruning Foundation Models for High Accuracy without Retraining
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2410.15567