用进化算法找最佳剪枝方式,让大模型在低资源下更准更快。
EvoP: Robust LLM Inference via Evolutionary Pruning
- 通过聚类采样构建多样化校准数据集,提升剪枝适应性。
- 用进化搜索找到最优剪枝模式,在多种模型上表现更优。
- 适合需要高效部署大模型的工程场景,尤其资源受限环境。
大语言模型在自然语言处理任务中表现卓越,但其庞大规模和高计算需求限制了在资源受限环境中的部署。现有模型剪枝方法通过移除冗余结构(如参数、通道、层)缓解此问题,但依赖启发式策略,性能不理想,且忽略数据特性。为此,我们提出EvoP——一种用于鲁棒大模型推理的进化剪枝框架。EvoP首先提出基于聚类的校准数据集采样(CCDS)策略,构建更具多样性的校准数据集;随后引入进化剪枝模式搜索(EPPS)方法,自动寻找最优剪枝模式。相比现有剪枝技术,EvoP在保持最佳效率的同时实现最优性能。在多个大语言模型及下游任务上的实验验证了其有效性,使其成为真实应用场景中可落地、可扩展的大模型部署方案。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have achieved remarkable success in natural language processing tasks, but their massive size and computational demands hinder their deployment in resource-constrained environments. Existing model pruning methods address this issue by removing redundant structures (e.g., elements, channels, layers) from the model. However, these methods employ a heuristic pruning strategy, which leads to suboptimal performance. Besides, they also ignore the data characteristics when pruning the model. To overcome these limitations, we propose EvoP, an evolutionary pruning framework for robust LLM inference. EvoP first presents a cluster-based calibration dataset sampling (CCDS) strategy for creating a more diverse calibration dataset. EvoP then introduces an evolutionary pruning pattern searching (EPPS) method to find the optimal pruning pattern. Compared to existing model pruning techniques, EvoP achieves the best performance while maintaining the best efficiency. Experiments across different LLMs and different downstream tasks validate the effectiveness of the proposed EvoP, making it a practical and scalable solution for deploying LLMs in real-world applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。