Abstract
Large Language Models (LLMs) have shown remarkable performance across various language processing applications. Nevertheless, their extensive computational requirements could hinder their deployment in real-time applications or resource-constrained environments. Pruning is a powerful technique to reduce the model size and make it computationally efficient. In this paper, we propose a structured pruning algorithm, Weight Activation and Gradient (WActiGrad), to obtain smaller LLMs from large pre-trained models. We investigate the level of granularity at which structured pruning techniques can be applied to an LLM and identify the challenges in applying these techniques across different parts of the transformer. Finally, based on these observations, we develop a pruning methodology that is adaptable to various attention and feedforward network modules. We comprehensively assess our WActiGrad method on state-of-the-art LLMs, LLaMA (7B and 13B), LLaMA-2 (7B and 13B), and Mistral-7B models across several language benchmarks for post-pretraining. This approach can prune close to 20% of the original model size without significantly compromising the model validation accuracy. We evaluate the hardware performance of our structurally pruned LLMs on different AI accelerators such as Nvidia A100 GPU, Groq LPU, Cerebras CS-2, and Graphcore Bow systems to show the effectiveness of the structured pruning technique. The findings presented in this paper offer insights into the integration of structured pruning techniques deployment on AI accelerators.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Polaris supercomputing system (2023). https://www.alcf.anl.gov/polaris
Weight Streaming Mode (2023). https://docs.cerebras.net/en/latest/wsc/cerebras-basics/cerebras-execution-modes.html
ALCF AI testbed (2024). https://www.alcf.anl.gov/alcf-ai-testbed
Abts, D., et al.: Think fast: a tensor streaming processor (TSP) for accelerating deep learning workloads. In: 2020 ACM/IEEE 47th Annual International Symposium on Computer Architecture (ISCA), pp. 145–158. IEEE (2020)
Ainslie, J., et al.: GQA: training generalized multi-query transformer models from multi-head checkpoints. arXiv preprint arXiv:2305.13245 (2023)
Aminabadi, R.Y., et al.: Deepspeed-inference: enabling efficient inference of transformer models at unprecedented scale. In: SC22: International Conference for High Performance Computing, Networking, Storage and Analysis, pp. 1–15. IEEE (2022)
Frantar, E., et al.: Sparsegpt: massive language models can be accurately pruned in one-shot. In: International Conference on Machine Learning, pp. 10323–10337. PMLR (2023)
Graphcore: Application examples (2024). https://github.com/graphcore/examples
Hu, E.J., et al.: Lora: low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685 (2021)
Jiang, A.Q., et al.: Mistral 7b. arXiv preprint arXiv:2310.06825 (2023)
Ma, X., et al.: LLM-pruner: on the structural pruning of large language models. Adv. Neural. Inf. Process. Syst. 36, 21702–21720 (2023)
Marcus, M., et al.: The penn treebank: annotating predicate argument structure. In: Human Language Technology: Proceedings of a Workshop held at Plainsboro, New Jersey, 8–11 March 1994 (1994)
Merity, S., et al.: Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843 (2016)
Sun, M., et al.: A simple and effective pruning approach for large language models. arXiv preprint arXiv:2306.11695 (2023)
Acknowledgment
This research was funded in part by and used resources at the Argonne Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract DE-AC02-06CH11357. We thank Sid Raskar, Sam Foreman, Ray Powell and William Arnold from ALCF, Natalia Vassilieva and Alice Zhang from Cerebras and Alex Tsyplikhin from Graphcore for their inputs.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Chitty-Venkata, K.T., Sastry, V.K., Emani, M., Vishwanath, V., Shanmugavelu, S., Howland, S. (2024). WActiGrad: Structured Pruning for Efficient Finetuning and Inference of Large Language Models on AI Accelerators. In: Carretero, J., Shende, S., Garcia-Blas, J., Brandic, I., Olcoz, K., Schreiber, M. (eds) Euro-Par 2024: Parallel Processing. Euro-Par 2024. Lecture Notes in Computer Science, vol 14802. Springer, Cham. https://doi.org/10.1007/978-3-031-69766-1_22
Download citation
DOI: https://doi.org/10.1007/978-3-031-69766-1_22
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-69765-4
Online ISBN: 978-3-031-69766-1
eBook Packages: Computer ScienceComputer Science (R0)