All-in-One Tuning and Structural Pruning for Domain-Specific LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lu, Lei, Wang, Zhepeng, Bao, Runxue, Wang, Mengbing, Li, Fangyi, Wu, Yawen, Jiang, Weiwen, Xu, Jie, Wang, Yanzhi, Gao, Shangqian
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910756849582080
author Lu, Lei
Wang, Zhepeng
Bao, Runxue
Wang, Mengbing
Li, Fangyi
Wu, Yawen
Jiang, Weiwen
Xu, Jie
Wang, Yanzhi
Gao, Shangqian
author_facet Lu, Lei
Wang, Zhepeng
Bao, Runxue
Wang, Mengbing
Li, Fangyi
Wu, Yawen
Jiang, Weiwen
Xu, Jie
Wang, Yanzhi
Gao, Shangqian
contents Existing pruning techniques for large language models (LLMs) targeting domain-specific applications typically follow a two-stage process: pruning the pretrained general-purpose LLMs and then fine-tuning the pruned LLMs on specific domains. However, the pruning decisions, derived from the pretrained weights, remain unchanged during fine-tuning, even if the weights have been updated. Therefore, such a combination of the pruning decisions and the finetuned weights may be suboptimal, leading to non-negligible performance degradation. To address these limitations, we propose ATP: All-in-One Tuning and Structural Pruning, a unified one-stage structural pruning and fine-tuning approach that dynamically identifies the current optimal substructure throughout the fine-tuning phase via a trainable pruning decision generator. Moreover, given the limited available data for domain-specific applications, Low-Rank Adaptation (LoRA) becomes a common technique to fine-tune the LLMs. In ATP, we introduce LoRA-aware forward and sparsity regularization to ensure that the substructures corresponding to the learned pruning decisions can be directly removed after the ATP process. ATP outperforms the state-of-the-art two-stage pruning methods on tasks in the legal and healthcare domains. More specifically, ATP recovers up to 88% and 91% performance of the dense model when pruning 40% parameters of LLaMA2-7B and LLaMA3-8B models, respectively.
format Preprint
id arxiv_https___arxiv_org_abs_2412_14426
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle All-in-One Tuning and Structural Pruning for Domain-Specific LLMs
Lu, Lei
Wang, Zhepeng
Bao, Runxue
Wang, Mengbing
Li, Fangyi
Wu, Yawen
Jiang, Weiwen
Xu, Jie
Wang, Yanzhi
Gao, Shangqian
Computation and Language
Artificial Intelligence
Existing pruning techniques for large language models (LLMs) targeting domain-specific applications typically follow a two-stage process: pruning the pretrained general-purpose LLMs and then fine-tuning the pruned LLMs on specific domains. However, the pruning decisions, derived from the pretrained weights, remain unchanged during fine-tuning, even if the weights have been updated. Therefore, such a combination of the pruning decisions and the finetuned weights may be suboptimal, leading to non-negligible performance degradation. To address these limitations, we propose ATP: All-in-One Tuning and Structural Pruning, a unified one-stage structural pruning and fine-tuning approach that dynamically identifies the current optimal substructure throughout the fine-tuning phase via a trainable pruning decision generator. Moreover, given the limited available data for domain-specific applications, Low-Rank Adaptation (LoRA) becomes a common technique to fine-tune the LLMs. In ATP, we introduce LoRA-aware forward and sparsity regularization to ensure that the substructures corresponding to the learned pruning decisions can be directly removed after the ATP process. ATP outperforms the state-of-the-art two-stage pruning methods on tasks in the legal and healthcare domains. More specifically, ATP recovers up to 88% and 91% performance of the dense model when pruning 40% parameters of LLaMA2-7B and LLaMA3-8B models, respectively.
title All-in-One Tuning and Structural Pruning for Domain-Specific LLMs
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2412.14426