Deploying large language models (LLMs) on end-user devices is gaining importance due to benefits in responsiveness, privacy, and operational cost. Yet the limited memory and compute capability of mobile and desktop GPUs make efficient execution difficult. Recent observations suggest that the internal activations of LLMs are often dynamically sparse, meaning that for each input, only part of the network contributes significantly to the output. Such sparsity could reduce computation, but it interacts poorly with group-wise quantization, which remains the dominant approach for fitting LLMs onto resource-constrained hardware. To reconcile these two properties, this study proposes a set of techniques that realize dynamic sparse inference under low-bit quantization. The method features: (1) a zigzag-patterned quantization layout that organizes weights in a way consistent with activation sparsity and improves GPU memory locality; (2) a specialized GEMV kernel designed for this layout to fully utilize parallel compute units; and (3) a compact runtime mechanism that gathers sparse indices with minimal overhead. Across several model scales and hardware configurations, the approach achieves up to 1.55x faster decoding throughput while maintaining accuracy comparable to dense quantized inference, showing that structured sparsity and quantization can effectively coexist on commodity GPUs.


翻译:由于在响应速度、隐私保护和运行成本方面的优势,在终端用户设备上部署大语言模型(LLMs)正变得日益重要。然而,移动和桌面GPU有限的内存和计算能力使得高效执行变得困难。近期观察表明,LLMs的内部激活通常具有动态稀疏性,即对于每个输入,仅部分网络对输出有显著贡献。这种稀疏性可减少计算量,但其与分组量化(当前在资源受限硬件上部署LLMs的主流方法)的兼容性较差。为协调这两种特性,本研究提出一套在低比特量化下实现动态稀疏推理的技术。该方法包括:(1)一种锯齿状量化布局,以符合激活稀疏性的方式组织权重并提升GPU内存局部性;(2)针对该布局设计的专用GEMV内核,以充分利用并行计算单元;(3)一种紧凑的运行时机制,能以最小开销收集稀疏索引。在多种模型规模和硬件配置下的实验表明,该方法在保持与密集量化推理相当的精度同时,解码吞吐量最高提升1.55倍,证明结构化稀疏性与量化可在商用GPU上有效共存。

0
下载
关闭预览

相关内容

论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
VIP会员
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员