视觉Transformer的低比特整数化:通过操作数重排序实现高效硬件
Low-Bit Integerization of Vision Transformers using Operand Reordering for Efficient Hardware
AI总结:
针对视觉Transformer量化后仍存在的计算开销问题,提出基于操作重排序的整数化流程,延迟反量化至矩阵运算后,在脉动阵列硬件上验证,降低了线性层和矩阵乘法的每PE功耗,实现高效低比特推理。
摘要:
预训练的视觉Transformer在各种视觉任务中取得了显著性能,但代价是高昂的计算和内存开销。虽然模型量化通过降低精度减少了内存使用,但由于矩阵运算前的反量化,这些模型仍然产生显著的计算开销。在本工作中,我们分析了计算图,并提出了一种基于操作重排序的整数化流程。具体而言,该流程将反量化延迟到矩阵运算之后,从而能够直接处理量化输入,实现整数化的矩阵乘法和线性模块。为验证我们的方法,我们在基于脉动阵列的硬件上综合了ViT的自注意力模块。实验结果表明,我们的低比特推理降低了线性层和矩阵乘法中每个处理单元(PE)的功耗,弥合了量化模型与高效推理之间的差距。
英文摘要:
Pre-trained vision transformers have achieved remarkable performance across various visual tasks but suffer from expensive computational and memory costs. While model quantization reduces memory usage by lowering precision, these models still incur significant computational overhead due to the dequantization before matrix operations. In this work, we analyze the computation graph and propose an integerization process based on operation reordering. Specifically, the process delays dequantization until after matrix operations. This enables integerized matrix multiplication and linear module by directly processing the quantized input. To validate our approach, we synthesize the self-attention module of ViT on a systolic array-based hardware. Experimental results show that our low-bit inference reduces per-PE power consumption for linear layer and matrix multiplication, bridging the gap between quantized models and efficient inference.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。