Less is More: Towards Green Code Large Language Models via Unified Structural Pruning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Guang, Zhou, Yu, Zhang, Xiangyu, Cheng, Wei, Liu, Ke, Chen, Xiang, Zhuo, Terry Yue, Chen, Taolue
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913806315159552
author Yang, Guang
Zhou, Yu
Zhang, Xiangyu
Cheng, Wei
Liu, Ke
Chen, Xiang
Zhuo, Terry Yue
Chen, Taolue
author_facet Yang, Guang
Zhou, Yu
Zhang, Xiangyu
Cheng, Wei
Liu, Ke
Chen, Xiang
Zhuo, Terry Yue
Chen, Taolue
contents The extensive application of Large Language Models (LLMs) in generative coding tasks has raised concerns due to their high computational demands and energy consumption. Unlike previous structural pruning methods designed for classification models that deal with lowdimensional classification logits, generative Code LLMs produce high-dimensional token logit sequences, making traditional pruning objectives inherently limited. Moreover, existing single component pruning approaches further constrain the effectiveness when applied to generative Code LLMs. In response, we propose Flab-Pruner, an innovative unified structural pruning method that combines vocabulary, layer, and Feed-Forward Network (FFN) pruning. This approach effectively reduces model parameters while maintaining performance. Additionally, we introduce a customized code instruction data strategy for coding tasks to enhance the performance recovery efficiency of the pruned model. Through extensive evaluations on three state-of-the-art Code LLMs across multiple generative coding tasks, the results demonstrate that Flab-Pruner retains 97% of the original performance after pruning 22% of the parameters and achieves the same or even better performance after post-training. The pruned models exhibit significant improvements in storage, GPU usage, computational efficiency, and environmental impact, while maintaining well robustness. Our research provides a sustainable solution for green software engineering and promotes the efficient deployment of LLMs in real-world generative coding intelligence applications.
format Preprint
id arxiv_https___arxiv_org_abs_2412_15921
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Less is More: Towards Green Code Large Language Models via Unified Structural Pruning
Yang, Guang
Zhou, Yu
Zhang, Xiangyu
Cheng, Wei
Liu, Ke
Chen, Xiang
Zhuo, Terry Yue
Chen, Taolue
Software Engineering
Artificial Intelligence
The extensive application of Large Language Models (LLMs) in generative coding tasks has raised concerns due to their high computational demands and energy consumption. Unlike previous structural pruning methods designed for classification models that deal with lowdimensional classification logits, generative Code LLMs produce high-dimensional token logit sequences, making traditional pruning objectives inherently limited. Moreover, existing single component pruning approaches further constrain the effectiveness when applied to generative Code LLMs. In response, we propose Flab-Pruner, an innovative unified structural pruning method that combines vocabulary, layer, and Feed-Forward Network (FFN) pruning. This approach effectively reduces model parameters while maintaining performance. Additionally, we introduce a customized code instruction data strategy for coding tasks to enhance the performance recovery efficiency of the pruned model. Through extensive evaluations on three state-of-the-art Code LLMs across multiple generative coding tasks, the results demonstrate that Flab-Pruner retains 97% of the original performance after pruning 22% of the parameters and achieves the same or even better performance after post-training. The pruned models exhibit significant improvements in storage, GPU usage, computational efficiency, and environmental impact, while maintaining well robustness. Our research provides a sustainable solution for green software engineering and promotes the efficient deployment of LLMs in real-world generative coding intelligence applications.
title Less is More: Towards Green Code Large Language Models via Unified Structural Pruning
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2412.15921