TRAMS: Training-free Memory Selection for Long-range Language Modeling

Haofei Yu, Cunxiang Wang, Yue Zhang, Wei Bi
10/24/2023
cs.CL

No official code found. Best implementation: lwaekfjlk/TRAMS (10 stars, Apache-2.0, last commit 2023-10-26).

Abstract

The Transformer architecture is crucial for numerous AI models, but it still faces challenges in long-range language modeling. Though several specific transformer architectures have been designed to tackle issues of long-range dependencies, existing methods like Transformer-XL are plagued by a high percentage of ineffective memories. In this study, we present a plug-and-play strategy, known as TRAining-free Memory Selection (TRAMS), that selects tokens participating in attention calculation based on one simple metric. This strategy allows us to keep tokens that are likely to have a high attention score with the current queries and ignore the other ones. We have tested our approach on the word-level benchmark (WikiText-103) and the character-level benchmark (enwik8), and the results indicate an improvement without having additional training or adding additional parameters.

View on arXivView PDF

Code Implementations(1)

lwaekfjlk/TRAMSCommunity100%
Apache-2.0

TRAMS: Training-free Memory Selection for Long-range Language Modeling (EMNLP 2023 Findings)

100Shell, PythonOct 19, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{yu2023trams,
  title  = {TRAMS: Training-free Memory Selection for Long-range Language Modeling},
  author = {Haofei Yu and Cunxiang Wang and Yue Zhang and Wei Bi},
  year   = {2023},
  eprint = {2310.15494},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.15494v3}
}

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/2310.15494.svg)](https://codeofpaper.com/paper/2310.15494)

Discussion