Saved in:
Bibliographic Details
Main Authors: Ribar, Luka, Chelombiev, Ivan, Hudlass-Galley, Luke, Blake, Charlie, Luschi, Carlo, Orr, Douglas
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2312.04985
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912013887733760
author Ribar, Luka
Chelombiev, Ivan
Hudlass-Galley, Luke
Blake, Charlie
Luschi, Carlo
Orr, Douglas
author_facet Ribar, Luka
Chelombiev, Ivan
Hudlass-Galley, Luke
Blake, Charlie
Luschi, Carlo
Orr, Douglas
contents The computational difficulties of large language model (LLM) inference remain a significant obstacle to their widespread deployment. The need for many applications to support long input sequences and process them in large batches typically causes token-generation to be bottlenecked by data transfer. For this reason, we introduce SparQ Attention, a technique for increasing the inference throughput of LLMs by utilising memory bandwidth more efficiently within the attention layers, through selective fetching of the cached history. Our proposed technique can be applied directly to off-the-shelf LLMs during inference, without requiring any modification to the pre-training setup or additional fine-tuning. We show that SparQ Attention brings up to 8x savings in attention data transfers without substantial drops in accuracy, by evaluating Llama 2 and 3, Mistral, Gemma and Pythia models on a wide range of downstream tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2312_04985
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle SparQ Attention: Bandwidth-Efficient LLM Inference
Ribar, Luka
Chelombiev, Ivan
Hudlass-Galley, Luke
Blake, Charlie
Luschi, Carlo
Orr, Douglas
Machine Learning
The computational difficulties of large language model (LLM) inference remain a significant obstacle to their widespread deployment. The need for many applications to support long input sequences and process them in large batches typically causes token-generation to be bottlenecked by data transfer. For this reason, we introduce SparQ Attention, a technique for increasing the inference throughput of LLMs by utilising memory bandwidth more efficiently within the attention layers, through selective fetching of the cached history. Our proposed technique can be applied directly to off-the-shelf LLMs during inference, without requiring any modification to the pre-training setup or additional fine-tuning. We show that SparQ Attention brings up to 8x savings in attention data transfers without substantial drops in accuracy, by evaluating Llama 2 and 3, Mistral, Gemma and Pythia models on a wide range of downstream tasks.
title SparQ Attention: Bandwidth-Efficient LLM Inference
topic Machine Learning
url https://arxiv.org/abs/2312.04985