NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Flexible Template for Edge Generative AI With High-Accuracy Accelerated Softmax and GELU

Andrea Belano, Yvan Tortorella, Angelo Garofalo, Luca Benini, Davide Rossi, Francesco ContiIEEE J. Emerg. Sel. Topics Circuits Syst 2025

Introduction

The rise of Generative AI, driven by Transformer architectures, has created a significant demand for efficient execution on edge devices. While traditional hardware accelerators focus on optimizing Matrix Multiplications (MatMuls), a new bottleneck has emerged: non-linear operations such as Softmax and GELU. As MatMul units scale, these operations can consume nearly half of the total execution time, as illustrated in Figure 1.

Runtime breakdown showing how Softmax and GELU become bottlenecks as MatMul units grow.

Existing solutions often force models into low-precision integer formats (like INT8) to save power, but this typically requires expensive retraining and can degrade accuracy. The researchers behind SoftEx sought a way to maintain the high-precision BFloat16 (BF16) format used during training while achieving edge-level efficiency.

The SoftEx Architecture

To address this "non-linearity bottleneck," researchers developed SoftEx, a specialized hardware accelerator integrated into a heterogeneous compute cluster. The cluster template combines eight general-purpose RISC-V cores with a systolic array for MatMuls (RedMulE) and the SoftEx engine.

The architecture of the enhanced PULP cluster featuring SoftEx and the Tensor Processing Engine.

SoftEx is a parametric Hardware Processing Engine (HWPE) featuring 16 parallel lanes. It utilizes a novel algorithm, expp, for approximate exponentiation. By adding a polynomial correction to the classic Schraudolph method, expp achieves a mean relative error of just 0.14%, a 13× improvement over baseline approximations. This high accuracy allows the system to maintain BF16 precision without the need for aggressive quantization or model retraining.

Key architectural innovations include:

  • GELU Reformulation: Instead of complex hyperbolic tangents, GELU is computed as a sum of exponentials, leveraging the efficient expp unit.
  • Online Normalization: Softmax is implemented using a single-pass scheme that calculates the maximum value and denominator simultaneously, significantly reducing memory bandwidth requirements.
  • Hybrid Precision: Interestingly, the authors found they could perform internal accumulation for GELU using 14-bit fixed-point math without hurting final network accuracy, simplifying the hardware.

Results and Scalability

SoftEx is remarkably compact, occupying only 3.22% of the total cluster area (0.039 $mm^2$ in 12nm technology). Evaluations on benchmarks like SQuAD v2, ImageNet1k, and WikiText-2 demonstrate significant performance gains:

  • Speedups: SoftEx accelerates Softmax by 10.8× and GELU by 5.11× compared to optimized software on eight RISC-V cores.
  • Energy Efficiency: Energy consumption is reduced by up to 26.8× for Softmax and 5.29× for GELU.
  • System Performance: On a full Vision Transformer (ViT) workload, the cluster achieved a 1.58× increase in throughput (310 GOPS) and a 1.42× improvement in energy efficiency (1.34 TOPS/W).

The system also shows strong scalability. When modeled in a large 8x8 mesh for massive models like GPT-2 XL, the architecture reached a total throughput of 18.2 TOPS, though network-on-chip conflicts can introduce overheads of up to 17.4% in such large configurations.

Conclusion

SoftEx demonstrates that targeted hardware acceleration for non-linear functions is a highly cost-effective strategy for edge AI. By maintaining high numerical accuracy in BF16, it enables the deployment of pre-trained Transformer models on low-power devices with minimal overhead, paving the way for more capable generative AI at the edge.

Summary updated

BibTeX
@article{belano2025flexible,
  author = {Andrea Belano and Yvan Tortorella and Angelo Garofalo and Luca Benini and Davide Rossi and Francesco Conti},
  title = {{A Flexible Template for Edge Generative AI With High-Accuracy Accelerated Softmax and GELU}},
  journal = {IEEE J. Emerg. Sel. Topics Circuits Syst.},
  year = {2025},
  doi = {10.1109/jetcas.2025.3562734},
}
Figure