UniMem: Towards a Unified View of Long-Context Large Language Models

Junjie Fang, Likai Tang, Hongzhe Bi, Yujia Qin, Si Sun +10 more
2/5/2024
cs.CLcs.AI

No official code found. Best implementation: thunlp/UniMem (9 stars, last commit 2024-08-14).

Abstract

Long-context processing is a critical ability that constrains the applicability of large language models (LLMs). Although there exist various methods devoted to enhancing the long-context processing ability of LLMs, they are developed in an isolated manner and lack systematic analysis and integration of their strengths, hindering further developments. In this paper, we introduce UniMem, a Unified framework that reformulates existing long-context methods from the view of Memory augmentation of LLMs. Distinguished by its four core dimensions-Memory Management, Memory Writing, Memory Reading, and Memory Injection, UniMem empowers researchers to conduct systematic exploration of long-context methods. We re-formulate 16 existing methods based on UniMem and analyze four representative methods: Transformer-XL, Memorizing Transformer, RMT, and Longformer into equivalent UniMem forms to reveal their design principles and strengths. Based on these analyses, we propose UniMix, an innovative approach that integrates the strengths of these algorithms. Experimental results show that UniMix achieves superior performance in handling long contexts with significantly lower perplexity than baselines.

View on arXivView PDF

Code Implementations(1)

thunlp/UniMemCommunity100%

UniMem: Towards a Unified View of Long-Context Large Language Models (COLM 2024)

91C, C++Aug 7, 20242 years ago

Similar Papers

Cite this paper

@article{fang2024unimem,
  title  = {UniMem: Towards a Unified View of Long-Context Large Language Models},
  author = {Junjie Fang and Likai Tang and Hongzhe Bi and Yujia Qin and Si Sun and Zhenyu Li and Haolun Li and Yongjian Li and Xin Cong and Yankai Lin and Yukun Yan and Xiaodong Shi and Sen Song and Zhiyuan Liu and Maosong Sun},
  year   = {2024},
  eprint = {2402.03009},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.03009v2}
}

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

Discussion