TensorX
返回文献探索

Paper · arXiv 2312.04985

SparQ Attention: Bandwidth-Efficient LLM Inference

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

40 upvotesDecember 8, 2023arXiv 预印本
AI 摘要

SparQ Attention reduces memory bandwidth requirements in LLM attention blocks, enhancing inference throughput without accuracy loss.

SparQ Attentiongenerative large language models (LLMs)inference throughputattention blocksmemory bandwidthLlama 2Pythia modelsdownstream tasks

Abstract

Generative large language models (LLMs) have opened up numerous novel possibilities, but due to their significant computational requirements their ubiquitous use remains challenging. Some of the most useful applications require processing large numbers of samples at a time and using long contexts, both significantly increasing the memory communication load of the models. We introduce SparQ Attention, a technique for increasing the inference throughput of LLMs by reducing the memory bandwidth requirements within the attention blocks 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 how SparQ Attention can decrease the attention memory bandwidth requirements up to eight times without any loss in accuracy by evaluating Llama 2 and Pythia models on a wide range of downstream tasks.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
SparQ Attention: Bandwidth-Efficient LLM Inference | TensorX