Intermittent Semi-working Mask: A New Masking Paradigm for LLMs

要約

人間と大規模言語モデル(Large Language Models: LLM)との対話は、複数ラウンドに及ぶため、LLMの高い生成品質と低遅延を維持することが課題となっている。主流のLLMは、マスキング戦略に基づいて、因果LLMと前置LLMの2つのカテゴリに分類することができる。いくつかの研究により、プレフィックスLLMは、プレフィックスシーケンスに対する双方向的な注意のおかげで、マルチターン対話や文脈内学習など、過去の文脈に大きく依存するシナリオにおいて、因果的なLLMを上回る傾向があることが示されている。しかし、前置詞LLMは多ターンの対話データセットにおいて非効率的な学習問題を内在している。また、プレフィックスLLMの注意メカニズムは、生成待ち時間を短縮するために、対話ラウンドをまたいでキー・バリュー・キャッシュ(KVキャッシュ)を再利用することができない。本論文では、これらの問題に対処するために、間欠的半作業マスク(Intermittent Semi-working Mask: ISM)と呼ばれる新しいマスキング方式を提案する。具体的には、対話履歴の問い合わせと回答に対して、双方向と単方向の注意を交互に適用する。このようにして、ISMは前置LLMの高い品質と因果LLMの低い生成待ち時間を同時に維持することができる。広範な実験により、我々のISMが大きな性能を達成することが示された。

要約(オリジナル)

Multi-turn dialogues are a key interaction method between humans and Large Language Models (LLMs), as conversations extend over multiple rounds, keeping LLMs’ high generation quality and low latency is a challenge. Mainstream LLMs can be grouped into two categories based on masking strategy: causal LLM and prefix LLM. Several works have demonstrated that prefix LLMs tend to outperform causal ones in scenarios that heavily depend on historical context such as multi-turn dialogues or in-context learning, thanks to their bidirectional attention on prefix sequences. However, prefix LLMs have an inherent inefficient training problem in multi-turn dialogue datasets. In addition, the attention mechanism of prefix LLM makes it unable to reuse Key-Value Cache (KV Cache) across dialogue rounds to reduce generation latency. In this paper, we propose a novel masking scheme called Intermittent Semi-working Mask (ISM) to address these problems. Specifically, we apply alternate bidirectional and unidirectional attention on queries and answers in the dialogue history. In this way, ISM is able to maintain the high quality of prefix LLM and low generation latency of causal LLM, simultaneously. Extensive experiments illustrate that our ISM achieves significant performance.

arxiv情報

著者 Mingcong Lu,Jiangcai Zhu,Wang Hao,Zheng Li,Shusheng Zhang,Kailai Shao,Chao Chen,Nan Li,Feng Wang,Xin Lu
発行日 2024-08-01 13:22:01+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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