Draft & Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding

要約

補助モデルを必要とせずに大規模言語モデル (LLM) を高速化するための、新しい推論スキームである自己投機的デコードを紹介します。
このアプローチの特徴は、草案作成と検証という 2 段階のプロセスです。
ドラフト段階では、ドラフト中に特定の中間層を選択的にスキップすることで、品質は若干低くなりますが、より迅速にドラフト トークンが生成されます。続いて、検証段階では、元の LLM を使用して、これらのドラフト出力トークンを 1 回の順方向パスで検証します。
このプロセスにより、最終出力が変更されていない LLM によって生成されたものと同一であることが保証され、出力品質が維持されます。
提案された方法は、追加のニューラル ネットワーク トレーニングや追加のメモリ フットプリントを必要としないため、推論を高速化するためのプラグ アンド プレイでコスト効率の高いソリューションになります。
LLaMA-2 とその微調整されたモデルを使用したベンチマークでは、最大 1.73$\times$ の高速化が実証されました。

要約(オリジナル)

We present a novel inference scheme, self-speculative decoding, for accelerating Large Language Models (LLMs) without the need for an auxiliary model. This approach is characterized by a two-stage process: drafting and verification. The drafting stage generates draft tokens at a slightly lower quality but more quickly, which is achieved by selectively skipping certain intermediate layers during drafting Subsequently, the verification stage employs the original LLM to validate those draft output tokens in one forward pass. This process ensures the final output remains identical to that produced by the unaltered LLM, thereby maintaining output quality. The proposed method requires no additional neural network training and no extra memory footprint, making it a plug-and-play and cost-effective solution for inference acceleration. Benchmarks with LLaMA-2 and its fine-tuned models demonstrated a speedup up to 1.73$\times$.

arxiv情報

著者 Jun Zhang,Jue Wang,Huan Li,Lidan Shou,Ke Chen,Gang Chen,Sharad Mehrotra
発行日 2023-09-15 05:34:32+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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