Resource type
Thesis type
(Thesis) M.Sc.
Date created
2025-09-05
Authors/Contributors
Author: Yousefijamarani, Zahra
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 leverages efficient attention-style reordering to reduce attention latency by minimizing inter-bank data movement. Our method lowers the complexity of processing an input sequence of length N with embedding dimension d from O(N2) to O(N), while also shrinking intermediate attention matrices from size N ×N to d×d. By reorganizing matrix operations, performing computations locally, and employing an optimized data transfer strategy, RED-PIM reduces computation cost and interconnect traffic. Compared to baseline PIM implementation, RED-PIM achieves inference time reductions ranging from 16% to 100% (geometric mean of 66%), with the largest gains on longer sequences. On real-world datasets, RED-PIM had a geometric speedup of 19.40×on datasets with long documents, while maintaining or improving accuracy. These results establish RED-PIM as a scalable and efficient solution for transformer inference.
File
Extent
39 pages.
Identifier
etd24038
Copyright statement
Copyright is held by the author(s).
Academic Supervisor
Thesis advisor: Alameldeen, Alaa
Language
English
Member of collection
| Download file | Size |
|---|---|
| etd24038.pdf | 1.2 MB |