GTA: Grouped-head latenT Attention

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Sun, Luoyang, Deng, Cheng, Jiang, Jiwen, Wu, Xinjian, Zhang, Haifeng, Chen, Lei, Ni, Lionel, Wang, Jun
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866908461721190400
author Sun, Luoyang
Deng, Cheng
Jiang, Jiwen
Wu, Xinjian
Zhang, Haifeng
Chen, Lei
Ni, Lionel
Wang, Jun
author_facet Sun, Luoyang
Deng, Cheng
Jiang, Jiwen
Wu, Xinjian
Zhang, Haifeng
Chen, Lei
Ni, Lionel
Wang, Jun
contents Attention mechanisms underpin the success of large language models (LLMs), yet their substantial computational and memory overhead poses challenges for optimizing efficiency and performance. A critical bottleneck arises as KV cache and attention computations scale rapidly with text length, challenging deployment on hardware with limited computational and memory resources. We observe that attention mechanisms exhibit substantial redundancy, since the KV cache can be significantly compressed and attention maps across heads display high similarity, revealing that much of the computation and storage is unnecessary. Leveraging these insights, we propose \textbf{G}rouped-Head Laten\textbf{T} \textbf{A}ttention (GTA), a novel attention mechanism that reduces memory usage and computational complexity while maintaining performance. GTA comprises two components: (1) a shared attention map mechanism that reuses attention scores across multiple heads, decreasing the key cache size; and (2) a nonlinear value decoder with learned projections that compresses the value cache into a latent space, further cutting memory needs. GTA cuts attention computation FLOPs by up to \emph{62.5\%} versus Grouped-Query Attention and shrink the KV cache by up to \emph{70\%}, all while avoiding the extra overhead of Multi-Head Latent Attention to improve LLM deployment efficiency. Consequently, GTA models achieve a \emph{2x} increase in end-to-end inference speed, with prefill benefiting from reduced computational cost and decoding benefiting from the smaller cache footprint.
format Preprint
id arxiv_https___arxiv_org_abs_2506_17286
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle GTA: Grouped-head latenT Attention
Sun, Luoyang
Deng, Cheng
Jiang, Jiwen
Wu, Xinjian
Zhang, Haifeng
Chen, Lei
Ni, Lionel
Wang, Jun
Computation and Language
Artificial Intelligence
Attention mechanisms underpin the success of large language models (LLMs), yet their substantial computational and memory overhead poses challenges for optimizing efficiency and performance. A critical bottleneck arises as KV cache and attention computations scale rapidly with text length, challenging deployment on hardware with limited computational and memory resources. We observe that attention mechanisms exhibit substantial redundancy, since the KV cache can be significantly compressed and attention maps across heads display high similarity, revealing that much of the computation and storage is unnecessary. Leveraging these insights, we propose \textbf{G}rouped-Head Laten\textbf{T} \textbf{A}ttention (GTA), a novel attention mechanism that reduces memory usage and computational complexity while maintaining performance. GTA comprises two components: (1) a shared attention map mechanism that reuses attention scores across multiple heads, decreasing the key cache size; and (2) a nonlinear value decoder with learned projections that compresses the value cache into a latent space, further cutting memory needs. GTA cuts attention computation FLOPs by up to \emph{62.5\%} versus Grouped-Query Attention and shrink the KV cache by up to \emph{70\%}, all while avoiding the extra overhead of Multi-Head Latent Attention to improve LLM deployment efficiency. Consequently, GTA models achieve a \emph{2x} increase in end-to-end inference speed, with prefill benefiting from reduced computational cost and decoding benefiting from the smaller cache footprint.
title GTA: Grouped-head latenT Attention
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2506.17286