Efficient LLMs with AMP: Attention Heads and MLP Pruning
Mugnaini, Leandro Giusti, Yamamoto, Bruno Lopes, de Alcantara, Lucas Lauton, Zacarias, Victor, Bollis, Edson, Pellicer, Lucas, Costa, Anna Helena Reali, Jordao, Artur
–arXiv.org Artificial Intelligence
--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: A ttention Heads and M LP P runing, 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. 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. Within the evolving landscape of Artificial Intelligence, Large Language Models (LLMs) stand out as a pivotal force, propelling Natural Language Processing towards unprecedented stages - often matching or even surpassing human-level performance in many language benchmarks [1]-[3].
arXiv.org Artificial Intelligence
May-1-2025