FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisionFlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision
问题:注意力是长上下文模型的核心瓶颈;FlashAttention 系列已减少显存读写,但在 Hopper 上仍未吃满 Tensor Core、TMA 与 FP8 的硬件能力。
证据位置:摘要指出 FlashAttention-2 在 H100 上只有 35% 利用率;FlashAttention-3 用 warp-specialization、块级 matmul/softmax 交叠与 FP8 块量化,把 FP16 推到最高 740 TFLOPs/s(75% 利用率),FP8 接近 1.2 PFLOPs/s,速度提升 1.5–2.0 倍,且 FP8 数值误差比基线低 2.6 倍。
作者自陈局限:优化针对 Hopper(H100)与特定 kernel;不是所有 GPU 架构都能获得同样收益;测的是注意力算子,不是端到端模型吞吐;FP8 精度收益依赖具体模型与任务。
它没主张的:不是所有注意力实现都需要重写;不是 FP8 在所有模型上都无损;不是 75% 利用率等于端到端推理快 2 倍。Problem: attention is the core bottleneck for long-context models; FlashAttention reduced memory traffic but still left Hopper Tensor Cores, TMA and FP8 underused.
Where the evidence sits: the abstract notes FlashAttention-2 reaches only 35% utilization on H100; FlashAttention-3 uses warp specialization, interleaved block-wise matmul/softmax and FP8 block quantization to reach up to 740 TFLOPs/s in FP16 (75% utilization) and close to 1.2 PFLOPs/s in FP8, with a 1.5–2.0× speedup and 2.6× lower FP8 numerical error than a baseline.
What the authors say about limits: the optimisation targets Hopper (H100) and specific kernels; other GPU architectures do not automatically get the same gain; it measures the attention operator, not end-to-end model throughput; FP8 accuracy depends on model and task.
What it does not claim: not that every attention implementation must be rewritten; not that FP8 is lossless for every model; not that 75% utilization means 2× end-to-end inference.
关键参数Key specs
- 证据位置 / evidence
- 摘要
- 硬件 / hardware
- NVIDIA H100(Hopper)
- FP16 速度 / FP16
- 最高 740 TFLOPs/s,75% 利用率
- FP8 速度 / FP8
- 接近 1.2 PFLOPs/s
- 复现状态 / reproduction
- 未复现(只读摘要)
官方原文怎么说What the source says
FlashAttention-2 achieving only 35% utilization on the H100 GPU
achieves speedup on H100 GPUs by 1.5-2.0× with FP16 reaching up to 740 TFLOPs/s (75% utilization)
with FP8 reaching close to 1.2 PFLOPs/s
资料与许可Source and licence
- 资料时间Source checked
- 2026-11-20
- 许可 / 类型Licence / kind
- arxiv-preprint
- 许可说明Licence evidence
- https://arxiv.org/abs/2407.08608
- 类目Category
- 效率Efficiency
论文里的数字怎么读How to read the numbers
先分清测什么、怎么算、和谁比、有没有数据污染。拿不准就回原文看实验设置。Before citing a score, separate what it measures, how it is scored, what it compares against and whether contamination is controlled. If unsure, go back to the experiment setup in the paper. 看评测基准See benchmark cards · 看数据集卡See dataset cards
同类目还有More in this category
- AWQ: Activation-aware Weight Quantization for LLM Compression and AccelerationAWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration
- The Era of 1-bit LLMs: All Large Language Models are in 1.58 BitsThe Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessFlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness