LLM as Effective Streaming Processor: Bridging Streaming-Batch Mismatches with Group Position Encoding

要約

大規模な言語モデル(LLM)は、主にバッチ処理用に設計されています。
LLMをストリーミングに適応させるための既存の方法は、スケーラビリティが限られている高価な再エンコードまたは特殊なアーキテクチャのいずれかに依存しています。
この作業は、バッチ指向のLLMをストリーミングに適応させる際の3つの重要なミスマッチを特定します:(1)入力アテンション、(2)出力 – アテナンス、および(3)位置IDミスマッチ。
後者の2つの不一致には頻繁な再エンコードが必要であると一般に想定されていますが、私たちの分析では、入力と出力のミスマッチのみがパフォーマンスに大きな影響を与えることが明らかになり、再エンコードの出力がほとんど不要であることが示されています。
共通の仮定でこの矛盾をよりよく理解するために、ストリーミングにおけるLLMSに対する位置エンコーディングの影響に関する最初の包括的な分析を提供し、ソースおよびターゲットコンテキスト内で相対位置を保存することが絶対順序を維持するよりも重要であることを示します。
上記の分析に動機付けられて、バッチアーキテクチャ上に構築されたパラダイムをコードするグループ位置を導入して、ストリーミングモードとバッチモードの一貫性を高めます。
言語間タスクとクロスモーダルタスクに関する広範な実験は、私たちの方法が既存のアプローチよりも優れていることを示しています。
私たちの方法では、アーキテクチャの変更は必要ありません。ストリーミングモードとバッチモードの両方で強力な一般化を示します。
このコードは、リポジトリhttps://github.com/eit-nlp/streamingllmで入手できます。

要約(オリジナル)

Large Language Models (LLMs) are primarily designed for batch processing. Existing methods for adapting LLMs to streaming rely either on expensive re-encoding or specialized architectures with limited scalability. This work identifies three key mismatches in adapting batch-oriented LLMs to streaming: (1) input-attention, (2) output-attention, and (3) position-ID mismatches. While it is commonly assumed that the latter two mismatches require frequent re-encoding, our analysis reveals that only the input-attention mismatch significantly impacts performance, indicating re-encoding outputs is largely unnecessary. To better understand this discrepancy with the common assumption, we provide the first comprehensive analysis of the impact of position encoding on LLMs in streaming, showing that preserving relative positions within source and target contexts is more critical than maintaining absolute order. Motivated by the above analysis, we introduce a group position encoding paradigm built on batch architectures to enhance consistency between streaming and batch modes. Extensive experiments on cross-lingual and cross-modal tasks demonstrate that our method outperforms existing approaches. Our method requires no architectural modifications, exhibits strong generalization in both streaming and batch modes. The code is available at repository https://github.com/EIT-NLP/StreamingLLM.

arxiv情報

著者 Junlong Tong,Jinlan Fu,Zixuan Lin,Yingqi Fan,Anhao Zhao,Hui Su,Xiaoyu Shen
発行日 2025-05-22 17:53:28+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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