舍弃比特:在FPGA上利用Minifloats突破量化边界
Shedding the Bits: Pushing the Boundaries of Quantization with Minifloats on FPGAs
AI总结:
本文提出minifloats低精度浮点格式,并在FPGA上系统比较其与整数表示在3至8位下的精度与硬件成本,证明其对视觉Transformer等负载具有优势。
摘要:
训练后量化(PTQ)是一种强大的模型压缩技术,可在不增加额外训练开销的情况下降低神经网络中的数值精度。近期工作已研究在模型推理的PTQ场景中采用8位浮点格式(FP8)。然而,小于8位的浮点格式及其与整数表示在精度-硬件成本方面的相对比较在FPGA上仍未得到探索。在本工作中,我们提出了minifloats,这是一种降低精度的浮点格式,能够进一步减少模型的内存占用、延迟和能耗,同时接近全精度模型准确率。我们实现了一个基于FPGA的定制乘累加算子库,并探索了广阔的设计空间,在3到8位范围内对权重和激活值比较了minifloat与整数表示。我们还考察了各种基于整数的量化技术对minifloats的适用性。实验表明,minifloats为视觉Transformer等新兴工作负载提供了一种有前景的替代方案。
英文摘要:
Post-training quantization (PTQ) is a powerful technique for model compression, reducing the numerical precision in neural networks without additional training overhead. Recent works have investigated adopting 8-bit floating-point formats(FP8) in the context of PTQ for model inference. However, floating-point formats smaller than 8 bits and their relative comparison in terms of accuracy-hardware cost with integers remains unexplored on FPGAs. In this work, we present minifloats, which are reduced-precision floating-point formats capable of further reducing the memory footprint, latency, and energy cost of a model while approaching full-precision model accuracy. We implement a custom FPGA-based multiply-accumulate operator library and explore the vast design space, comparing minifloat and integer representations across 3 to 8 bits for both weights and activations. We also examine the applicability of various integerbased quantization techniques to minifloats. Our experiments show that minifloats offer a promising alternative for emerging workloads such as vision transformers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。