AttMEMO : Accelerating Transformers with Memoization on Big Memory Systems

Yuan Feng, Hyeran Jeon, Filip Blagojevic, Cyril Guyot, Qing Li +1 more
1/23/2023
cs.PFcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

Transformer models gain popularity because of their superior inference accuracy and inference throughput. However, the transformer is computation-intensive, causing a long inference time. The existing works on transformer inference acceleration have limitations caused by either the modification of transformer architectures or the need of specialized hardware. In this paper, we identify the opportunities of using memoization to accelerate the self-attention mechanism in transformers without the above limitations. Built upon a unique observation that there is rich similarity in attention computation across inference sequences, we build a memoization database that leverages the emerging big memory system. We introduce a novel embedding technique to find semantically similar inputs to identify computation similarity. We also introduce a series of techniques such as memory mapping and selective memoization to avoid memory copy and unnecessary overhead. We enable 22% inference-latency reduction on average (up to 68%) with negligible loss in inference accuracy.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{feng2023attmemo,
  title  = {AttMEMO : Accelerating Transformers with Memoization on Big Memory Systems},
  author = {Yuan Feng and Hyeran Jeon and Filip Blagojevic and Cyril Guyot and Qing Li and Dong Li},
  year   = {2023},
  eprint = {2301.09262},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.09262v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.09262.svg)](https://codeofpaper.com/paper/2301.09262)

Discussion