Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

SparQ Attention: Bandwidth-Efficient LLM Inference

About

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.

Luka Ribar, Ivan Chelombiev, Luke Hudlass-Galley, Charlie Blake, Carlo Luschi, Douglas Orr• 2023

Related benchmarks

TaskDatasetResultRank
Long-context UnderstandingLongBench
Accuracy92.2
60
Long-context evaluationRULER 16k
Total Score56.02
59
Long-context evaluationRULER 32k
Overall Score36.74
41
Long-context evaluationRULER 4k
Score87.93
35
Long-context evaluationRULER 8k
Score68.97
35
Mathematical ReasoningMATH 500
Flex Match84.8
27
Showing 6 of 6 rows

Other info

Follow for update