arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.27078cs.LGhep-ex
收藏

LEAF:面向FPGA的查找表感知高效注意力机制

LEAF: LUT-aware Efficient Attention on FPGAs

Imperial College London(帝国理工学院);California Institute of Technology(加州理工学院);University of Bristol(布里斯托尔大学)

Arianna Cox, Chang Sun, Lauri Laatu, Benedikt Maier, Aadeesh Sharma, Leo Rozanov, Wayne Luk, Maria Spiropulu, Alexander Tapper, Zhiqiang Que

AI总结:

LEAF是首款适用于FPGA的纳秒级LUT感知Transformer,通过对注意力模块的常数矩阵-向量乘法查表处理,在喷注标记基准上实现准确率提升1.8个百分点,LUT用量减少2.9倍,最高效版本推理延迟仅35ns。

摘要:

我们提出了面向FPGA的查找表(LUT)感知高效注意力机制(LEAF),它是首款适用于FPGA的纳秒级LUT感知Transformer。部署规模足够大以保证性能、足够小以适配FPGA且速度满足CERN等实时系统所需的亚微秒级时间尺度的Transformer仍存在困难,因为赋予这些模型高表达能力的注意力机制也使其硬件实现成本高昂。LEAF将查询、键、值投影以及最终输出前馈层转换为具备LUT感知训练的FPGA原生层,打造了首款专为超低延迟推理设计的LUT感知Transformer和Linformer层。注意力机制难以适配LUT感知训练,因为它需要对两个激活值进行乘法运算,而该方法需要常数权重以生成查找表;LEAF对注意力模块的常数矩阵-向量乘法进行查表处理,其余部分保留算术形式。在标准喷注标记基准测试中,与相同输入规模下此前最先进的亚微秒级Transformer相比,LEAF的准确率提升了1.8个百分点,同时LUT使用量减少了2.9倍。我们最高效的基于LEAF的Linformer模型,在输入64个粒子时,使用28k个LUT,达到了80.4%的分类准确率,推理延迟为35ns。

英文摘要:

We introduce Lookup-table (LUT)-aware Efficient Attention on FPGAs (LEAF). LEAF is the first nanosecond-scale LUT-aware transformer for FPGAs. Deploying transformers that are large enough to perform well, small enough to fit on an FPGA, and fast enough to meet the sub-microsecond timescales required by real-time systems such as those at CERN remains difficult, since the same attention mechanism that gives these models their high expressivity also makes them costly to implement in hardware. LEAF converts the query, key, and value projections and the final output feed-forward layer into FPGA-native layers with LUT-aware training, creating the first LUT-aware transformer and linformer layers built for ultra-low-latency inference. Attention resists LUT-aware training because it multiplies two activations where the method needs a constant weight to tabulate; LEAF tabulates the attention block's constant matrix-vector multiplications and leaves the rest in arithmetic form. On a standard jet tagging benchmark this improves accuracy by 1.8 percentage points while using 2.9 times fewer LUTs than the previous state-of-the-art sub-microsecond transformer at the same input size. Our most efficient LEAF-based linformer with 64 input particles reaches 80.4% classification accuracy at 28k LUTs and 35ns.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑