Salvato in:
Dettagli Bibliografici
Autori principali: Shin, Jiho, Yang, Hoeseok, Yi, Youngmin
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:https://arxiv.org/abs/2411.12692
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916581120933888
author Shin, Jiho
Yang, Hoeseok
Yi, Youngmin
author_facet Shin, Jiho
Yang, Hoeseok
Yi, Youngmin
contents Leveraging sparsity is crucial for optimizing large language model inference. however, modern LLMs employing SiLU as their activation function exhibit minimal activation sparsity. Recent research has proposed replacing SiLU with ReLU to induce significant activation sparsity and showed no downstream task accuracy degradation through fine tuning. However, taking full advantage of it required training a predictor to estimate this sparsity. In this paper, we introduce SparseInfer, a simple, light weight, and training free predictor for activation sparsity of ReLU field LLMs, in which activation sparsity is predicted by comparing only the sign bits of inputs and weights. To compensate for possible prediction inaccuracy, an adaptive tuning of the predictor's conservativeness is enabled, which can also serve as a control knob for optimizing LLM inference. The proposed method achieves approximately faster inference speed over the state of the art, with negligible accuracy loss of within 1%p.
format Preprint
id arxiv_https___arxiv_org_abs_2411_12692
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SparseInfer: Training-free Prediction of Activation Sparsity for Fast LLM Inference
Shin, Jiho
Yang, Hoeseok
Yi, Youngmin
Performance
Leveraging sparsity is crucial for optimizing large language model inference. however, modern LLMs employing SiLU as their activation function exhibit minimal activation sparsity. Recent research has proposed replacing SiLU with ReLU to induce significant activation sparsity and showed no downstream task accuracy degradation through fine tuning. However, taking full advantage of it required training a predictor to estimate this sparsity. In this paper, we introduce SparseInfer, a simple, light weight, and training free predictor for activation sparsity of ReLU field LLMs, in which activation sparsity is predicted by comparing only the sign bits of inputs and weights. To compensate for possible prediction inaccuracy, an adaptive tuning of the predictor's conservativeness is enabled, which can also serve as a control knob for optimizing LLM inference. The proposed method achieves approximately faster inference speed over the state of the art, with negligible accuracy loss of within 1%p.
title SparseInfer: Training-free Prediction of Activation Sparsity for Fast LLM Inference
topic Performance
url https://arxiv.org/abs/2411.12692