arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2307.15517cs.AR
收藏

面向高效LLM推理的自定义微缩放格式数据流编译器

A Dataflow Compiler for Efficient LLM Inference using Custom Microscaling Formats

Jianyi Cheng, Cheng Zhang, Zhewen Yu, Christos-Savvas Bouganis, George A. Constantinides, Yiren Zhao

AI总结:

提出编译器MASE,利用微缩放格式在数据流硬件上实现平均4比特精度的LLM推理,精度提升24%,能耗开销仅3%。

摘要:

模型量化将参数(权重)和中间值(激活值)以更紧凑的格式表示,从而直接降低硬件中的计算和内存成本。与卷积神经网络等其他模型相比,近期大型语言模型(LLM)的量化在实现具有竞争力的内存密度方面面临挑战,因为LLM中的数值需要更大的动态范围。\n\n当前硬件可以使用紧凑的数值格式(如低比特整数或浮点数)来加速LLM计算。每种格式各有优势:整数运算简化了电路设计,而浮点计算在需要更宽动态范围时可以提高精度。在这项工作中,我们寻求一种结合两者优势的高效数据格式:微缩放(MX)格式。MX格式是一种高效的数据格式,既能实现大动态范围,又能实现高内存密度。\n\n在本文中,我们提出了一种名为MASE的编译器,用于在数据流硬件加速器上探索用于LLM推理的混合精度MX格式。我们的主要贡献有两方面。首先,我们提出了一种新颖的编排抽象,以探索结合新数据格式的软件和硬件优化。其次,MASE实现了平均精度为4比特的LLM推理,且精度下降最小甚至无下降。据我们所知,MASE是首个在LLM硬件加速器设计中利用细粒度多精度MX格式的工作。在一系列LLM和数据集上,与使用8位定点数的设计相比,MASE在Δ精度上平均提高了24%,而能量效率仅增加了3%的开销。

英文摘要:

Model quantization represents both parameters (weights) and intermediate values (activations) in a more compact format, thereby directly reducing both computational and memory cost in hardware. The quantization of recent large language models (LLMs) faces challenges to achieve competitive memory density compared to other models such as convolutional neural networks, since values in LLMs require larger dynamic ranges. Current hardware can expedite computation for LLMs using compact numerical formats such as low-bitwidth integers or floating-point numbers. Each has advantages: integer operations simplify circuit design, whereas floating-point calculations can enhance accuracy when a wider dynamic range is required. In this work, we seek an efficient data format that combines the best of both worlds: Microscaling (MX) formats. MX formats are efficient data formats that achieve both large dynamic ranges and high memory density. In this paper, we propose a compiler named MASE for exploring mixed-precision MX formats on dataflow hardware accelerators for LLM inference. Our main contributions are twofold. First, we propose a novel orchestration abstraction to explore both software and hardware optimizations with new data formats. Second, MASE achieves LLM inference at an average precision of 4-bits, with minimal to no accuracy degradation. To our knowledge, MASE represents the first effort to harness fine-grain multi-precision MX formats in the design of LLM hardware accelerators. Over a range of LLMs and datasets, MASE achieves an average improvement of 24% in $Δ$ accuracy with an overhead of only 3% in energy efficiency compared to designs using 8-bit fixed-point numbers.

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

↑