HATA: Trainable and Hardware-Efficient Hash-Aware Top-k Attention for Scalable Large Model Inference
Ping Gong, Jiawei Yi, Shengnan Wang, Juncheng Zhang, Zewen Jin, Ouxiang Zhou, Ruibo Liu, Guanbin Xu, Youhui Bai, Bowen Ye, Kun Yuan, Tong Yang, Gong Zhang, Renhai Chen, Feng Wu, Cheng Li

TL;DR
HATA introduces a hash-based top-k attention mechanism that significantly accelerates large language model inference by efficiently approximating attention scores, maintaining accuracy while reducing computational costs.
Contribution
HATA presents a novel hash-aware top-k attention method that integrates learning-to-hash techniques to improve efficiency and accuracy in LLM inference.
Findings
Achieves up to 7.2× speedup over full attention.
Outperforms existing top-k attention methods in accuracy and efficiency.
Maintains model accuracy with reduced computational cost.
Abstract
Large Language Models (LLMs) have emerged as a pivotal research area, yet the attention module remains a critical bottleneck in LLM inference, even with techniques like KVCache to mitigate redundant computations. While various top- attention mechanisms have been proposed to accelerate LLM inference by exploiting the inherent sparsity of attention, they often struggled to strike a balance between efficiency and accuracy. In this paper, we introduce HATA (Hash-Aware Top- Attention), a novel approach that systematically integrates low-overhead learning-to-hash techniques into the Top- attention process. Different from the existing top-k attention methods which are devoted to seeking an absolute estimation of qk score, typically with a great cost, HATA maps queries and keys into binary hash codes, and acquires the relative qk score order with a quite low cost, which is sufficient…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Neural Network Applications · Medical Imaging Techniques and Applications · COVID-19 diagnosis using AI
MethodsSoftmax · Attention Is All You Need
