Lune

ICLR2025顶会

SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration

Jintao Zhang, Jia Wei, Pengle Zhang, Jun Zhu, Jianfei Chen

摘要

The transformer architecture predominates across various models. As the heart of the transformer, attention has a computational complexity of O(N 2 ), compared to O(N ) for linear transformations. When handling large sequence lengths, attention becomes the primary time-consuming component. Although quantization has proven to be an effective method for accelerating model inference, existing quantization methods primarily focus on optimizing the linear layer. In response, we first analyze the feasibility of quantization in attention detailedly. Following that, we propose SageAttention, a highly efficient and accurate quantization method for attention. The OPS (operations per second) of our approach outperforms FlashAttention2 and xformers by about 2.1x and 2.7x, respectively. SageAttention also achieves superior accuracy performance over FlashAt-tention3. Comprehensive experiments confirm that our approach incurs almost no end-to-end metrics loss across diverse models-including those for large language processing, image generation, and video generation. The code is available at https://github.com/thu-ml/SageAttention .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 70 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • WorldPlay: Towards Long-Term Geometric Consistency for Real-Time Interactive World Modeling 引用了 Frame Context Packing and Drift Prevention in Next-Frame-Prediction Video Diffusion Models
  • WorldPlay: Towards Long-Term Geometric Consistency for Real-Time Interactive World Modeling 引用了 Autoregressive Adversarial Post-Training for Real-Time Interactive Video Generation
  • SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Training 引用了 Measuring Massive Multitask Language Understanding
  • SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Training 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Training 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Training 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Frame Context Packing and Drift Prevention in Next-Frame-Prediction Video Diffusion Models 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mixture of Contexts for Long Video Generation 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mixture of Contexts for Long Video Generation 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper70

  1. Frame Context Packing and Drift Prevention in Next-Frame-Prediction Video Diffusion ModelsLvmin Zhang, Shengqu Cai, Muyang Li, Gordon Wetzstein 等NeurIPS 2025 · 132 次引用
  2. WorldPlay: Towards Long-Term Geometric Consistency for Real-Time Interactive World ModelingWenqiang Sun, Haiyu Zhang, Haoyuan Wang, Junta Wu 等ICML 2026 · 108 次引用
  3. Mixture of Contexts for Long Video GenerationShengqu Cai, Ceyuan Yang, Lvmin Zhang, Yuwei Guo 等ICLR 2026 · 92 次引用
  4. Autoregressive Adversarial Post-Training for Real-Time Interactive Video GenerationShanchuan Lin, Ceyuan Yang, Hao He, Jianwen Jiang 等NeurIPS 2025 · 89 次引用
  5. SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit TrainingJintao Zhang, Jia Wei, Haoxu Wang, Pengle Zhang 等NeurIPS 2025 · 81 次引用

它引用的 Paper41

  1. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
  2. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
  3. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  4. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
  5. The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution GeneralizationDan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath 等ICCV 2021 · 2,294 次引用

相关 Paper

  1. SageAttention2: Efficient Attention with Thorough Outlier Smoothing and Per-thread INT4 QuantizationJintao Zhang, Haofeng Huang, Pengle Zhang, Jia Wei 等ICML 2025
  2. SpargeAttention: Accurate and Training-free Sparse Attention Accelerating Any Model InferenceJintao Zhang, Chendong Xiang, Haofeng Huang, Jia Wei 等ICML 2025
  3. ELFATT: Efficient Linear Fast Attention for Vision TransformersChong Wu, Maolin Che, Renjie Xu, Zhuoheng Ran 等ACM MM 2025 · 3 次引用
  4. Fast Attention Over Long Sequences With Dynamic Sparse Flash AttentionMatteo Pagliardini, Daniele Paliotta, Martin Jaggi, François FleuretNeurIPS 2023 · 26 次引用
  5. MonarchAttention: Zero-Shot Conversion to Fast, Hardware-Aware Structured AttentionCan Yaras, Alec S. Xu, Pierre Abillama, Changwoo Lee 等NeurIPS 2025 · 5 次引用
黄昏的海面,两侧是细线勾勒的悬崖