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

Lei Lu, Zhepeng Wang, Runxue Bao, Mengbing Wang, Fangyi Li +5 more
12/19/2024
cs.CLcs.AI

No official code found. Best implementation: GGGGxxxxxxxxr/One-click-Tuning-and-Pruning-for-Customized-LLMs (6 stars, last commit 2025-08-05).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Official Implementation for "ATP: All-in-one tuning and structural pruning for domain-specific llms"

60Cuda, PythonOct 14, 20241 years ago

Similar Papers

Cite this paper

@article{lu2024allinone,
  title  = {All-in-One Tuning and Structural Pruning for Domain-Specific LLMs},
  author = {Lei Lu and Zhepeng Wang and Runxue Bao and Mengbing Wang and Fangyi Li and Yawen Wu and Weiwen Jiang and Jie Xu and Yanzhi Wang and Shangqian Gao},
  year   = {2024},
  eprint = {2412.14426},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.14426v2}
}

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/2412.14426.svg)](https://codeofpaper.com/paper/2412.14426)

Discussion