[Paper Review] Hardware Acceleration of Fully Quantized BERT for Efficient Natural Language Processing
This paper proposes a fully quantized BERT (FQ-BERT) model and a custom FPGA accelerator for efficient inference on edge devices. By quantizing all model components—including weights, activations, scale factors, softmax, and layer normalization—to 4/8-bit integers, FQ-BERT achieves 7.94× model compression with minimal accuracy loss. The accelerator delivers 3.18 fps/W energy efficiency on ZCU111 FPGA, outperforming CPU and GPU by 28.91× and 12.72× in performance-per-watt.
BERT is the most recent Transformer-based model that achieves state-of-the-art performance in various NLP tasks. In this paper, we investigate the hardware acceleration of BERT on FPGA for edge computing. To tackle the issue of huge computational complexity and memory footprint, we propose to fully quantize the BERT (FQ-BERT), including weights, activations, softmax, layer normalization, and all the intermediate results. Experiments demonstrate that the FQ-BERT can achieve 7.94x compression for weights with negligible performance loss. We then propose an accelerator tailored for the FQ-BERT and evaluate on Xilinx ZCU102 and ZCU111 FPGA. It can achieve a performance-per-watt of 3.18 fps/W, which is 28.91x and 12.72x over Intel(R) Core(TM) i7-8700 CPU and NVIDIA K80 GPU, respectively.
Motivation & Objective
- To enable efficient BERT inference on resource-constrained edge devices such as FPGAs.
- To reduce model size and computational complexity through full quantization of all parameters and intermediate results.
- To design a hardware-aware accelerator that supports mixed-precision integer operations for 8/4-bit and 8/8-bit computations at runtime.
- To achieve high energy efficiency and performance-per-watt on FPGA platforms compared to CPU and GPU.
- To evaluate the trade-off between quantization precision, model compression, and accuracy on standard NLP benchmarks.
Proposed method
- Proposes symmetric linear quantization for weights and activations using scaling factors derived from EMA of activation statistics.
- Introduces a unified quantization scheme for biases, scale factors, softmax, and layer normalization using fixed-point representations.
- Employs a bit-level reconfigurable multiplier in the accelerator to support 8/4-bit and 8/8-bit multiplications dynamically at runtime.
- Designs a dot-product-based processing element (PE) architecture with task-level scheduling to overlap off-chip memory transfers with computation.
- Uses High-Level Synthesis (Vivado HLS) to implement the accelerator on Xilinx ZCU102 and ZCU111 MPSoC platforms.
- Applies a two-stage quantization training pipeline: pre-train on full-precision BERT, then fine-tune with quantization functions to preserve accuracy.

Experimental results
Research questions
- RQ1Can full quantization of all BERT components (weights, activations, scale factors, softmax, layer normalization) achieve high model compression with minimal accuracy degradation?
- RQ2How does the performance-per-watt of an FPGA-based accelerator for FQ-BERT compare to CPU and GPU on standard NLP workloads?
- RQ3What is the impact of quantizing different components (e.g., softmax, layer normalization) on overall model accuracy?
- RQ4Can task-level scheduling and partial weight loading effectively overlap memory access with computation on FPGA?
- RQ5What is the scalability of the accelerator when increasing the number of PEs and multipliers?
Key findings
- FQ-BERT achieves a 7.94× model compression ratio with only 0.81% accuracy drop on the SST-2 dataset and 3.08% drop on MNLI.
- Quantizing softmax and layer normalization improves accuracy from 91.28% to 91.86% in ablation studies, indicating potential benefits beyond just weights and activations.
- The FPGA accelerator on ZCU111 achieves 3.18 fps/W energy efficiency, which is 28.91× higher than Intel i7-8700 CPU and 12.72× higher than NVIDIA K80 GPU.
- Latency on ZCU111 is 23.79 ms for a single sequence, with 13.2W power consumption, significantly outperforming CPU (145.06 ms, 65W) and GPU (27.84 ms, 143W).
- Doubling the number of multipliers in the BIM unit on ZCU111 reduces latency from 23.79 ms to 12.03 ms, demonstrating strong scalability.
- The accelerator uses 679 BRAM18K and 3287 DSP48E slices on ZCU111 with 16 PEs and 16 multipliers, showing efficient resource utilization for high-throughput inference.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.