TensorX
返回文献探索

Paper · arXiv 2312.09571

Extending Context Window of Large Language Models via Semantic Compression

Weizhi Fei, Xueyan Niu, Pingyi Zhou, Lu Hou, Bo Bai, Lei Deng, Wei Han

14 upvotesDecember 15, 2023arXiv 预印本
AI 摘要

A semantic compression method extends the context window of Transformer-based LLMs for longer texts without fine-tuning, maintaining fluency and reducing computational costs.

Transformer-based LLMssemantic compressionsource codinginformation theorypre-trained modelsemantic redundancycontext windowquestion answeringsummarizationfew-shot learninginformation retrieval

Abstract

Transformer-based Large Language Models (LLMs) often impose limitations on the length of the text input to ensure the generation of fluent and relevant responses. This constraint restricts their applicability in scenarios involving long texts. We propose a novel semantic compression method that enables generalization to texts that are 6-8 times longer, without incurring significant computational costs or requiring fine-tuning. Our proposed framework draws inspiration from source coding in information theory and employs a pre-trained model to reduce the semantic redundancy of long inputs before passing them to the LLMs for downstream tasks. Experimental results demonstrate that our method effectively extends the context window of LLMs across a range of tasks including question answering, summarization, few-shot learning, and information retrieval. Furthermore, the proposed semantic compression method exhibits consistent fluency in text generation while reducing the associated computational overhead.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Extending Context Window of Large Language Models via Semantic Compression | TensorX