arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.00547cs.ARcs.LGcs.OScs.PF
收藏

BitLLM:移动GPU上高效的低位、隐藏转换的大语言模型解码

BitLLM: Efficient Low-Bit, Conversion-Hiding LLM Decoding on Mobile GPUs

University of Georgia(佐治亚大学);Western Digital Research(西部数据研究院);University of Arizona(亚利桑那大学)

Hangyu Zheng, Zhihao Shu, Kunxiong Zhu, Minghai Qin, Xiaolong Ma, Gagan Agrawal, Wei Niu

AI总结:

提出BitLLM移动推理引擎,通过KV缓存优化与整数原生流水线解决低位量化LLM在移动GPU上的性能瓶颈,较现有引擎获1.47-1.78倍加速,长上下文生成能耗降88.9%。

摘要:

大语言模型(LLM)的快速扩展已在各领域展现出卓越能力,但将其部署在移动设备上仍具挑战,因计算与内存需求极高。低位量化(如4位权重、8位激活)可减小模型规模并保留精度,但其在移动GPU上的实际效能迄今有限。本文发现性能差距主要源于量化值与浮点值间的频繁数据类型转换,以及自回归解码期间键值(KV)缓存增长导致的动态低效内存访问模式。我们提出BitLLM,一款移动推理引擎,用于解决量化LLM中的类型转换开销与次优内存访问问题。该方法包含KV缓存的自适应布局与打包策略,确保LLM解码全程高效内存访问;搭配整数原生执行流水线,将类型转换推迟并重叠到计算热路径之外,使关键的矩阵乘法(MatMul)阶段保持在整数域。在现成移动GPU上实现的BitLLM,在各类模型与量化级别上,较领先引擎(this http URL、MNN-LLM、LiteRT-LM、MLC-LLM)分别实现1.78×、1.73×、1.58×、1.47×的平均加速;在长上下文生成下,每令牌平均能耗降低达88.9%。

英文摘要:

The rapid scaling of large language models (LLMs) has unlocked remarkable capabilities across various domains. However, deploying LLMs on mobile devices remains challenging because of their high computational and memory requirements. Low-bit quantization (e.g., 4-bit weights, 8-bit activations) can reduce model size while preserving accuracy, but its practical efficacy on mobile GPUs has been limited so far. In this paper, we identify that the performance gap stems primarily from frequent data type conversions between quantized and floating-point values, and dynamic and inefficient memory access patterns caused by the growing Key-Value (KV) cache during autoregressive decoding. We introduce BitLLM, a mobile inference engine that addresses type conversion overhead and suboptimal memory accesses in quantized LLMs. Our approach features an adaptive layout and packing strategy for the KV cache that ensures efficient memory access throughout LLM decoding. This is coupled with an integer-native execution pipeline that defers and overlaps type conversion outside the compute hot path, keeping the critical MatMul stages in the integer domain. Implemented on off-the-shelf mobile GPUs, BitLLM outperforms leading engines, i.e., LLAMA.CPP, MNN-LLM, LiteRT-LM, and MLC-LLM, achieving average speedups of 1.78$\times$, 1.73$\times$, 1.58$\times$, and 1.47$\times$, respectively, across various models and quantization levels. Under long-context generation, BitLLM reduces average energy consumption (per token) by up to 88.9%.

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

↑