将大模型剪枝为定制化专家模型,无需微调即可保持性能
Pruning General Large Language Models into Customized Expert Models
- 按语言、领域、任务维度识别并剪枝无关神经元
- 在多个模型上实现专家与通用能力几乎无损
- 适合需要轻量化定制模型的开发者使用
大型语言模型(LLMs)虽已革新自然语言处理,但其庞大模型规模常需大量计算资源。为节省算力并加速推理,有必要剪枝冗余参数,尤其对需特定下游场景轻量专家模型的经验用户而言。然而,现有剪枝方法多侧重保留通用能力,常需大量后训练或因粗粒度剪枝导致性能下降。本文提出一种定制剪枝方法(Cus-Prun),可将通用大模型剪枝为更小的轻量专家模型,沿语言、领域和任务维度进行定位。通过识别并剪除各维度无关神经元,Cus-Prun 在无需任何后训练的情况下生成专家模型。实验表明,该方法在不同模型家族与尺寸下均显著优于其他方法,专家与通用能力损失极小。
原文摘要 · Abstract (English)
Large language models (LLMs) have revolutionized natural language processing, yet their substantial model sizes often require substantial computational resources. To preserve computing resources and accelerate inference speed, it is crucial to prune redundant parameters, especially for experienced users who often need compact expert models tailored to specific downstream scenarios. However, most existing pruning methods focus on preserving the model's general capabilities, often requiring extensive post-training or suffering from degraded performance due to coarse-grained pruning. In this work, we design a $\underline{Cus}$tom $\underline{Prun}$ing method ($\texttt{Cus-Prun}$) to prune a large general model into a smaller lightweight expert model, which is positioned along the "language", "domain" and "task" dimensions. By identifying and pruning irrelevant neurons of each dimension, $\texttt{Cus-Prun}$ creates expert models without any post-training. Our experiments demonstrate that $\texttt{Cus-Prun}$ consistently outperforms other methods, achieving minimal loss in both expert and general capabilities across various models from different model families and sizes.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。