arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.11041cs.LGcs.AI
收藏

仅整数量化变换器用于嵌入式FPGA上的AIoT时间序列预测

Integer-only Quantized Transformers for Embedded FPGA-based Time-series Forecasting in AIoT

Department of Intelligent Embedded Systems, University of Duisburg-Essen(智能嵌入式系统系,杜伊斯堡-埃森大学)

Tianheng Ling, Chao Qian, Gregor Schiele

AI总结:

本文提出了一种针对AIoT设备时间序列预测优化的硬件加速器,通过整数量化和量化感知训练实现6位和4位量化变换器模型,验证了在嵌入式物联网设备上部署变换器模型的可行性。

摘要:

本文提出了一个针对AIoT系统中设备端时间序列预测优化的硬件加速器设计。该设计集成了仅整数量化和量化感知训练,并通过优化的硬件设计实现了6位和4位量化变换器模型,其精度与相关研究中的8位量化模型相当。利用在嵌入式FPGA(Xilinx Spartan-7 XC7S15)上的完整实现,我们分析了在设备端推理中可实现的精度、资源利用率、时序、功率和能耗。我们的结果表明,尽管可以实现足够的性能,但优化过程并不简单。例如,减少量化位宽并不总能导致延迟或能耗的降低,这凸显了系统探索各种优化组合的必要性。与相关研究中的8位量化变换器模型相比,我们的4位量化变换器模型测试损失仅增加0.63%,运行速度提高132.�3x,能耗降低48.19x。相关源代码可在附带的GitHub仓库中提供:https://github.com/tianheng-ling/TinyTransformer4TS。

英文摘要:

This paper presents the design of a hardware accelerator for Transformers, optimized for on-device time-series forecasting in AIoT systems. It integrates integer-only quantization and Quantization-Aware Training with optimized hardware designs to realize 6-bit and 4-bit quantized Transformer models, which achieved precision comparable to 8-bit quantized models from related research. Utilizing a complete implementation on an embedded FPGA (Xilinx Spartan-7 XC7S15), we examine the feasibility of deploying Transformer models on embedded IoT devices. This includes a thorough analysis of achievable precision, resource utilization, timing, power, and energy consumption for on-device inference. Our results indicate that while sufficient performance can be attained, the optimization process is not trivial. For instance, reducing the quantization bitwidth does not consistently result in decreased latency or energy consumption, underscoring the necessity of systematically exploring various optimization combinations. Compared to an 8-bit quantized Transformer model in related studies, our 4-bit quantized Transformer model increases test loss by only 0.63%, operates up to 132.33x faster, and consumes 48.19x less energy. Relevant source code is provided in the accompanying GitHub repository: https://github.com/tianheng-ling/TinyTransformer4TS.

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

↑