vix.ing · top · new · best · stats

Attentions Under the Microscope: A Comparative Study of Resource Utilization for Variants of Self-Attention

2025/07/09 by Zhengyu Tian, Z. Ryan Tian, Tian, Zhengyu +6 · 2 citations
Computer Science · Materials Science · #Advanced Neural Network Applications #Benchmark (surveying) #Benchmarking #Big Data and Digital Economy #Bottleneck #Efficient energy use #Kernel (algebra) #Key (lock) #Machine Learning in Materials Science #Resource (disambiguation) #Salient #cs.AI #cs.LG #cs.NE

paper · pdf · doi:10.48550/arxiv.2507.07247

published in arXiv (Cornell University) (Cornell University)

openalex publication_date 2025/07/09 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/05

Abstract

As large language models (LLMs) and visual language models (VLMs) grow in scale and application, attention mechanisms have become a central computational bottleneck due to their high memory and time complexity. While many efficient attention variants have been proposed, there remains a lack of rigorous evaluation on their actual energy usage and hardware resource demands during training. In this work, we benchmark eight attention mechanisms in training GPT-2 architecture, measuring key metrics including training time, GPU memory usage, FLOPS, CPU usage, and power consumption. Our results reveal that attention mechanisms with optimized kernel implementations, including Flash Attention, Locality-Sensitive Hashing (LSH) Attention, and Multi-Head Latent Attention (MLA), achieve the best energy efficiency. We further show that lower GPU power alone does not guarantee reduced energy use, as training time plays an equally important role. Our study highlights the importance of energy-aware benchmarking in attention design and provides a practical insight for selecting resource-efficient mechanisms. All our codes are available at GitHub.

Citations

Cited by

Related