SPARTA:面向长上下文边缘推理的稀疏三元大语言模型加速器,具备自适应注意力与统一数据通路
SPARTA: A Sparse Ternary LLM Accelerator with Adaptive Attention and Unified Datapath for Long-Context Edge Inference
AI总结:
本文提出SPARTA加速器,通过感知阶段的稀疏数据流、统一计算架构与自适应两阶段注意力引擎,解决边缘LLM长上下文推理的KV缓存瓶颈,相比多款平台实现显著的吞吐量与能效提升。
摘要:
边缘设备上的大语言模型(LLM)受限于有限的内存与带宽。尽管1.58位三元权重大幅降低了模型存储,但长上下文推理日益受到KV缓存流量与注意力机制的瓶颈制约。现有加速器还为三元线性层和注意力机制使用独立的数据通路,导致硬件与执行开销。本文提出SPARTA,一种用于高效长上下文边缘推理的稀疏三元大语言模型加速器。SPARTA集成了:(1)一种感知阶段的稀疏数据流,利用计算受限的预填充阶段与内存受限的解码阶段之间的异构稀疏性;(2)一种统一计算架构,将三元稀疏矩阵乘法(SpMM)/稀疏向量乘法(SpMV)与比特串行注意力映射到共享处理单元,以利用零权重与零比特稀疏性;(3)一种自适应两阶段注意力引擎,结合页级Top-k选择以减少K缓存访问,以及令牌级Top-p剪枝以减少V缓存流量。SPARTA相比全注意力将KV流量降低4.1-4.8倍,相比最先进的稀疏注意力方案降低1.3-1.5倍,且存在与任务相关的质量损失。与NVIDIA Jetson AGX Orin相比,SPARTA平均实现3.9倍更高的生成吞吐量和8.3倍更高的端到端能效;与AMD Ryzen 7 9700X相比,增益为5.0倍和81.7倍。它相比FIGLUT、TeLLMe和MCBP还实现1.6-12.0倍更高的吞吐量、2.0-4.2倍更高的能效以及1.3-51.4倍更高的面积效率。
英文摘要:
LLMs on edge devices are constrained by limited memory and bandwidth. Although 1.58-bit ternary weights greatly reduce model storage, long-context inference is increasingly bottlenecked by KV-cache traffic and attention. Existing accelerators also use separate datapaths for ternary linear layers and attention, incurring hardware and execution overhead. We present SPARTA, a sparse ternary LLM accelerator for efficient long-context edge inference. SPARTA integrates: (1) a phase-aware sparse dataflow exploiting heterogeneous sparsity across compute-bound prefill and memory-bound decode; (2) a unified compute fabric mapping ternary SpMM/SpMV and bit-serial attention onto shared processing elements to exploit zero-weight and zero-bit sparsity; and (3) an adaptive two-stage attention engine combining page-level Top-k selection to reduce K-cache accesses with token-level Top-p pruning to reduce V-cache traffic. SPARTA reduces KV traffic by 4.1-4.8x over full attention and 1.3-1.5x over a state-of-the-art sparse-attention scheme, with task-dependent quality loss. Compared with NVIDIA Jetson AGX Orin, SPARTA achieves 3.9x higher generation throughput and 8.3x higher end-to-end energy efficiency on average; versus AMD Ryzen 7 9700X, the gains are 5.0x and 81.7x. It also delivers 1.6-12.0x higher throughput, 2.0-4.2x higher energy efficiency, and 1.3-51.4x higher area efficiency than FIGLUT, TeLLMe, and MCBP.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。