Turbo Sparse: Achieving LLM SOTA Performance with Minimal Activated Parameters

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Song, Yixin, Xie, Haotong, Zhang, Zhengyan, Wen, Bo, Ma, Li, Mi, Zeyu, Chen, Haibo
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929380904665088
author Song, Yixin
Xie, Haotong
Zhang, Zhengyan
Wen, Bo
Ma, Li
Mi, Zeyu
Chen, Haibo
author_facet Song, Yixin
Xie, Haotong
Zhang, Zhengyan
Wen, Bo
Ma, Li
Mi, Zeyu
Chen, Haibo
contents Exploiting activation sparsity is a promising approach to significantly accelerating the inference process of large language models (LLMs) without compromising performance. However, activation sparsity is determined by activation functions, and commonly used ones like SwiGLU and GeGLU exhibit limited sparsity. Simply replacing these functions with ReLU fails to achieve sufficient sparsity. Moreover, inadequate training data can further increase the risk of performance degradation. To address these challenges, we propose a novel dReLU function, which is designed to improve LLM activation sparsity, along with a high-quality training data mixture ratio to facilitate effective sparsification. Additionally, we leverage sparse activation patterns within the Feed-Forward Network (FFN) experts of Mixture-of-Experts (MoE) models to further boost efficiency. By applying our neuron sparsification method to the Mistral and Mixtral models, only 2.5 billion and 4.3 billion parameters are activated per inference iteration, respectively, while achieving even more powerful model performance. Evaluation results demonstrate that this sparsity achieves a 2-5x decoding speedup. Remarkably, on mobile phones, our TurboSparse-Mixtral-47B achieves an inference speed of 11 tokens per second. Our models are available at \url{https://huggingface.co/PowerInfer}
format Preprint
id arxiv_https___arxiv_org_abs_2406_05955
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Turbo Sparse: Achieving LLM SOTA Performance with Minimal Activated Parameters
Song, Yixin
Xie, Haotong
Zhang, Zhengyan
Wen, Bo
Ma, Li
Mi, Zeyu
Chen, Haibo
Machine Learning
Computation and Language
Exploiting activation sparsity is a promising approach to significantly accelerating the inference process of large language models (LLMs) without compromising performance. However, activation sparsity is determined by activation functions, and commonly used ones like SwiGLU and GeGLU exhibit limited sparsity. Simply replacing these functions with ReLU fails to achieve sufficient sparsity. Moreover, inadequate training data can further increase the risk of performance degradation. To address these challenges, we propose a novel dReLU function, which is designed to improve LLM activation sparsity, along with a high-quality training data mixture ratio to facilitate effective sparsification. Additionally, we leverage sparse activation patterns within the Feed-Forward Network (FFN) experts of Mixture-of-Experts (MoE) models to further boost efficiency. By applying our neuron sparsification method to the Mistral and Mixtral models, only 2.5 billion and 4.3 billion parameters are activated per inference iteration, respectively, while achieving even more powerful model performance. Evaluation results demonstrate that this sparsity achieves a 2-5x decoding speedup. Remarkably, on mobile phones, our TurboSparse-Mixtral-47B achieves an inference speed of 11 tokens per second. Our models are available at \url{https://huggingface.co/PowerInfer}
title Turbo Sparse: Achieving LLM SOTA Performance with Minimal Activated Parameters
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2406.05955