arXiv:2411.11745cs.LGcs.AR2024-11被引 38

用混合数据类型量化低精度大模型,显著提升部署效率。

BitMoD: Bit-serial Mixture-of-Datatype LLM Acceleration

  • 按组动态选择不同数据类型量化权重,支持4位甚至3位精度。
  • 4位量化时误差低于0.5%,3位量化生成效果优于现有方法。
  • 硬件支持多精度位串行处理,加速比达1.69倍以上。

大型语言模型(LLMs)在多种机器学习任务中表现卓越,但其庞大的内存占用严重制约了实际部署。本文提出BitMoD,一种算法-硬件协同设计的低精度加速方案,实现高效的大模型压缩与推理。算法层面,引入细粒度数据类型自适应机制,对每组(如128个)权重采用不同的数值数据类型进行量化。通过精心设计的新数据类型,可在保持高精度的前提下将权重降至4比特甚至3比特。硬件层面,采用位串行处理单元,支持多种精度与数据类型;创新包括统一表示以降低硬件开销,以及位串行反量化单元,实现低开销的分组累加重缩放。在六种代表性大模型上的评估表明,对于判别任务,BitMoD可实现4比特量化且平均精度损失小于0.5%;对于生成任务,3比特量化仍优于现有方案。结合优越的模型性能与高效加速器设计,相比ANT和OliVe等先进加速器,平均提速1.69倍和1.48倍。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated remarkable performance across various machine learning tasks. Yet the substantial memory footprint of LLMs significantly hinders their deployment. In this paper, we improve the accessibility of LLMs through BitMoD, an algorithm-hardware co-design solution that enables efficient LLM acceleration at low weight precision. On the algorithm side, BitMoD introduces fine-grained data type adaptation that uses a different numerical data type to quantize a group of (e.g., 128) weights. Through the careful design of these new data types, BitMoD is able to quantize LLM weights to very low precision (e.g., 4 bits and 3 bits) while maintaining high accuracy. On the hardware side, BitMoD employs a bit-serial processing element to easily support multiple numerical precisions and data types; our hardware design includes two key innovations: First, it employs a unified representation to process different weight data types, thus reducing the hardware cost. Second, it adopts a bit-serial dequantization unit to rescale the per-group partial sum with minimal hardware overhead. Our evaluation on six representative LLMs demonstrates that BitMoD significantly outperforms state-of-the-art LLM quantization and acceleration methods. For discriminative tasks, BitMoD can quantize LLM weights to 4-bit with $<\!0.5\%$ accuracy loss on average. For generative tasks, BitMoD is able to quantize LLM weights to 3-bit while achieving better perplexity than prior LLM quantization scheme. Combining the superior model performance with an efficient accelerator design, BitMoD achieves an average of $1.69\times$ and $1.48\times$ speedups compared to prior LLM accelerators ANT and OliVe, respectively.

大模型压缩量化硬件协同低精度推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。