Recurrent Context Compression: Efficiently Expanding the Context Window of LLM

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Huang, Chensen, Zhu, Guibo, Wang, Xuepeng, Luo, Yifei, Ge, Guojing, Chen, Haoran, Yi, Dong, Wang, Jinqiao
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913383862763520
author Huang, Chensen
Zhu, Guibo
Wang, Xuepeng
Luo, Yifei
Ge, Guojing
Chen, Haoran
Yi, Dong
Wang, Jinqiao
author_facet Huang, Chensen
Zhu, Guibo
Wang, Xuepeng
Luo, Yifei
Ge, Guojing
Chen, Haoran
Yi, Dong
Wang, Jinqiao
contents To extend the context length of Transformer-based large language models (LLMs) and improve comprehension capabilities, we often face limitations due to computational resources and bounded memory storage capacity. This work introduces a method called Recurrent Context Compression (RCC), designed to efficiently expand the context window length of LLMs within constrained storage space. We also investigate the issue of poor model responses when both instructions and context are compressed in downstream tasks, and propose an instruction reconstruction method to mitigate this problem. We validated the effectiveness of our approach on multiple tasks, achieving a compression rate of up to 32x on text reconstruction tasks with a BLEU4 score close to 0.95, and nearly 100\% accuracy on a passkey retrieval task with a sequence length of 1M. Finally, our method demonstrated competitive performance in long-text question-answering tasks compared to non-compressed methods, while significantly saving storage resources in long-text inference tasks. Our code, models, and demo are available at https://github.com/WUHU-G/RCC_Transformer
format Preprint
id arxiv_https___arxiv_org_abs_2406_06110
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
Huang, Chensen
Zhu, Guibo
Wang, Xuepeng
Luo, Yifei
Ge, Guojing
Chen, Haoran
Yi, Dong
Wang, Jinqiao
Computation and Language
Artificial Intelligence
To extend the context length of Transformer-based large language models (LLMs) and improve comprehension capabilities, we often face limitations due to computational resources and bounded memory storage capacity. This work introduces a method called Recurrent Context Compression (RCC), designed to efficiently expand the context window length of LLMs within constrained storage space. We also investigate the issue of poor model responses when both instructions and context are compressed in downstream tasks, and propose an instruction reconstruction method to mitigate this problem. We validated the effectiveness of our approach on multiple tasks, achieving a compression rate of up to 32x on text reconstruction tasks with a BLEU4 score close to 0.95, and nearly 100\% accuracy on a passkey retrieval task with a sequence length of 1M. Finally, our method demonstrated competitive performance in long-text question-answering tasks compared to non-compressed methods, while significantly saving storage resources in long-text inference tasks. Our code, models, and demo are available at https://github.com/WUHU-G/RCC_Transformer
title Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2406.06110