SentenceVAE: Enable Next-sentence Prediction for Large Language Models with Faster Speed, Higher Accuracy and Longer Context

要約

現在の大規模言語モデル (LLM) は、推論に主にネクスト トークン予測手法を利用していますが、これにより処理速度が大幅に低下します。
この論文では、LLM の推論効率を高めることを目的とした、次文予測と呼ばれる新しい推論方法論を紹介します。
センテンス バリエーション オートエンコーダ (SentenceVAE) を紹介します。これは、センテンス エンコーダとセンテンス デコーダで構成される小さなモデルです。
Sentence Encoder は文内の情報を単一のトークンに効果的に圧縮でき、Sentence Decoder はこの圧縮されたトークンを再構築して文に戻すことができます。
SentenceVAE を LLM の入力層と出力層に統合することにより、文ごとの推論方法を採用する文レベル LLM (SLLM) を開発します。
さらに、SLLM の SentenceVAE モジュールは、コンテキストを文に分割することで元の意味内容の整合性を維持できるため、推論速度を向上させながら精度を向上させることができます。
さらに、以前の LLM と比較して、SLLM は同等のコンテキスト長で処理するトークンの数が少ないため、セルフアテンションの計算に必要なメモリが大幅に削減され、より長いコンテキストの処理が容易になります。
Wanjuan データセットに対する広範な実験により、提案された方法により推論速度が 204 ~ 365% 高速化され、パープレキシティ (PPL) が元のメトリックの 46 ~ 75% に減少し、同等のコンテキスト長に対してメモリ オーバーヘッドが 86 ~ 91% 減少することが明らかになりました。
、トークンごとの方法と比較します。

要約(オリジナル)

Current large language models (LLMs) primarily utilize next-token prediction method for inference, which significantly impedes their processing speed. In this paper, we introduce a novel inference methodology termed next-sentence prediction, aimed at enhancing the inference efficiency of LLMs. We present Sentence Variational Autoencoder (SentenceVAE), a tiny model consisting of a Sentence Encoder and a Sentence Decoder. The Sentence Encoder can effectively condense the information within a sentence into a singular token, while the Sentence Decoder can reconstruct this compressed token back into sentence. By integrating SentenceVAE into the input and output layers of LLMs, we develop Sentence-level LLMs (SLLMs) that employ a sentence-by-sentence inference method. In addition, the SentenceVAE module of SLLMs can maintain the integrity of the original semantic content by segmenting the context into sentences, thereby improving accuracy while boosting inference speed. Moreover, compared to previous LLMs, SLLMs process fewer tokens over equivalent context length, significantly reducing memory demands for self-attention computation and facilitating the handling of longer context. Extensive experiments on Wanjuan dataset have reveal that the proposed method can accelerate inference speed by 204~365%, reduce perplexity (PPL) to 46~75% of its original metric, and decrease memory overhead by 86~91% for the equivalent context length, compared to the token-by-token method.

arxiv情報

著者 Hongjun An,Yifan Chen,Xiaozhen Qiao,Zhe Sun,Xuelong Li
発行日 2024-08-06 13:38:50+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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