Skip to content

Design and Evaluation of Mamba Inference on a Programmable CGLA

Takuto Ando, Yasuhiko Nakashima

cs.AR

Abstract

As artificial intelligence (AI) applications have expanded in recent years, the computational cost and power consumption of inference have become concerns. The high memory requirements of Transformer architectures have drawn attention to state-space models such as Mamba, which require little memory during generation. Mamba carries a fixed-size recurrent state from one token to the next. A graphics processing unit (GPU) exploits parallelism in conventional AI models. However, the recurrent dependence in Mamba prevents GPUs from parallelizing state updates across tokens. This dependence limits energy efficiency during generation. The CPU-Grounded Linear Array (CGLA) is a general-purpose programmable coarse-grained reconfigurable array (CGRA). Its pipeline suits these ordered updates because each processing element passes intermediate results to the next. We implement Mamba-130M inference on a field-programmable gate array (FPGA) prototype of the CGLA and evaluate token generation. We group independent projection rows into a single call and reuse the packed weights in direct memory access (DMA) buffers within each request. Together, these changes reduced the median model-compute time for generating 128 tokens from 732 to 167 s on the prototype. The projected efficiency of the CGLA application-specific integrated circuit (ASIC) subsystem is 0.64 tokens per joule, compared with 0.19 for the RTX 4090 system at nominal power. The CGLA value is 3.4x that of the RTX 4090 and close to the 0.63 tokens per joule of the Jetson AGX Orin.

Create a lesson

Metadata

Comments
12 pages