Skip to main navigation Skip to search Skip to main content

Topkima-Former: Low-Energy, Low-Latency Inference for Transformers Using Top-k In-Memory ADC

Research output: Journal Publications and Reviews › RGC 21 - Publication in refereed journal › peer-review

Abstract

Transformer has emerged as a leading architecture in neural language processing (NLP) and computer vision (CV). However, the extensive use of nonlinear operations, like softmax, poses a performance bottleneck during transformer inference and comprises up to 40% of the total latency. Hence, we propose innovations at the circuit, algorithm and architecture levels to accelerate the transformer. At the circuit level, we propose Topkima - combining top-k activation selection with in-memory ADC (IMA) to implement efficient softmax without any sorting overhead. Only the k largest activations are sent to softmax calculation block, reducing the huge computational cost of softmax. At the algorithmic level, a modified training scheme utilizes top-k activations only during the forward pass, combined with a sub-top-k method to address the crossbar size limitation by aggregating each sub-top-k values as global top-k. At the architecture level, we introduce a fine pipeline for efficiently scheduling data flows and an improved scale-free technique for removing scaling cost. The combined system, dubbed Topkima-Former, enhances 1.8×-84× speedup and 1.2×-36× energy efficiency (EE) over prior In-memory computing (IMC) accelerators. Compared to a conventional softmax macro and a digital top-k (Dtopk) softmax macro, our proposed Topkima softmax macro achieves about 15× and 8× faster speed respectively. Experimental evaluations demonstrate minimal (0.42% to 1.60%) accuracy loss for different models in both vision and NLP tasks. © 2004-2012 IEEE.
Original languageEnglish
Pages (from-to)2509-2519
Number of pages11
JournalIEEE Transactions on Circuits and Systems I: Regular Papers
Volume72
Issue number6
Online published18 Mar 2025
DOIs
Publication statusPublished - Jun 2025

Funding

This work was supported by the Innovation Technology Fund Mid-Stream Research Program (ITF MSRP) under Grant ITS/018/22MS

UN SDGs

This output contributes to the following UN Sustainable Development Goals (SDGs)

  1. SDG 7 - Affordable and Clean Energy
    SDG 7 Affordable and Clean Energy

Research Keywords

  • efficient softmax
  • in memory ADC
  • In-memory computing
  • top-k
  • transformer

Fingerprint

Dive into the research topics of 'Topkima-Former: Low-Energy, Low-Latency Inference for Transformers Using Top-k In-Memory ADC'. Together they form a unique fingerprint.

Cite this