Efficient LLMs with AMP: Attention Heads and MLP Pruning
Escola Politécnica(圣保罗理工大学);Instituto de Matemática e Estatística(数学与统计学研究所);Universidade de São Paulo(圣保罗大学);Instituto de Ciência e Tecnologia Itaú (ICTi)(Itaú科学与技术研究所)
Leandro Giusti Mugnaini, Bruno Lopes Yamamoto, Lucas Lauton de Alcantara, Victor Zacarias, Edson Bollis, Lucas Pellicer, Anna Helena Reali Costa, Artur Jordao
备注:
Published in International Joint Conference on Neural Networks (IJCNN), 2025
深度学习推动了计算系统的新发展浪潮,促使越来越复杂问题的自动化成为现实。其中,大语言模型(Large Language Models, LLMs)已显著提升认知任务的表现,常达到甚至超越人类水平。但LLMs庞大的参数规模会带来高计算成本与缓慢的推理速度,给资源受限场景下的部署带来挑战。在应对上述挑战的策略中,剪枝是一种有效的机制,它能在保持预测能力的同时减小模型规模。本文提出AMP(Attention Heads and MLP Pruning),一种新型结构化剪枝方法,通过移除多头注意力(Multi-Head Attention, MHA)和多层感知机(Multilayer Perceptron, MLP)中较不重要的结构,高效压缩LLMs。AMP通过将输入数据投影到权重上来评估结构重要性,克服了现有技术在灵活性或效率上的不足。具体而言,AMP在常识推理任务上超越了当前最优方法,最高提升1.49个百分点,在实现30%剪枝率的同时,对零样本任务性能的影响极小。此外,AMP还提升了推理速度,非常适合部署在资源受限的环境中。我们还验证了AMP在不同LLMs系列(包括LLaMA和Phi)上的灵活性。
英文摘要:
Deep learning drives a new wave in computing systems and triggers the automation of increasingly complex problems. In particular, Large Language Models (LLMs) have significantly advanced cognitive tasks, often matching or even surpassing human-level performance. However, their extensive parameters result in high computational costs and slow inference, posing challenges for deployment in resource-limited settings. Among the strategies to overcome the aforementioned challenges, pruning emerges as a successful mechanism since it reduces model size while maintaining predictive ability. In this paper, we introduce AMP: Attention Heads and MLP Pruning, a novel structured pruning method that efficiently compresses LLMs by removing less critical structures within Multi-Head Attention (MHA) and Multilayer Perceptron (MLP). By projecting the input data onto weights, AMP assesses structural importance and overcomes the limitations of existing techniques, which often fall short in flexibility or efficiency. In particular, AMP surpasses the current state-of-the-art on commonsense reasoning tasks by up to 1.49 percentage points, achieving a 30% pruning ratio with minimal impact on zero-shot task performance. Moreover, AMP also improves inference speeds, making it well-suited for deployment in resource-constrained environments. We confirm the flexibility of AMP on different families of LLMs, including LLaMA and Phi.
BumpNet: A Sparse MLP Framework for Learning PDE Solutions
Department of Electrical and Computer Engineering, Texas A\&M University, TX, USA(电气与计算机工程系,德克萨斯A&M大学);Department of Chemical and Biomolecular Engineering, The Johns Hopkins University, MD, USA(化学与生物分子工程系,约翰霍普金斯大学)
RAM: Replace Attention with MLP for Efficient Multivariate Time Series Forecasting
School of Artificial Intelligence(人工智能学院);School of Intelligence Science and Technology(智能科学与技术学院);Department of Computer Science and Technology(计算机科学与技术系);School of Electronic Science and Engineering(电子科学与工程学院)
本文提出 RAM 剪枝策略,用前馈层、残差连接和层归一化替代注意力机制,在 STF 与 LTSF 模型中大幅降低 FLOPs,同时保持接近 SOTA 的预测性能。
Adaptive and Fine-grained Module-wise Expert Pruning for Efficient LoRA-MoE Fine-Tuning
School of Computer Science and Technology, University of Science and Technology of China, China(计算机科学与技术学院,中国科学技术大学);Suzhou Institute for Advanced Research, University of Science and Technology of China, China(苏州先进研究院,中国科学技术大学)
ToMoE: Converting Dense Large Language Models to Mixture-of-Experts through Dynamic Structural Pruning
Department of Computer Science, Florida State University(佛罗里达州立大学计算机科学系);Department of Computer Science and Engineering, University of Notre Dame(圣母大学计算机科学与工程系);Department of Computer Science, University of Maryland, College Park(马里兰大学学院市计算机科学系);Samsung Research America(三星美国研究机构);Department of Computer Science, University of Central Florida(中央佛罗里达大学计算机科学系);Department of Health Outcomes and Biomedical Informatics, University of Florida(佛罗里达大学健康结果与生物医学信息学系)
LLM-Barber: Block-Aware Rebuilder for Sparsity Mask in One-Shot for Large Language Models
School of Microelectronics, Southern University of Science and Technology(微电子学院,南方科技大学);Department of Electrical and Electronic Engineering, University of Hong Kong(电气与电子工程系,香港大学)
Towards the Connection between Activation Sparsity and Flat Minima
State Key Laboratory for Novel Software Technology, Nanjing University(南京大学新型软件技术国家重点实验室);Institute of Brain-Machine Interface, Nanjing University(南京大学脑机接口研究院);School of Computer Science and Engineering, Southeast University(东南大学计算机科学与工程学院)
Constrained Edge AI Deployment: Fine-Tuning vs Distillation for LLM Compression
Department of Computer Science, University of West Florida(计算机科学系,西佛罗里达大学);Department of Mathematics and Statistics, University of West Florida(数学与统计学系,西佛罗里达大学);Department of Intelligent Systems and Robotics, University of West Florida(智能系统与机器人系,西佛罗里达大学);Institute of Human and Machine Cognition(人机认知研究所);DEVCOM Army Research Laboratory(陆军研究实验室)