arXiv:2410.11988cs.CLcs.LG2024-10NeurIPS被引 38

提出不依赖嵌入维度的结构化剪枝,提升大模型部署灵活性。

DISP-LLM: Dimension-Independent Structural Pruning for Large Language Models

  • 打破嵌入维度的结构依赖,允许不同模块使用不同特征图子集。
  • 在多个大模型上实现接近半结构化剪枝的精度表现。
  • 适合资源受限设备上的大模型高效部署场景。

大型语言模型(LLMs)在自然语言处理任务中取得显著成功,但其高昂的内存与计算成本给资源受限设备的部署带来挑战。结构化剪枝成为无需后处理即可降低模型开销的有前景方案。现有方法或受结构依赖约束导致灵活性不足,或引入额外参数。本文提出一种维度无关的结构化剪枝方法,突破传统限制,消除嵌入维度上的结构依赖。该方法使不同模块可选择性使用特征图子集,并允许各模块在输入与输出维度上具有不同宽度,显著提升剪枝灵活性。我们在OPT、LLaMA、LLaMA-2、Phi-1.5和Phi-2等模型上验证该方法,实验表明其性能优于现有先进方法,首次实现结构化剪枝达到半结构化剪枝的精度水平。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have achieved remarkable success in various natural language processing tasks, including language modeling, understanding, and generation. However, the increased memory and computational costs associated with these models pose significant challenges for deployment on resource-limited devices. Structural pruning has emerged as a promising solution to reduce the costs of LLMs without requiring post-processing steps. Prior structural pruning methods either follow the dependence of structures at the cost of limiting flexibility, or introduce non-trivial additional parameters by incorporating different projection matrices. In this work, we propose a novel approach that relaxes the constraint imposed by regular structural pruning methods and eliminates the structural dependence along the embedding dimension. Our dimension-independent structural pruning method offers several benefits. Firstly, our method enables different blocks to utilize different subsets of the feature maps. Secondly, by removing structural dependence, we facilitate each block to possess varying widths along its input and output dimensions, thereby significantly enhancing the flexibility of structural pruning. We evaluate our method on various LLMs, including OPT, LLaMA, LLaMA-2, Phi-1.5, and Phi-2. Experimental results demonstrate that our approach outperforms other state-of-the-art methods, showing for the first time that structural pruning can achieve an accuracy similar to semi-structural pruning.

大模型剪枝结构化剪枝高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。