paper-with-me

홈 › Papers

ReLU$^2$ Wins: Discovering Efficient Activation Functions for Sparse LLMs

2024-02-06 · Zhengyan Zhang, Yixin Song, Guanghui Yu, Xu Han, Yankai Lin, Chaojun Xiao, Chenyang Song, Zhiyuan Liu, Zeyu Mi, Maosong Sun

Sparse computation offers a compelling solution for the inference of Large Language Models (LLMs) in low-resource scenarios by dynamically skipping the computation of inactive neurons. While traditional approaches focus on ReLU-based LLMs, leveraging zeros in activation values, we broaden the scope of sparse LLMs beyond zero activation values. We introduce a general method that defines neuron activation through neuron output magnitudes and a tailored magnitude threshold, demonstrating that non-ReLU LLMs also exhibit sparse activation. To find the most efficient activation function for sparse computation, we propose a systematic framework to examine the sparsity of LLMs from three aspects: the trade-off between sparsity and performance, the predictivity of sparsity, and the hardware affinity. We conduct thorough experiments on LLMs utilizing different activation functions, including ReLU, SwiGLU, ReGLU, and ReLU$^2$. The results indicate that models employing ReLU$^2$ excel across all three evaluation aspects, highlighting its potential as an efficient activation function for sparse LLMs. We will release the code to facilitate future research.

📄 PDF Abstract BibTeX arXiv:2402.03804

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

SwiGLU SwiGLU is an activation function which is a variant of GLU. The definition is as follows: $$ \text{SwiGLU}\left(x, W, V, b, c,…
Focus 설명 없음
ReGLU ReGLU is an activation function which is a variant of GLU. The definition is as follows: $$ \text{ReGLU}\left(x, W, V, b, c\right)…

Similar Papers 제목 키워드 기반

Discovering Parametric Activation Functions

2020-06-05 · Garrett Bingham, Risto Miikkulainen

Recent studies have shown that the choice of activation function can significantly affect the performance of deep learning networks. However, the benefits of novel activation functions have been inconsistent and task dep…

Deep Learningimage-classificationImage Classification

Natural-Logarithm-Rectified Activation Function in Convolutional Neural Networks

2019-08-10 · Yang Liu, Jianpeng Zhang, Chao GAO, Jinghua Qu 외

Activation functions play a key role in providing remarkable performance in deep neural networks, and the rectified linear unit (ReLU) is one of the most widely used activation functions. Various new activation functions…

ProSparse: Introducing and Enhancing Intrinsic Activation Sparsity within Large Language Models

2024-02-21 · Chenyang Song, Xu Han, Zhengyan Zhang, Shengding Hu 외

Activation sparsity refers to the existence of considerable weakly-contributed elements among activation outputs. As a prevalent property of the models using the ReLU activation function, activation sparsity has been pro…

Expressive power of binary and ternary neural networks

2022-06-27 · Aleksandr Beknazaryan

We show that deep sparse ReLU networks with ternary weights and deep ReLU networks with binary weights can approximate $\beta$-H\"older functions on $[0,1]^d$. Also, for any interval $[a,b)\subset\mathbb{R}$, continuous …

Activation Functions: Dive into an optimal activation function

2022-02-24 · Vipul Bansal

Activation functions have come up as one of the essential components of neural networks. The choice of adequate activation function can impact the accuracy of these methods. In this study, we experiment for finding an op…