6.1. Experimental Environment
The proposed approximation algorithms for Softmax and RMSNorm were integrated into the LLaMA2-7B model. They were deployed on the AMD Alveo U55C (Advanced Micro Devices, Inc., Santa Clara, CA, USA) accelerator card to evaluate hardware resource usage, performance, and energy efficiency. To ensure that the proposed approximations do not introduce unacceptable numerical degradation, model accuracy was evaluated on the Wikitext dataset under identical experimental conditions. In addition, a non-functional requirement (NFR) classification dataset for industrial software development scenarios was used to evaluate the proposed methods in a downstream application task.
Software-level simulation of the proposed approximation algorithms was conducted using the PyTorch framework, while heterogeneous inference was executed through the llama.cpp runtime. The heterogeneous computing platform consisted of an AMD Ryzen 9 7950X (Advanced Micro Devices, Inc., Santa Clara, CA, USA) host processor and a AMD Alveo U55C accelerator card, operating under Ubuntu 20.04.3 LTS (Canonical Group Limited, London, UK) The hardware acceleration circuits were implemented with the Vitis HLS 2022.1 (Advanced Micro Devices, Inc., Santa Clara, CA, USA) toolchain, and bitstreams were generated using Vivado 2022.1 (Advanced Micro Devices, Inc., Santa Clara, CA, USA). The generated bitstream was loaded to the U55C accelerator via a PCIe interface. The accelerator provides abundant on-chip resources, including approximately lookup tables (LUTs), 9024 DSP slices, Mbit of BRAM, and 16 GB of high-bandwidth memory (HBM), enabling high-throughput computation for transformer-based model inference.
6.4. Analysis and Comparison
Table 6 reports the perplexity (PPL) of the proposed Softmax and RMSNorm approximation methods under different quantization and deployment settings on the Wikitext dataset. The FP16 configuration serves as the baseline, while the W8A8 setup introduces quantization and operator approximations stepwise to assess their impact on model accuracy.
Under FP16 precision, PyTorch and CPU simulation yield nearly identical PPLs (5.4762 vs. 5.4736), confirming that platform differences do not affect model behavior in the absence of quantization or approximation. Across all configurations, the discrepancy between CPU simulation and FPGA deployment remains below 0.002, confirming that our design precisely reproduces the software model. Based on the CPU results in
Table 6, the total perplexity increase from the FP16 baseline (PPL = 5.4736) to the configuration with both Softmax and RMSNorm approximations (PPL = 5.4973) is 0.0237. Among this increase, W8A8 quantization alone contributes 0.0204 (from 5.4736 to 5.4940), accounting for approximately 86% of the total, while the combined Softmax and RMSNorm approximations contribute the remaining 14%.
To explicitly quantify the impact of individual nonlinear operator approximations under quantization, we conduct an operator-level ablation study on Wikitext-2 under W8A8 group-wise quantization (group size = 32). In this study, Softmax and RMSNorm are approximated independently while keeping all other components unchanged, allowing us to isolate the contribution of each approximation to the overall perplexity degradation.
As shown in
Table 7, both Softmax and RMSNorm approximations introduce only marginal additional perplexity degradation beyond quantization. Among the evaluated components, Softmax exhibits slightly higher sensitivity to approximation, especially when log-domain division is applied, due to the exponential and normalization operations involved. In contrast, RMSNorm with the hybrid LUT-based reciprocal square root introducing only +0.0015. These results confirm that the proposed operator-level approximations are well-balanced.
The hardware comparisons in
Table 8 and
Table 9 are based on resource utilization results reported in the original publications. The FPGA platforms used in the compared works are mainstream Xilinx devices that share a common programmable logic abstraction, including LUT-based logic fabric and DSP slices, enabling meaningful operator-level comparison. To improve fairness, we additionally report the resource utilization ratio (%) on our target device. Although different FPGA devices and toolchains may lead to variations in absolute resource usage, such variations are generally limited and do not affect the overall trends reflected in our results. Given the very low utilization levels of the proposed operators, the impact of cross-platform differences is further reduced, making operator-level qualitative comparison across different FPGA platforms reasonable.
The hardware comparisons in
Table 8 and
Table 9 are based on results reported in prior works. The compared designs are implemented on different FPGA devices that belong to the same generation and fabrication process. Differences among these devices mainly lie in available resource capacity, rather than architectural differences. Additionally, since the proposed Softmax and RMSNorm operators occupy less than 5% of on-chip resources, and all compared designs are implemented using the Vivado toolchain, the impact of placement-and-routing variability is negligible.
Table 8 compares the hardware resource utilization of the proposed Softmax implementation with several representative prior works. Compared with previous designs, the proposed implementation achieves the lowest DSP usage and significantly better LUT efficiency. Specifically, on the Xilinx Alveo U55C platform, the design operates at 300 MHz and consumes only 3112 LUTs and 6215 registers, representing an 83% reduction in LUT utilization compared with [
31], while maintaining comparable register usage to lightweight implementations such as [
32]. Furthermore, by employing a log-domain transformation and a Bi-lut-comp scheme to replace exponential and division operations, the proposed design requires zero DSPs, whereas [
33] rely on up to 128 DSPs for high-precision exponentiation. Although the method uses 10.5 BRAMs for table storage, this overhead remains substantially lower than the 72 KB memory reported in [
34] for floating-point computation. These results demonstrate that the proposed Softmax achieves superior hardware efficiency and is highly suitable for low-power or resource-constrained FPGA deployment scenarios.
Table 8.
Resource utilization comparison of the proposed Softmax implementation with representative prior works.
Table 8.
Resource utilization comparison of the proposed Softmax implementation with representative prior works.
| FPGA Device | Ours | Ref. [31] | Ref. [35] | Ref. [33] | Ref. [19] | Ref. [34] | Ref. [32] |
|---|
| Type | Xilinx Alveo U55C | Xilinx Zynq | Xilinx Kintex-7 KC705 | Xilinx ZCU102 | Xilinx XCVU13P | Xilinx Virtex6 ML605 | Xilinx Zynq-7000 ZC706 |
| Freq. (MHz) | 300 | 150 | 154 | 300 | 200 | 400 | 294 |
| LUT | 3112 (0.239%) | 17,870 | 2229 | 22,865 | 21,190 | 300 | 1858 |
| Registers | 6215 (0.238%) | 16,400 | 224 | 21,770 | 32,623 | 558 | 2086 |
| DSP | 0 (0%) | – | – | 128 | 0 | 5 | 8 |
| BRAM | 10.5 (0.530%) | – | – | 0 | 0 | 72K | – |
Table 9 compares the hardware resource utilization of the proposed RMSNorm implementation with several representative prior works. Our implementation operates at 300 MHz while utilizing only 3954 LUTs and 5810 registers—substantially fewer than the 10k+ LUT designs reported in [
19,
33], and over 95% fewer logic resources compared with [
22]. Moreover, the design consumes only 18 DSPs for reciprocal square root approximation, significantly less than the 74, 129, and 1025 DSPs required in [
19,
22,
33] for floating-point computation, underscoring its hardware-friendly nature. In terms of memory usage, 16 BRAMs are employed for lookup-table storage—slightly higher than some integer-based implementations, yet far below the 27.5 BRAMs required for CORDIC iterations in [
19]. Overall, the proposed RMSNorm achieves high numerical precision with minimal hardware overhead, making it well-suited for efficient FPGA deployment.
To provide a clearer system-level perspective, we analyze the resource utilization and scalability of the proposed Softmax and RMSNorm operators on the AMD Alveo U55C FPGA. As reported in
Table 8 a single Softmax instance consumes only 0.239% of LUTs, 0.238% of registers, 0% of DSPs, and 0.53% of BRAM. Similarly, a single RMSNorm instance occupies 0.303% of LUTs, 0.223% of registers, 0.199% of DSPs, and 0.81% of BRAM as shown in
Table 9. When deployed together as a paired Softmax-RMSNorm pipeline, the combined resource usage remains small, amounting to 0.54% of LUTs, 0.46% of registers, 0.20% of DSPs, and 1.35% of BRAM. Such a low per-instance footprint allows the proposed operators to be replicated many times on a single device. Based on available on-chip resources, up to approximately 192 Softmax instances, 126 RMSNorm instances, or 76 paired Softmax–RMSNorm pipelines could theoretically be instantiated in parallel on U55C. In all cases, BRAM capacity becomes the first limiting resource, while LUT, register, and DSP utilization remains well below saturation. This analysis indicates that the proposed operators are lightweight, highly scalable, and unlikely to form a bottleneck in a full Transformer inference pipeline.
Table 9.
Resource utilization comparison of the proposed RMSNorm implementation with representative prior works.
Table 9.
Resource utilization comparison of the proposed RMSNorm implementation with representative prior works.
| FPGA Device | Ours | Ref. [33] | Ref. [19] | Ref. [22] | Ref. [36] |
|---|
| Type | Xilinx Alveo U55C | Xilinx ZCU102 | Xilinx XCVU13P | Xilinx U280 | Xilinx Alveo U50 |
| Freq. (MHz) | 300 | 300 | 200 | 100 | 100 |
| LUT | 3954 (0.303%) | 10,558 | 10,551 | 86K | 2817 |
| Registers | 5810 (0.223%) | 4038 | 5325 | 25K | 2145 |
| DSP | 18 (0.199%) | 74 | 129 | 1025 | 7 |
| BRAM | 16 (0.810%) | 9 | 27.5 | – | 2 |
The proposed Softmax and RMSNorm operators are integrated into the standard Transformer inference pipeline, where Softmax is applied within the self-attention module and RMSNorm is used both before and after attention along the residual paths. In our implementation, activations are first grouped and quantized to 8-bit precision, after which all Softmax and RMSNorm computations are carried out using the proposed fixed-point approximation modules. Although these operators account for fewer FLOPs than attention matrix multiplications and MLP layers, they are executed for every layer and every token and therefore lie on the critical inference path.
To evaluate the practical performance of the proposed operators, we report the measured execution latency and power consumption of the FPGA implementation under representative workload configurations. Power consumption is estimated using the Vivado Report Power utility on the post-implementation design at 300 MHz. For Softmax with a data size of , the FPGA implementation achieves a latency of 0.292 ms at 300 MHz, with a power consumption of 17.7 W. This corresponds to an effective throughput of 224.4 M elements/s. For RMSNorm with a data size of , the measured latency is 1.837 ms, while consuming 17.6 W. The corresponding throughput is 285.4 M elements/s. These results reflect the operator-level execution cost of the proposed pipelined designs on FPGA and complement the resource and scalability analysis discussed above.