SparseAccelerate:面向中端GPU的高效长上下文推理
SparseAccelerate: Efficient Long-Context Inference for Mid-Range GPUs
AI总结:
针对长上下文下注意力计算成本高、中端硬件部署难的问题,提出动态稀疏注意力方法SparseAccelerate,可自适应调整稀疏模式,在中端GPU上实现长上下文高效推理,降低时延并节省内存。
摘要:
随着大语言模型(LLM)的上下文窗口不断扩展,传统注意力机制的计算成本随输入长度呈二次增长,这给实时部署和内存受限场景带来了严峻挑战。现有稀疏注意力技术虽试图降低这一复杂度,但往往会产生显著开销或损失精度,在中端硬件上处理长上下文时实用性不足。本文提出SparseAccelerate,这是一种动态稀疏注意力方法,可根据输入特征自适应调整稀疏模式,有效拉平注意力复杂度曲线。该方法在输入长度为16K tokens时即可生效,在双NVIDIA A5000 GPU(单卡24GB显存)上可高效扩展至128K tokens。实验结果表明,在32K tokens场景下,SparseAccelerate的首token生成时延(TTFT)最高降低1.04倍,同时大幅节省内存。这些改进为内存密集型应用和长上下文任务带来了实际收益,而这类任务此前采用标准注意力无法实现。除降低时延外,SparseAccelerate从根本上改变了扩展趋势,在同类方法中,其TTFT随上下文长度增长的梯度最小。目前正在多个基准上开展的评估验证了其可扩展性,表明SparseAccelerate是推动在普惠硬件上实现高效、实时、大上下文LLM推理的重要进展。
英文摘要:
As Large Language Models (LLMs) scale to longer context windows, the computational cost of attention mechanisms, which traditionally grows quadratically with input length, presents a critical challenge for real-time and memory-constrained deployments. Existing sparse attention techniques have sought to reduce this complexity, but they often incur significant overhead or compromise accuracy, making them less practical for large contexts on mid-range hardware. In this paper, we introduce SparseAccelerate, a dynamic sparse attention method that adapts its sparsity patterns based on input characteristics, effectively flattening the attention complexity curve. Our approach is effective for input lengths starting at 16K tokens and scales efficiently up to 128K tokens on dual NVIDIA A5000 GPUs (24GB each). Experimental results show that SparseAccelerate achieves up to a 1.04x reduction in Time-To-First-Token (TTFT) latency at 32K tokens, while also providing substantial memory savings. These improvements yield practical gains for memory-intensive applications and long-context tasks that were previously infeasible with standard attention. Beyond latency reductions, SparseAccelerate fundamentally shifts the scaling trend, demonstrating the smallest TTFT growth gradient relative to context length among competing methods. Ongoing evaluations on diverse benchmarks confirm its scalability, positioning SparseAccelerate as a critical advancement toward efficient, real-time, and large-context LLM inference on accessible hardware.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。