Learn to Be Efficient: Build Structured Sparsity in Large Language Models
Abstract
Large Language Models (LLMs) have achieved remarkable success with their billion-level parameters, yet they incur high inference overheads. The emergence of activation sparsity in LLMs provides a natural approach to reduce this cost by involving only parts of the parameters for inference. However, existing methods only focus on utilizing this naturally formed activation sparsity in a post-training setting, overlooking the potential for further amplifying this inherent sparsity. In this paper, we hypothesize that LLMs can learn to be efficient by achieving more structured activation sparsity. To achieve this, we introduce a novel training algorithm, Learn-To-be-Efficient (LTE), designed to train efficiency-aware LLMs to learn to activate fewer neurons and achieve a better trade-off between sparsity and performance. Furthermore, unlike SOTA MoEfication methods, which mainly focus on ReLU-based models, LTE can also be applied to LLMs like LLaMA using non-ReLU activations. Extensive evaluation on language understanding, language generation, and instruction tuning tasks show that LTE consistently outperforms SOTA baselines. Along with our hardware-aware custom kernel implementation, LTE reduces LLaMA2-7B inference latency by 25% at 50% sparsity.
Cite
Text
Zheng et al. "Learn to Be Efficient: Build Structured Sparsity in Large Language Models." Neural Information Processing Systems, 2024. doi:10.52202/079017-3235Markdown
[Zheng et al. "Learn to Be Efficient: Build Structured Sparsity in Large Language Models." Neural Information Processing Systems, 2024.](https://mlanthology.org/neurips/2024/zheng2024neurips-learn/) doi:10.52202/079017-3235BibTeX
@inproceedings{zheng2024neurips-learn,
title = {{Learn to Be Efficient: Build Structured Sparsity in Large Language Models}},
author = {Zheng, Haizhong and Bai, Xiaoyan and Liu, Xueshen and Mao, Z. Morley and Chen, Beidi and Lai, Fan and Prakash, Atul},
booktitle = {Neural Information Processing Systems},
year = {2024},
doi = {10.52202/079017-3235},
url = {https://mlanthology.org/neurips/2024/zheng2024neurips-learn/}
}