通过附加微型分类器实现大模型高效剪枝,显著提升压缩比。
Chip-Tuning: Classify Before Language Models Say
- 在不同层附加微型探测器,冻结主模型训练
- 最高实现50%剪枝率,性能损失极小
- 适合需要轻量化部署的分类任务
大规模语言模型(LLMs)性能快速提升的同时,模型规模持续扩大,导致训练与推理成本增加。已有研究发现,部分模型层存在冗余,移除后性能下降不明显。本文采用探测技术解释层冗余现象,并证明可通过探测分类器对语言模型进行有效剪枝。提出一种名为Chip-Tuning的结构化剪枝框架,专为分类任务设计:在不同层附加微型探测分类器(称为chips),在冻结主模型的前提下训练这些chips;选定最优chips后,其后续所有层均可移除,仅造成微小性能损失。在多种LLM和数据集上的实验表明,Chip-Tuning在准确率和剪枝率上均显著优于现有最优方法,最高可实现50%的剪枝比例。此外,该方法也适用于多模态模型,且可与微调结合,展现出良好兼容性。
原文摘要 · Abstract (English)
The rapid development in the performance of large language models (LLMs) is accompanied by the escalation of model size, leading to the increasing cost of model training and inference. Previous research has discovered that certain layers in LLMs exhibit redundancy, and removing these layers brings only marginal loss in model performance. In this paper, we adopt the probing technique to explain the layer redundancy in LLMs and demonstrate that language models can be effectively pruned with probing classifiers. We propose chip-tuning, a simple and effective structured pruning framework specialized for classification problems. Chip-tuning attaches tiny probing classifiers named chips to different layers of LLMs, and trains chips with the backbone model frozen. After selecting a chip for classification, all layers subsequent to the attached layer could be removed with marginal performance loss. Experimental results on various LLMs and datasets demonstrate that chip-tuning significantly outperforms previous state-of-the-art baselines in both accuracy and pruning ratio, achieving a pruning ratio of up to 50%. We also find that chip-tuning could be applied on multimodal models, and could be combined with model finetuning, proving its excellent compatibility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。