Large language models (LLMs) have demonstrated remarkable performance across a wide range of language processing tasks. However, this success comes at the cost of substantial computation and memory requirements, which significantly impedes their deployment in resource-constrained environments. To address this challenge, this work introduces an automation framework that leverages weight pruning and low-bit quantization, and presents a hardware-software co-design method that generates accelerators on the Field-Programmable Gate Array (FPGA) platform. In particular, we implement a unified pipeline that applies N:M structured pruning and 4-bit integer quantization to reduce the memory footprint, followed by optimized dequantization and matrix multiplication to enhance LLM inference on several hardware platforms, including CPUs, NVIDIA GPUs with Dense and 2:4 Sparse Tensor Cores, and a custom systolic-array-based FPGA accelerator. Utilizing 2:4 sparsity combined with quantization on $4096 \times 4096$ matrices, our approach achieves a reduction of up to $4\times$ in weight storage and a $1.71\times$ speedup in matrix multiplication, yielding a $1.29\times$ end-to-end latency reduction compared to dense GPU baselines. Scaling analysis on the LLaMA-7B model further shows that structured sparsity enhances the throughput per token by $1.36\times$. These results demonstrate the synergy of fine-grained N:M sparsity and quantization for enabling efficient and deployable LLM inference, while the proposed FPGA accelerator offers a flexible architectural path for supporting a broader class of sparsity patterns beyond the fixed 2:4 hardware constraints.


翻译:大语言模型(LLM)在广泛的语言处理任务中展现出卓越的性能。然而,这一成功是以巨大的计算和内存需求为代价的,这严重阻碍了其在资源受限环境中的部署。为应对这一挑战,本文引入了一个利用权重剪枝和低位量化的自动化框架,并提出了一种在可编程门阵列(FPGA)平台上生成加速器的软硬件协同设计方法。具体而言,我们实现了一个统一的处理流程:首先应用N:M结构化剪枝和4位整数量化以减少内存占用,随后通过优化的反量化和矩阵乘法操作,在多种硬件平台上(包括CPU、配备密集和2:4稀疏张量核心的NVIDIA GPU,以及一个基于定制脉动阵列的FPGA加速器)提升LLM推理效率。通过在$4096 \times 4096$矩阵上结合使用2:4稀疏性与量化,我们的方法实现了高达$4\times$的权重存储减少和$1.71\times$的矩阵乘法加速,与密集GPU基线相比,端到端延迟降低了$1.29\times$。在LLaMA-7B模型上的扩展分析进一步表明,结构化稀疏性将每令牌吞吐量提升了$1.36\times$。这些结果证明了细粒度N:M稀疏性与量化在实现高效、可部署的LLM推理方面的协同效应,同时所提出的FPGA加速器为支持超越固定2:4硬件限制的更广泛稀疏模式提供了一条灵活的架构路径。

0
下载
关闭预览

相关内容

大语言模型与小语言模型协同机制综述
专知会员服务
39+阅读 · 2025年5月15日
数据与多模态大型语言模型的协同作用综述
专知会员服务
59+阅读 · 2024年7月13日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
超全总结:神经网络加速之量化模型 | 附带代码
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
非对称优势:美海军开发低成本反无人机技术
专知会员服务
4+阅读 · 今天4:39
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
5+阅读 · 今天2:48
《军事模拟:将军事条令与目标融入AI智能体》
专知会员服务
8+阅读 · 今天2:43
【NTU博士论文】3D人体动作生成
专知会员服务
6+阅读 · 4月24日
以色列军事技术对美国军力发展的持续性赋能
专知会员服务
8+阅读 · 4月24日
《深度强化学习在兵棋推演中的应用》40页报告
专知会员服务
13+阅读 · 4月24日
《多域作战面临复杂现实》
专知会员服务
9+阅读 · 4月24日
《印度的多域作战:条令与能力发展》报告
专知会员服务
4+阅读 · 4月24日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员