RED-PIM: Reducing Data Movement for Transformers using Processing-in-Memory
Abstract
Transformers are widely used across many domains, including natural language processing, computer vision, web search, and DNA sequence analysis. Given their broad applicability, improving the performance of transformer models is critical. However, the high volume of data movement between processing units and memory during attention operations significantly limits their efficiency. Processing-In-Memory (PIM) mitigates this issue by performing computations directly inside memory. While prior work has proposed PIM-based transformer implementations, they suffer from costly inter-bank communication, and struggle to scale due to the limited capacity of memory banks. As a result, attention-related data must be split across banks, diminishing the potential benefits of PIM. In this work, we propose RED-PIM, an algorithm-architecture co-design that reduces attention latency by minimizing inter-bank data movement from O(N2) to O(N) and shrinking intermediate attention matrices from N x N to d x d. By reorganizing matrix operations, performing computations locally, and employing an optimized data transfer strategy, RED-PIM significantly reduces computation cost and interconnect traffic. Compared to baseline PIM implementation, RED-PIM achieves inference time reductions ranging from 16.05% to 99.99% (geometric mean of 66.42%), with the largest gains on longer sequences. On real-world datasets, RED-PIM improves performance by 99.60% for long documents and 13.44% for shorter ones, while maintaining or improving accuracy. These results demonstrate RED-PIM's effectiveness for scalable and efficient transformer inference.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AR
Related papers
IQ-JEPA: A Joint-Embedding Predictive Architecture with a Hermitian Vision Transformer for Sound Speed and Attenuation Estimation from Ultrasound IQ Data
Shared title terminologycs.LGMasashi Sode, Gianmarco Pinton
Mixture-of-Loops Transformer
Shared title terminologycs.LGLianghui Zhu, Shijie Wang, Xinggang Wang et al.
From Prediction to Decision: Decision-Focused Fine-Tuning of Autoregressive Tabular Transformers for Cost-Sensitive Financial Events
Shared title terminologycs.LGAshkan Golgoon, Giacomo Domeniconi, Samuel Atkins et al.
Deep Reinforcement Learning for Multi-UAV Data Harvesting Under Variable Team Sizes and Agent Loss
Shared title terminologycs.LGThiago de Souza Lamenza, Bruno José Olivieri de Souza, Markus Endler
When the Proxy Is Wrong: Mismatch-Corrected Bandits for Adaptive Data Sampling
Shared title terminologycs.LGAmine Saadi, Elissa Mhanna, Raphaël Féraud et al.
Quaternion-Tucker ZigZag Networks: Halving Transformer Backbone Parameters and Enabling Exact 2D Zero-Loss Continual Scaling
Shared title terminologycs.LGShubham Barmase