ChatPaper.aiChatPaper

段階的推測デコーディングによるLLM推論の高速化

Accelerating LLM Inference with Staged Speculative Decoding

August 8, 2023
著者: Benjamin Spector, Chris Re
cs.AI

要旨

大規模言語モデル(LLM)の最近の進展は、その多様な能力を示しています。本論文では、小規模バッチのオンデバイスシナリオにおけるLLM推論を加速するための新しいアルゴリズム、段階的投機的デコードを提案します。小規模バッチ推論の低い演算密度に対処するため、従来の投機的デコードの研究を改善します。まず、投機的バッチをツリー構造に再構築し、生成コストを削減し、バッチあたりの期待トークン数を増加させます。次に、第二段階の投機的デコードを追加します。これらの改善を組み合わせることで、762MパラメータのGPT-2-Lモデルにおいて、単一バッチのデコードレイテンシを3.16倍削減しつつ、出力品質を完全に維持することに成功しました。
English
Recent advances with large language models (LLM) illustrate their diverse capabilities. We propose a novel algorithm, staged speculative decoding, to accelerate LLM inference in small-batch, on-device scenarios. We address the low arithmetic intensity of small-batch inference by improving upon previous work in speculative decoding. First, we restructure the speculative batch as a tree, which reduces generation costs and increases the expected tokens per batch. Second, we add a second stage of speculative decoding. Taken together, we reduce single-batch decoding latency by 3.16x with a 762M parameter GPT-2-L model while perfectly preserving output quality.
PDF254December 15, 2024