SLA2: 基于可学习路由和量化感知训练的稀疏-线性注意力
SLA2: Sparse-Linear Attention with Learnable Routing and Quantization-aware Training
AI总结:
SLA2通过可学习路由和量化感知训练,提升稀疏-线性注意力的效率和性能
摘要:
稀疏-线性注意力(SLA)结合了稀疏和线性注意力,以加速扩散模型,并在视频生成中表现出色。然而,(i)SLA依赖于一种启发式分割,根据注意力权重的大小将计算分配到稀疏或线性分支,这可能效果不佳。此外,(ii)在正式分析SLA的注意力误差后,我们发现SLA与稀疏和线性注意力的直接分解之间存在不匹配。我们提出了SLA2,引入了(I)一个可学习的路由器,动态选择每个注意力计算是否使用稀疏或线性注意力;(II)一种更忠实且直接的稀疏-线性注意力公式,使用可学习的比例来结合稀疏和线性注意力分支;以及(III)稀疏+低比特注意力设计,其中通过量化感知微调引入低比特注意力以减少量化误差。实验表明,在视频扩散模型中,SLA2可以实现97%的注意力稀疏度,并在保持生成质量的同时提供18.6倍的注意力加速。
英文摘要:
Sparse-Linear Attention (SLA) combines sparse and linear attention to accelerate diffusion models and has shown strong performance in video generation. However, (i) SLA relies on a heuristic split that assigns computations to the sparse or linear branch based on attention-weight magnitude, which can be suboptimal. Additionally, (ii) after formally analyzing the attention error in SLA, we identify a mismatch between SLA and a direct decomposition into sparse and linear attention. We propose SLA2, which introduces (I) a learnable router that dynamically selects whether each attention computation should use sparse or linear attention, (II) a more faithful and direct sparse-linear attention formulation that uses a learnable ratio to combine the sparse and linear attention branches, and (III) a sparse + low-bit attention design, where low-bit attention is introduced via quantization-aware fine-tuning to reduce quantization error. Experiments show that on video diffusion models, SLA2 can achieve 97% attention sparsity and deliver an 18.6x attention speedup while preserving generation quality.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。