Training-Free Activation Sparsity in Large Language Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, James, Ponnusamy, Pragaash, Cai, Tianle, Guo, Han, Kim, Yoon, Athiwaratkun, Ben
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915173168578560
author Liu, James
Ponnusamy, Pragaash
Cai, Tianle
Guo, Han
Kim, Yoon
Athiwaratkun, Ben
author_facet Liu, James
Ponnusamy, Pragaash
Cai, Tianle
Guo, Han
Kim, Yoon
Athiwaratkun, Ben
contents Activation sparsity can enable practical inference speedups in large language models (LLMs) by reducing the compute and memory-movement required for matrix multiplications during the forward pass. However, existing methods face limitations that inhibit widespread adoption. Some approaches are tailored towards older models with ReLU-based sparsity, while others require extensive continued pre-training on up to hundreds of billions of tokens. This paper describes TEAL, a simple training-free method that applies magnitude-based activation sparsity to hidden states throughout the entire model. TEAL achieves 40-50% model-wide sparsity with minimal performance degradation across Llama-2, Llama-3, and Mistral families, with sizes varying from 7B to 70B. We improve existing sparse kernels and demonstrate wall-clock decoding speed-ups of up to 1.53$\times$ and 1.8$\times$ at 40% and 50% model-wide sparsity. TEAL is compatible with weight quantization, enabling further efficiency gains.
format Preprint
id arxiv_https___arxiv_org_abs_2408_14690
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Training-Free Activation Sparsity in Large Language Models
Liu, James
Ponnusamy, Pragaash
Cai, Tianle
Guo, Han
Kim, Yoon
Athiwaratkun, Ben
Computation and Language
Artificial Intelligence
Activation sparsity can enable practical inference speedups in large language models (LLMs) by reducing the compute and memory-movement required for matrix multiplications during the forward pass. However, existing methods face limitations that inhibit widespread adoption. Some approaches are tailored towards older models with ReLU-based sparsity, while others require extensive continued pre-training on up to hundreds of billions of tokens. This paper describes TEAL, a simple training-free method that applies magnitude-based activation sparsity to hidden states throughout the entire model. TEAL achieves 40-50% model-wide sparsity with minimal performance degradation across Llama-2, Llama-3, and Mistral families, with sizes varying from 7B to 70B. We improve existing sparse kernels and demonstrate wall-clock decoding speed-ups of up to 1.53$\times$ and 1.8$\times$ at 40% and 50% model-wide sparsity. TEAL is compatible with weight quantization, enabling further efficiency gains.
title Training-Free Activation Sparsity in Large Language Models
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2408.14690