Genetic Quantization-Aware Approximation for Non-Linear Operations in Transformers

要約

非線形関数は Transformer とその軽量バージョンで広く使用されており、多額のハードウェア コストが発生し、過小評価されることがよくあります。
これまでの最先端の作品では、これらの演算を区分線形近似によって最適化し、パラメータをルックアップ テーブル (LUT) に保存していましたが、そのほとんどは FP/INT 32 などの使いにくい高精度演算を必要とし、考慮が欠けていました。
整数のみの INT 量子化。
本稿では、量子化を意識してパラメータを自動決定できる遺伝的LUT近似アルゴリズム、すなわちGQA-LUTを提案した。
結果は、GQA-LUT が、バニラ モデルと線形 Transformer モデルの両方で、困難なセマンティック セグメンテーション タスクにおいて無視できる程度の劣化を達成していることを示しています。
さらに、提案された GQA-LUT は、高精度 FP/INT 32 の代替品と比較して、81.3 ~ 81.7% の面積節約と 79.3 ~ 80.2% の電力削減を達成する INT8 ベースの LUT 近似の採用を可能にします。
コードは https://github.com/PingchengDong/GQA-LUT で入手できます。

要約(オリジナル)

Non-linear functions are prevalent in Transformers and their lightweight variants, incurring substantial and frequently underestimated hardware costs. Previous state-of-the-art works optimize these operations by piece-wise linear approximation and store the parameters in look-up tables (LUT), but most of them require unfriendly high-precision arithmetics such as FP/INT 32 and lack consideration of integer-only INT quantization. This paper proposed a genetic LUT-Approximation algorithm namely GQA-LUT that can automatically determine the parameters with quantization awareness. The results demonstrate that GQA-LUT achieves negligible degradation on the challenging semantic segmentation task for both vanilla and linear Transformer models. Besides, proposed GQA-LUT enables the employment of INT8-based LUT-Approximation that achieves an area savings of 81.3~81.7% and a power reduction of 79.3~80.2% compared to the high-precision FP/INT 32 alternatives. Code is available at https:// github.com/PingchengDong/GQA-LUT.

arxiv情報

著者 Pingcheng Dong,Yonghao Tan,Dong Zhang,Tianwei Ni,Xuejiao Liu,Yu Liu,Peng Luo,Luhong Liang,Shih-Yang Liu,Xijie Huang,Huaiyu Zhu,Yun Pan,Fengwei An,Kwang-Ting Cheng
発行日 2024-03-28 17:13:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AR, cs.LG, cs.NE パーマリンク