Low-Cost FlashAttention with Fused Exponential and Multiplication Hardware Operators

Kosmas Alexandridis, Vasileios Titopoulos, Giorgos Dimitrakopoulos
5/20/2025
cs.ARcs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

Attention mechanisms, particularly within Transformer architectures and large language models (LLMs), have revolutionized sequence modeling in machine learning and artificial intelligence applications. To compute attention for increasingly long sequences, specialized accelerators have been proposed to execute key attention steps directly in hardware.

Show full abstract

Among the various recently proposed architectures, those based on variants of the FlashAttention algorithm, originally designed for GPUs, stand out due to their optimized computation, tiling capabilities, and reduced memory traffic. In this work, we focus on optimizing the kernel of floating-point-based FlashAttention using new hardware operators that fuse the computation of exponentials and vector multiplications, e.g., e^x, V. The proposed ExpMul hardware operators significantly reduce the area and power costs of FlashAttention-based hardware accelerators. When implemented in a 28nm ASIC technology, they achieve improvements of 28.8% in area and 17.6% in power, on average, compared to state-of-the-art hardware architectures with separate exponentials and vector multiplications hardware operators.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{alexandridis2025lowcost,
  title  = {Low-Cost FlashAttention with Fused Exponential and Multiplication Hardware Operators},
  author = {Kosmas Alexandridis and Vasileios Titopoulos and Giorgos Dimitrakopoulos},
  year   = {2025},
  eprint = {2505.14314},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.14314v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.14314.svg)](https://codeofpaper.com/paper/2505.14314)

Discussion