cs.LGMar 19, 2026

DAPA: Distribution Aware Piecewise Activation Functions for On-Device Transformer Inference and Training

Authors: Maoyang Xiang, Bo Wang

Organizations: Information Systems Technology and Design Singapore University of Technology and Design Singapore

Abstract

Non-linear activation functions play a pivotal role in on-device inference and training, as they not only consume substantial hardware resources but also impose a significant impact on system performance and energy efficiency. In this work, we propose Distribution-Aware Piecewise Activation (DAPA), a differentiable and hardware-friendly activation function for Transformer architectures by exploiting the distribution of pre-activation data. DAPA employs a non-uniform piecewise approximation that allocates finer segments to high-probability regions of the distribution, improving generalizability over prior piecewise linear methods. The resulting approximation is further quantized using Distribution-Weighted Mean Square Error to reduce latency and resource utilization for hardware deployment. Our HLS implementation demonstrates that DAPA speeds up GELU computation by 16×\times and decreases DSP utilization by 16×\times while maintaining comparable or better performance across vision Transformers and GPT-2 models.

Figures & tables

Explore similar work

CardsList
  1. TRACE: Transformer Residual Activation Codebook Encoding for Communication-efficient Distributed Edge Inference

    Oct 15, 2026Muhammad Azlan Qazi, Alexandros Iosifidis, Qi ZhangEfficient Transformer InferenceTransformer Inference

  2. Profiling-Driven Adaptive Distributed Transformer Inference on Embedded Edge Deployment

    May 25, 2026Muhammad Azlan Qazi, Alexandros Iosifidis, Qi ZhangEfficient Transformer InferenceTransformer Inference

  3. Recent Developments in Transformer Inference Deployment on FPGA Platforms: A Survey

    Sep 1, 2026Arjan Blankestijn, Uraz Odyurt, Amirreza YousefzadehEfficient Transformer InferenceTransformer Inference