大規模言語モデルのコンテキストウィンドウ拡張:意味的圧縮によるアプローチ
Extending Context Window of Large Language Models via Semantic Compression
December 15, 2023
著者: Weizhi Fei, Xueyan Niu, Pingyi Zhou, Lu Hou, Bo Bai, Lei Deng, Wei Han
cs.AI
要旨
Transformerベースの大規模言語モデル(LLMs)は、流暢で関連性の高い応答を生成するために、テキスト入力の長さに制限を設けることが多い。この制約は、長文を扱うシナリオにおける適用性を制限している。本研究では、大幅な計算コストをかけず、ファインチューニングを必要とせずに、6~8倍の長さのテキストに一般化可能な新しい意味的圧縮手法を提案する。提案するフレームワークは、情報理論におけるソース符号化に着想を得て、事前学習済みモデルを活用して長い入力の意味的冗長性を削減し、それをLLMsに渡して下流タスクを実行する。実験結果は、質問応答、要約、少数ショット学習、情報検索などのタスクにおいて、提案手法がLLMsのコンテキストウィンドウを効果的に拡張することを示している。さらに、提案する意味的圧縮手法は、テキスト生成の流暢さを維持しつつ、関連する計算オーバーヘッドを削減することを実証している。
English
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.