Sparse Matrix-Vector Multiplication (SpMV) is a fundamental operation in the inference of sparse Large Language Models (LLMs). Because existing SpMV methods perform poorly under the low and unstructured sparsity (30-90%) commonly observed in pruned LLMs, unstructured pruning provided only limited memory reduction and speedup. We propose MACKO-SpMV, a GPU-optimized format and kernel co-designed to reduce storage overhead while preserving compatibility with the GPU's execution model. This enables efficient SpMV for unstructured sparsity without specialized hardware units (e.g., tensor cores) or format-specific precomputation. Empirical results show that at sparsity 50%, MACKO is the first approach with significant 1.5x memory reduction and 1.2-1.5x speedup over dense representation. Speedups over other SpMV baselines: 2.8-13.0x over cuSPARSE, 1.9-2.6x over Sputnik, and 2.2-2.5x over DASP. Applied to Llama2-7B pruned with Wanda to sparsity 50%, it delivers 1.5x memory reduction and 1.5x faster inference at fp16 precision. Thanks to MACKO, unstructured pruning at 50% sparsity is now justified in real-world LLM workloads.


翻译:稀疏矩阵-向量乘法(SpMV)是稀疏大语言模型(LLM)推理中的核心运算。由于现有SpMV方法在剪枝后LLM常见的低且非结构化稀疏度(30-90%)下表现不佳,非结构化剪枝仅能实现有限的内存缩减与加速。本文提出MACKO-SpMV,一种协同设计的GPU优化存储格式与计算内核,旨在降低存储开销的同时保持与GPU执行模型的兼容性。该方法无需专用硬件单元(如张量核心)或格式特定的预计算,即可实现非结构化稀疏度下的高效SpMV。实验结果表明,在50%稀疏度下,MACKO首次实现了相较于稠密表示显著的内存缩减(1.5倍)与加速(1.2-1.5倍)。相比其他SpMV基线方法:相对cuSPARSE加速2.8-13.0倍,相对Sputnik加速1.9-2.6倍,相对DASP加速2.2-2.5倍。在采用Wanda剪枝至50%稀疏度的Llama2-7B模型上应用时,该方法在fp16精度下实现了1.5倍内存缩减与1.5倍推理加速。得益于MACKO,50%稀疏度的非结构化剪枝在实际LLM工作负载中现已具备应用价值。

0
下载
关闭预览

相关内容

UnHiPPO:面向不确定性的状态空间模型初始化方法
专知会员服务
11+阅读 · 2025年6月6日
WWW 2024 | GraphTranslator: 将图模型对齐大语言模型
专知会员服务
27+阅读 · 2024年3月25日
【ICML2022】Sharp-MAML:锐度感知的模型无关元学习
专知会员服务
17+阅读 · 2022年6月10日
NeurIPS 2021 | ConE: 针对知识图谱多跳推理的锥嵌入模型
专知会员服务
26+阅读 · 2021年12月5日
专知会员服务
25+阅读 · 2021年7月31日
专知会员服务
34+阅读 · 2021年6月24日
专知会员服务
23+阅读 · 2021年6月22日
专知会员服务
50+阅读 · 2021年6月2日
【WWW2021】知识图谱逻辑查询的自监督双曲面表示
专知会员服务
30+阅读 · 2021年4月9日
【CVPR2021】CausalVAE: 引入因果结构的解耦表示学习
专知会员服务
37+阅读 · 2021年3月28日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
【ICML2021】因果匹配领域泛化
专知
12+阅读 · 2021年8月12日
图节点嵌入(Node Embeddings)概述,9页pdf
专知
15+阅读 · 2020年8月22日
【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
PCA的基本数学原理
算法与数学之美
11+阅读 · 2017年8月8日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
18+阅读 · 2024年12月27日
A Survey of Large Language Models
Arxiv
499+阅读 · 2023年3月31日
Generalized Out-of-Distribution Detection: A Survey
Arxiv
15+阅读 · 2021年10月21日
Deep Face Recognition: A Survey
Arxiv
18+阅读 · 2019年2月12日
Arxiv
21+阅读 · 2018年5月23日
VIP会员
相关VIP内容
UnHiPPO:面向不确定性的状态空间模型初始化方法
专知会员服务
11+阅读 · 2025年6月6日
WWW 2024 | GraphTranslator: 将图模型对齐大语言模型
专知会员服务
27+阅读 · 2024年3月25日
【ICML2022】Sharp-MAML:锐度感知的模型无关元学习
专知会员服务
17+阅读 · 2022年6月10日
NeurIPS 2021 | ConE: 针对知识图谱多跳推理的锥嵌入模型
专知会员服务
26+阅读 · 2021年12月5日
专知会员服务
25+阅读 · 2021年7月31日
专知会员服务
34+阅读 · 2021年6月24日
专知会员服务
23+阅读 · 2021年6月22日
专知会员服务
50+阅读 · 2021年6月2日
【WWW2021】知识图谱逻辑查询的自监督双曲面表示
专知会员服务
30+阅读 · 2021年4月9日
【CVPR2021】CausalVAE: 引入因果结构的解耦表示学习
专知会员服务
37+阅读 · 2021年3月28日
相关资讯
相关论文
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员