AttentionEngine: A Versatile Framework for Efficient Attention Mechanisms on Diverse Hardware Platforms
Not on the map. Why?
Abstract (arXiv)
Transformers and large language models (LLMs) have revolutionized machine learning, with attention mechanisms at the core of their success. As the landscape of attention variants expands, so too do the challenges of optimizing their performance, particularly across different hardware platforms. Current optimization strategies are often narrowly focused, requiring extensive manual intervention to accommodate changes in model configurations or hardware environments. In this paper, we introduce AttentionEngine, a comprehensive framework designed to streamline the optimization of attention mechanisms across heterogeneous hardware backends. By decomposing attention computation into modular operations with customizable components, AttentionEngine enables flexible adaptation to diverse algorithmic requirements. The framework further automates kernel optimization through a combination of programmable templates and a robust cross-platform scheduling strategy. Empirical results reveal performance gains of up to 10x on configurations beyond the reach of existing methods. AttentionEngine offers a scalable, efficient foundation for developing and deploying attention mechanisms with minimal manual tuning. Our code has been open-sourced and is available at https://github.com/microsoft/AttentionEngine.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 13 of its 25 references that are in the map. First posted on arXiv 21 Feb 2025.
Builds on
13 of 25 references.
References · 13
- 2017Attention Is All You Needcited by 60,361
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
- 2020Ansor: Generating High-Performance Tensor Programs for Deep Learningcited by 201
- 2024Flex Attention: A Programming Model for Generating Optimized Attention Kernelscited by 185
1 more
- 2024SeerAttention: Learning Intrinsic Sparse Attention in Your LLMscited by 124
Built on by
Citing papers per year: 2025: 3; 2026: 1.
4 papers.
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025PLM: Efficient Peripheral Language Models Hardware-Co-Designed for Ubiquitous Computingcited by 4
- 2026CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernelscited by 2
- 2025Why Attention Fails: A Taxonomy of Faults in Attention-Based Neural Networkscited by 1
- 2026CuBridge: An LLM-Based Framework for Understanding and Reconstructing High-Performance Attention Kernels6 May 2026
- 2025Why Attention Fails: A Taxonomy of Faults in Attention-Based Neural Networks6 Aug 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025PLM: Efficient Peripheral Language Models Hardware-Co-Designed for Ubiquitous Computing15 Mar 2025