F3: An FPGA-Based Transformer Fine-Tuning Accelerator With Flexible Floating Point Format
- 31 March 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Journal on Emerging and Selected Topics in Circuits and Systems
- Vol. 15 (2) , 258-271
Abstract
Transformers have demonstrated remarkable success across various deep learning tasks. However, their inference and fine-tuning require substantial computation and memory resources, posing challenges for existing hardware platforms, particularly resource-constrained edge devices. To address these limitations, we propose F3, an FPGA-based accelerator for transformer fine-tuning. To reduce computation and memory overhead, this paper proposes a flexible floating point (FFP) format which consumes fewer resources than traditional floating-point formats of the same bitwidth. We adapt low-rank adaptation to FFP format and propose a fine-tuning strategy named LR-FFP which reduces the number of trainable parameters without compromising fine-tuning accuracy. At the hardware level, we design specialized processing elements (PEs) for the FFP format. The PE maximizes the utilization of DSP resources, enabling a single DSP to perform two multiply-accumulate operations per cycle. The PEs are organized into a systolic array (SA) to efficiently handle general matrix multiplication during fine-tuning. Through theoretical analysis and experimental evaluation, we determine the optimal dataflow and SA parameters to balance performance and resource consumption. We implement the architecture on the Xilinx VCU128 FPGA platform and F3 achieves a performance of 8.2 TFlops at 250 MHz. Compared with CPU and GPU implementations, F3 achieves speedups of 15.22× and 3.44×, respectively, and energy efficiency improvements of 70.52× and 9.44×.Keywords
Funding Information
- Hefei Science of China Microelectronics Innovation Center
This publication has 21 references indexed in Scilit:
- Optimizing FPGA-Based DNN Accelerator With Shared Exponential Floating-Point FormatIEEE Transactions on Circuits and Systems I: Regular Papers, 2023
- TransCODE: Co-Design of Transformers and Accelerators for Efficient Training and InferenceIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2023
- FitNN: A Low-Resource FPGA-Based CNN Accelerator for DronesIEEE Internet of Things Journal, 2022
- ETA: An Efficient Training Accelerator for DNNs Based on Hardware-Algorithm Co-OptimizationIEEE Transactions on Neural Networks and Learning Systems, 2022
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows2021
- End-to-End Object Detection with Transformers2020
- Layer-Specific Optimization for Mixed Data Flow With Mixed Precision in FPGA Design for CNN-Based Object DetectorsIEEE Transactions on Circuits and Systems for Video Technology, 2020
- HybridDNN: A Framework for High-Performance Hybrid DNN Accelerator Design and Implementation2020
- Double MAC on a DSP: Boosting the Performance of Convolutional Neural Networks on FPGAsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2018
- A High Throughput Acceleration for Hybrid Neural Networks With Efficient Resource Management on FPGAIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2018