Back to search

Nanyang Technological University

MSE-Softmax: a zero-DSP FP8 accelerator for efficient transformer inference

Abstract

dc:description.abstract

In the core inference chain of Large Language Models (LLM), long-context attention computation is a key module determining the model’s understanding and generation capabilities. However, in the computation of self-attention mechanisms, the computational cost and clock cycles required for softmax normalization make it a heavy burden for LLM training or inference. As the input context length 𝐿 increases, the size of the attention matrix also grows quadratically with L, while the exponential and normalization operations in the softmax function need to be performed element-wise, directly causing the computational cost to increase quadratically with the context length. Furthermore, the global reduction operation results in a linear relationship between the number of computation cycles and the number of input tokens. This computational explosion and the gap between hardware computing power and storage resources are even more pronounced on resource-constrained hardware. Our algorithmic approach employs a multi-scale exponential fitting technique based on coordinate descent. By optimizing for sparse coefficients specifically within the FP8 (E4M3) format, we approximate the exponential function using a sparse polynomial (𝑤1 · 2𝑥 + 𝑤2 · 22𝑥 + . . . ). This method replaces complex mathematical multipliers with simple shift operations. Architecturally, we exploit the bit-level isomorphism between FP8 and Mitchell logarithmic approximation to design a “zero DSP” arithmetic core. This converts floating-point multiplication and division into low-cost integer addition and subtraction. We also integrate an optimized online normalization scheme to ensure efficient safe-softmax computation. Implementation on the Xilinx ZYNQ XC7Z020 shows that MSE-Softmax eliminates the need for DSP48E1 resources entirely and cuts LUT consumption by 62% compared to traditional MBS designs, all while keeping Top-1 accuracy loss under 0.5%. Achieving a max frequency of 285 MHz and 11.4 GOP/s/W efficiency, the design proves highly effective for low-power edge AI inference.

Degree

thesis:*
College dc:contributor.school
School of Electrical and Electronic Engineering
Grantor dc:publisher
Nanyang Technological University
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Wei, Minyi
Advisor dc:contributor.supervisor
  • Kim Tae Hyoung

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10356/205542

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Wei, Minyi. MSE-Softmax: a zero-DSP FP8 accelerator for efficient transformer inference. Nanyang Technological University, 2025. https://hdl.handle.net/10356/205542