LLM Maybe LongLM: チューニングなしでLLMのコンテキストウィンドウを自己拡張
LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuning
January 2, 2024
著者: Hongye Jin, Xiaotian Han, Jingfeng Yang, Zhimeng Jiang, Zirui Liu, Chia-Yuan Chang, Huiyuan Chen, Xia Hu
cs.AI
要旨
本研究は、ファインチューニングなしで大規模言語モデル(LLM)が持つ長文脈処理の内在的な能力を引き出すことを目的としています。学習時の訓練シーケンスの長さが限られているため、推論時に長い入力シーケンスに対するLLMの適用が制限される可能性があります。本研究では、既存のLLM自体が長文脈を処理するための内在的な能力を持っていると主張します。この主張に基づき、LLMのコンテキストウィンドウを自ら拡張し、その内在的な能力を最大限に活用することを提案します。我々は、LLMの長文脈処理の潜在能力を刺激するために「Self-Extend」を提案します。基本的なアイデアは、グループレベルと近隣レベルの二段階の注意情報を構築することです。これら二つのレベルは、元のモデルの自己注意機構によって計算されるため、提案手法は追加の訓練を必要としません。わずか4行のコード修正で、既存のLLMのコンテキストウィンドウをファインチューニングなしで容易に拡張することができます。包括的な実験を行った結果、提案手法が既存のLLMのコンテキストウィンドウの長さを効果的に拡張できることが示されました。
English
This work elicits LLMs' inherent ability to handle long contexts without
fine-tuning. The limited length of the training sequence during training may
limit the application of Large Language Models (LLMs) on long input sequences
for inference. In this work, we argue that existing LLMs themselves have
inherent capabilities for handling long contexts. Based on this argument, we
suggest extending LLMs' context window by themselves to fully utilize the
inherent ability.We propose Self-Extend to stimulate LLMs' long context
handling potential. The basic idea is to construct bi-level attention
information: the group level and the neighbor level. The two levels are
computed by the original model's self-attention, which means the proposed does
not require any training. With only four lines of code modification, the
proposed method can effortlessly extend existing LLMs' context window without
any fine-tuning. We conduct comprehensive experiments and the results show that
the proposed method can effectively extend existing LLMs' context window's
length.