With Greater Text Comes Greater Necessity: Inference-Time Training Helps Long Text Generation

要約

小説の執筆や非常に長い文脈を含む談話レベルの翻訳などの長文テキストの生成は、現在の言語モデルに重大な課題をもたらします。
既存の方法は主に、長さの外挿などの戦略を通じてモデルのコンテキスト ウィンドウを拡張することに重点を置いています。
ただし、これらのアプローチでは、トレーニングおよび/または推論フェーズ中にかなりのハードウェア リソースが必要になります。
私たちが提案する手法である Temp-Lora は、別の概念を導入しています。
KV キャッシュに依存してすべてのコンテキスト情報を保存するのではなく、この情報を一時的な Lora モジュールに直接埋め込みます。
長いテキストの生成プロセスにおいて、このモジュールは以前に生成されたテキストを使用して徐々にトレーニングされます。
このアプローチは、コンテキストに関する知識を効率的に保存するだけでなく、モジュールが生成後に破棄されることを考慮して、モデルのパラメーターに対する永続的な変更を防ぎます。
PG19 言語モデリング ベンチマークと GuoFeng 談話レベル翻訳ベンチマークに関する広範な実験により、Temp-Lora の有効性が検証されました。
我々の結果は次のことを示しています: 1) PG19 のサブセットでパープレキシティ (PPL) が 13.2% 減少し、PPL が 29.3% 減少し、PPL が 113.2% 増加したことからわかるように、Temp-Lora は長いテキストの生成品質を大幅に向上させます。
GuoFeng のサブセットの BLEU スコア、2) Temp-Lora は既存の長文生成方法のほとんどと互換性があり、拡張されています、3) Temp-Lora はコンテキスト ウィンドウを短縮することで計算コストを大幅に削減できます。
たとえば、生成品質の適度な向上 (PPL で 3.8% の減少) を確保しながら、メモリ使用量を 51.5% 削減し、推論のレイテンシーを 60.0% 削減することができます。

要約(オリジナル)

Long text generation, such as novel writing and discourse-level translation with extremely long contexts, presents significant challenges to current language models. Existing methods mainly focus on extending the model’s context window through strategies like length extrapolation. However, these approaches demand substantial hardware resources during the training and/or inference phases. Our proposed method, Temp-Lora, introduces an alternative concept. Instead of relying on the KV cache to store all context information, we embeds this information directly into a temporary Lora module. In the process of long text generation, this module is progressively trained with text generated previously. This approach not only efficiently preserves contextual knowledge but also prevents any permanent alteration to the model’s parameters given that the module is discarded post-generation. Extensive experiments on the PG19 language modeling benchmark and the GuoFeng discourse-level translation benchmark validate the effectiveness of Temp-Lora. Our results show that: 1) Temp-Lora substantially enhances generation quality for long text, as indicated by a 13.2% decrease in perplexity (PPL) on a subset of PG19, and a 29.3% decrease in PPL along with a 113.2% increase in BLEU score on a subset of GuoFeng, 2) Temp-Lora is compatible with and enhances most existing long text generation methods, and 3) Temp-Lora can greatly reduce computational costs by shortening the context window. For example, we can ensure a moderate improvement in generation quality (a decrease of 3.8% in PPL) while enabling a 51.5% memory usage reduction and a 60.0% decrease in latency for inference.

arxiv情報

著者 Y. Wang,D. Ma,D. Cai
発行日 2024-09-11 02:22:58+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク