FBQuant:用于大型语言模型的反馈量化
FBQuant: FeedBack Quantization for Large Language Models
AI总结:
针对边缘设备部署LLM的内存带宽瓶颈,提出受负反馈机制启发的FBQuant量化方法,通过子分支与高效CUDA内核减少误差和延迟,在3比特Llama2-7B上零样本准确率提升1.2%。
摘要:
在边缘设备上部署大型语言模型(LLMs)日益重要,因为它消除了对网络连接的依赖,减少了昂贵的API调用,并增强了用户隐私。然而,由于边缘设备的计算资源有限,设备端部署具有挑战性。特别是,主要瓶颈源于与权重加载相关的内存带宽限制。仅权重量化有效减少了内存访问,但常常导致显著的精度下降。最近引入子分支的努力在减轻量化误差方面显示出潜力,但这些方法要么缺乏稳健的优化策略,要么依赖于次优的目标。为了解决这些不足,我们提出了反馈量化(FBQuant),一种受自动控制中负反馈机制启发的新方法。FBQuant本质上确保重建的权重保持在量化过程所界定的范围内,从而降低过拟合的风险。为了进一步抵消子分支引入的额外延迟,我们开发了一个高效的CUDA内核,将额外推理时间减少了60%。全面的实验证明了FBQuant在各种LLMs上的效率和有效性。值得注意的是,对于3比特的Llama2-7B,FBQuant将零样本准确率提高了1.2%。
英文摘要:
Deploying Large Language Models (LLMs) on edge devices is increasingly important, as it eliminates reliance on network connections, reduces expensive API calls, and enhances user privacy. However, on-device deployment is challenging due to the limited computational resources of edge devices. In particular, the key bottleneck stems from memory bandwidth constraints related to weight loading. Weight-only quantization effectively reduces memory access, yet often induces significant accuracy degradation. Recent efforts to incorporate sub-branches have shown promise for mitigating quantization errors, but these methods either lack robust optimization strategies or rely on suboptimal objectives. To address these gaps, we propose FeedBack Quantization (FBQuant), a novel approach inspired by negative feedback mechanisms in automatic control. FBQuant inherently ensures that the reconstructed weights remain bounded by the quantization process, thereby reducing the risk of overfitting. To further offset the additional latency introduced by sub-branches, we develop an efficient CUDA kernel that decreases 60% of extra inference time. Comprehensive experiments demonstrate the efficiency and effectiveness of FBQuant across various LLMs. Notably, for 3-bit Llama2-7B, FBQuant improves zero-shot accuracy by 1.2%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。