Weighted Grouped Query Attention in Transformers
Sai Sena Chinnakonduru, Astarag Mohapatra

TL;DR
This paper introduces Weighted Grouped-Query Attention (WGQA), a novel variation of GQA that uses learnable weights for key and value heads, improving performance with minimal inference overhead in transformer models.
Contribution
The paper proposes WGQA, which incorporates learnable weights into GQA, enhancing performance during finetuning without increasing inference costs.
Findings
WGQA achieves 0.53% improvement over GQA.
Performance converges to traditional MHA with no extra inference overhead.
Scaling laws are demonstrated across T5-small and T5-base architectures.
Abstract
The attention mechanism forms the foundational blocks for transformer language models. Recent approaches show that scaling the model achieves human-level performance. However, with increasing demands for scaling and constraints on hardware memory, the inference costs of these models remain high. To reduce the inference time, Multi-Query Attention (MQA) and Grouped-Query Attention (GQA) were proposed in (Shazeer, 2019) and (Ainslieet al., 2023) respectively. In this paper, we propose a variation of Grouped-Query Attention, termed Weighted Grouped-Query Attention (WGQA). We introduced new learnable parameters for each key and value head in the T5 decoder attention blocks, enabling the model to take a weighted average during finetuning. Our model achieves an average of 0.53% improvement over GQA, and the performance converges to traditional Multi-head attention (MHA) with no additional…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNeural Networks and Applications
MethodsGated Linear Unit · Refunds@Expedia|||How do I get a full refund from Expedia? · Attention Is All You Need · Byte Pair Encoding · Dropout · SentencePiece · Dense Connections · Softmax · Residual Connection · Feedforward Network
