Attentions Under the Microscope: A Comparative Study of Resource Utilization for Variants of Self-Attention
Zhengyu Tian, Anantha Padmanaban Krishna Kumar, Hemant Krishnakumar, Reza Rawassizadeh

TL;DR
This paper benchmarks eight attention mechanisms in training GPT-2, evaluating their resource efficiency and energy consumption, revealing that optimized kernels like Flash Attention are most energy-efficient.
Contribution
It provides a comprehensive empirical comparison of attention variants on resource usage and energy efficiency during GPT-2 training.
Findings
Optimized kernel attention mechanisms are most energy-efficient.
Lower GPU power does not always mean lower energy consumption.
Training time significantly impacts overall energy use.
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…
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
TopicsAdvanced Neural Network Applications · Big Data and Digital Economy · Machine Learning in Materials Science
