SQ-format: 一种统一的稀疏量化硬件友好数据格式用于大语言模型
SQ-format: A Unified Sparse-Quantized Hardware-friendly Data Format for LLMs
AI总结:
本文提出SQ-format,一种统一的稀疏量化数据格式,旨在提升大语言模型在精度与效率之间的平衡,通过硬件友好设计实现性能与吞吐量的帕累托改进。
摘要:
后训练量化(PTQ)在大语言模型(LLMs)的普及中起着至关重要的作用。然而,现有的低比特量化和稀疏化技术由于硬件支持有限,难以在精度和效率之间取得平衡。例如,W4A8只能达到与W8A8相同的峰值TOPS,而受GPU支持的稀疏数据格式(2:4半结构稀疏)由于精度损失而很少被采用。为弥合这一差距,本文提出了稀疏量化格式(SQ-format),这是一种可能由新硬件和现有GPU支持的统一量化和稀疏化数据格式。SQ-format利用了稀疏矩阵在高精度下的加速特性,并相应地加速低精度矩阵乘法。因此,SQ-format被提出以在性能和吞吐量之间实现帕累托改进。这种格式特别适用于具有异常值不等状态的激活,并使其静态压缩成为可能。我们展示了使用SQ-format的最先进PTQ性能,提出了支持它的硬件需求,并进一步提供了为下一代AI加速器设计探索和见解。
英文摘要:
Post-training quantization (PTQ) plays a crucial role in the democratization of large language models (LLMs). However, existing low-bit quantization and sparsification techniques are difficult to balance accuracy and efficiency due to the limited hardware support. For example, W4A8 can only achieve the same peak TOPS as W8A8 whereas the GPU-supported sparse data format (2:4 semi-structure sparse) is seldomly adopted due to the loss of accuracy. To bridge this gap, in this paper, we propose the Sparse-Quantized Format (SQ-format), which is a unified data format for quantization and sparsification potentially easily supported by new hardware and existing GPUs. SQ-format makes use of the fact that sparse matrix can be accelerated in high-precision, and low-precision matrix multiplication can also be accelerated accordingly. As such, SQ-format is proposed to achieve Pareto improvement between performance and throughput. This format is particularly suitable for activations with outlier inequality status and makes their static compression possible. We show the state-of-the-art PTQ performance with SQ-format, propose the hardware required to support it, and further offer the design exploration and insights for the next-generation AI accelerators.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。