arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2507.12205cs.DC
收藏

通过块提取和压缩存储实现稀疏LLM中的高效SpMV

Toward Efficient SpMV in Sparse LLMs via Block Extraction and Compressed Storage

Junqing Lin, Jingwei Sun, Mingge Lu, Guangzhong Sun

AI总结:

针对稀疏LLM本地部署中SpMV性能瓶颈,提出GPU优化的EC-SpMV方法,通过分层块提取算法和增量索引压缩格式EC-CSR加速推理,实现最高6.44倍加速并减少55.4%存储开销。

摘要:

稀疏矩阵-向量乘法(SpMV)已成为稀疏大型语言模型(LLM)本地部署中关键的性能瓶颈,其推理主要在解码器阶段以批大小为1的工作负载上运行。现有最初为科学计算设计的SpMV内核和稀疏矩阵格式,无法利用稀疏LLM固有的独特结构模式,导致性能次优和过高的存储开销。本文提出了EC-SpMV,一种用于加速稀疏LLM推理的GPU优化SpMV方法。EC-SpMV引入了(1)一种分层块提取算法,能够捕获稀疏LLM内多种粒度的块结构,以及(2)一种新颖的压缩稀疏格式(EC-CSR),采用增量索引来减少存储开销并提高内存访问效率。在来自LLaMA和OPT模型的真实稀疏权重矩阵上进行评估,EC-SpMV实现了高达6.44倍于最先进SpMV库的加速,并且与CSR相比,存储开销最多减少了55.4%。

英文摘要:

Sparse Matrix-Vector Multiplication (SpMV) has become a critical performance bottleneck in the local deployment of sparse Large Language Models (LLMs), where inference predominantly operates on workloads during the decoder phase with a batch size of one. Existing SpMV kernels and sparse matrix formats, originally designed for scientific computing, fail to exploit the unique structure patterns inherent in sparse LLMs, resulting in suboptimal performance and excessive storage overhead. This paper presents EC-SpMV, a GPU-optimized SpMV approach for accelerating sparse LLM inference. EC-SpMV introduces (1) a hierarchical block extraction algorithm that captures multiple granularities of block structures within sparse LLMs, and (2) a novel compressed sparse format (EC-CSR) that employs delta indexing to reduce storage overhead and enhance memory access efficiency. Evaluated on real sparse weight matrices from LLaMA and OPT models, EC-SpMV achieves up to 6.44x speedup over state-of-the-art SpMV libraries and reduces storage overhead by up to 55.4% compared to CSR.

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

↑