FlatAttention:面向基于Tile的加速器的大规模注意力模型推理中数据流与织物收集组的协同优化
FlatAttention: Dataflow and Fabric Collectives Co-Optimization for Large Attention-Based Model Inference on Tile-Based Accelerators
AI总结:
本文提出FlatAttention,通过利用芯片级网络织物中的集体原语减少高带宽内存访问,提升利用率达92.3%,在Tile-based加速器上实现4.1倍速度提升和16倍降低HBM流量。
摘要:
注意力在混合专家(MoE)模型推理中占总计算量的日益增长比例,使其高效加速变得至关重要。新兴的领域专用加速器正朝着芯片级和晶圆级的Tile-based架构发展。Tiles包含大型矩阵和向量引擎,并通过芯片内互连连接,支持Tile到Tile的流量以减少Tile到主内存的瓶颈。因此,数据流管理对实现高利用至关重要。我们提出FlatAttention,一种适用于现代注意力变体的Tile-based加速器的数据流。FlatAttention通过利用芯片级网络织物中的集体原语,减少昂贵的高带宽内存(HBM)访问,实现高达92.3%的利用,比FlashAttention-3快4.1倍,HBM流量低16倍。在32x32 Tile配置下,性能与NVIDIA GH200相当,FlatAttention适用于多种注意力变体,实现计算密集型注意力的平均86%利用和内存密集型的78% HBM带宽利用,平均比GH200上的注意力实现快1.9倍。最后,我们在晶圆级多芯片系统上评估了FlatAttention的端到端DeepSeek-v3 FP8解码,尽管系统峰值性能比最先进的解决方案低1.5倍,但实现了1.9倍的系统吞吐量提升和1.4倍的用户令牌输出延迟降低。
英文摘要:
Attention accounts for an increasingly dominant fraction of total computation during inference for mixture-of-experts (MoE) models, making efficient acceleration critical. Emerging domain-specific accelerators for large model inference are shifting toward chip-scale and wafer-scale tile-based architectures. Tiles contain large matrix and vector engines and are connected through on-chip interconnects, which support tile-to-tile traffic to reduce the tile-to-main-memory traffic bottleneck. Hence, dataflow management is crucial to achieve high utilization. We propose FlatAttention, a dataflow for modern attention variants on tile-based accelerators. FlatAttention minimizes expensive high-bandwidth memory (HBM) accesses by exploiting collective primitives integrated into the on-chip network fabric, achieving up to 92.3% utilization, 4.1x speedup over FlashAttention-3, and 16x lower HBM traffic. On a 32x32 tile configuration with peak performance comparable to NVIDIA GH200, FlatAttention generalizes across multiple attention variants, achieving an average of 86% utilization for compute-bound attentions and 78% HBM bandwidth utilization for memory-bound ones, resulting in an average 1.9x speedup over attention implementations on GH200. Finally, we evaluate end-to-end DeepSeek-v3 FP8 decoding with FlatAttention on a wafer-scale multi-die system, achieving a 1.9x improvement in system throughput and a 1.4x reduction in per-user token output latency, despite operating with 1.5x lower peak system performance compared to the state-of-the-art solution.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。