ChatPaper.aiChatPaper

マージンに書き込む:長い文脈のためのより良い推論パターンの取得

Writing in the Margins: Better Inference Pattern for Long Context Retrieval

August 27, 2024
著者: Melisa Russak, Umar Jamil, Christopher Bryant, Kiran Kamble, Axel Magnuson, Mateusz Russak, Waseem AlShikh
cs.AI

要旨

本論文では、長い入力シーケンスの処理を最適化するために設計された大規模言語モデル用の新しい推論パターンであるWriting in the Margins(WiM)を紹介します。この手法は、セグメント単位の推論を実行するためにキー値キャッシュのチャンク化されたプリフィルを活用し、広範なコンテキストの効率的な処理と、モデルを特定のタスクに導く中間情報(「マージン」)の生成と分類を可能にします。この手法は、計算上のオーバーヘッドをわずかに増やすだけで、微調整を必要とせずに市販モデルの性能を著しく向上させます。具体的には、WiMは推論スキル(HotpotQA、MultiHop-RAG)の精度において平均7.5%の向上と、集約タスク(CWE)のF1スコアにおいて30.0%以上の向上を提供することを観察しています。さらに、提案されたパターンが、コンテキスト処理の進行状況に関するユーザーへの継続的な更新と、関連情報の最終応答への統合を的確に指摘する対話型検索設計にどのように適合するかを示しています。WiMの実装をHugging Face Transformersライブラリを使用して公開しており、以下のリンクから入手可能です:https://github.com/writer/writing-in-the-margins.
English
In this paper, we introduce Writing in the Margins (WiM), a new inference pattern for Large Language Models designed to optimize the handling of long input sequences in retrieval-oriented tasks. This approach leverages the chunked prefill of the key-value cache to perform segment-wise inference, which enables efficient processing of extensive contexts along with the generation and classification of intermediate information ("margins") that guide the model towards specific tasks. This method increases computational overhead marginally while significantly enhancing the performance of off-the-shelf models without the need for fine-tuning. Specifically, we observe that WiM provides an average enhancement of 7.5% in accuracy for reasoning skills (HotpotQA, MultiHop-RAG) and more than a 30.0% increase in the F1-score for aggregation tasks (CWE). Additionally, we show how the proposed pattern fits into an interactive retrieval design that provides end-users with ongoing updates about the progress of context processing, and pinpoints the integration of relevant information into the final response. We release our implementation of WiM using Hugging Face Transformers library at https://github.com/writer/writing-in-the-margins.

Summary

AI-Generated Summary

PDF14211November 16, 2024