Contextual sparsity is one of the approaches used to reduce computational complexity in the inference process of large language models (LLMs). Existing techniques for efficient LLM inference acceleration based on contextual sparsity with minimal accuracy degradation require training sparse pattern predictors. This paper presents a framework for accelerating inference of ReGLU-based feed-forward networks (FFNs) within LLMs. The proposed framework provides a fast, training-free method for building sparse pattern predictors using truncation-aware singular value decomposition (SVD) of the gate projection matrix, along with a threshold calibration algorithm, and inference executors supporting conditional computation on CUDA and CANN devices. Experiments on three sparse LLMs with an average activation sparsity level of 90% in the FFNs demonstrate up to a 1.8x reduction in end-to-end decoding time while maintaining less than 1% degradation in benchmark scores on tasks involving complex math and code generation. This work advances the deployment of LLMs on edge devices.


翻译:上下文稀疏性是降低大型语言模型(LLM)推理过程计算复杂度的方法之一。现有基于上下文稀疏性且能保持精度损失最小的高效LLM推理加速技术,需要训练稀疏模式预测器。本文提出了一种用于加速LLM中基于ReGLU的前馈网络(FFN)推理的框架。该框架提供了一种快速、无需训练的方法来构建稀疏模式预测器,该方法利用门投影矩阵的截断感知奇异值分解(SVD)以及阈值校准算法,并支持在CUDA和CANN设备上进行条件计算的推理执行器。在三个稀疏LLM上的实验表明,其FFN平均激活稀疏度达到90%,在涉及复杂数学和代码生成的任务上,端到端解码时间最多减少1.8倍,同时基准测试分数下降小于1%。这项工作推动了LLM在边缘设备上的部署。

0
下载
关闭预览

相关内容

【博士论文】利用图结构加速稀疏计算
专知会员服务
18+阅读 · 2025年3月6日
【ICLR2025】大型语言模型的动态低秩稀疏适应
专知会员服务
14+阅读 · 2025年2月21日
稀疏大模型简述:从MoE、Sparse Attention到GLaM
夕小瑶的卖萌屋
14+阅读 · 2022年3月22日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
稀疏性的3个优势 -《稀疏统计学习及其应用》
遇见数学
15+阅读 · 2018年10月24日
基于LSTM深层神经网络的时间序列预测
论智
22+阅读 · 2018年9月4日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月5日
VIP会员
最新内容
最新“指挥控制”领域出版物合集(简介)
专知会员服务
1+阅读 · 今天15:19
面向军事作战需求开发的人工智能(RAIMOND)
专知会员服务
3+阅读 · 今天15:13
软件定义多域战术网络:基础与未来方向(综述)
水下战战术决策中的气象与海洋预报(50页报告)
远程空中优势:新一代超视距导弹的兴起
专知会员服务
1+阅读 · 今天14:45
大语言模型溯因推理的统一分类学与综述
专知会员服务
0+阅读 · 今天12:07
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员