Decoding Speculative Decoding

要約

投機的デコーディングは、大規模言語モデル(LLM)の推論結果を変更することなく、推論を高速化するために広く使われている手法である。LLM上で推論を行う場合、投機的デコーディングは、投機的トークンを生成する小さなドラフトモデルを使用し、次にターゲットLLMを使用してドラフトトークンを検証する。投機的復号がもたらす高速化は、ドラフトモデルの選択に大きく依存する。最高のスループットを達成するために、生成されたトークンがLLMに受け入れられる確率が高いドラフトモデルを選択することが広く提案されている。しかし、我々の実験では、生成されたトークンがターゲットモデルに受け入れられる確率が高くなるにつれてスループットが低下するという逆の結果が得られている。この現象を理解するために、投機的デコードに影響を与える様々な要因を特徴付け、それらの要因がどのように相互作用して高速化に影響を与えるかを明らかにするために、広範な実験を行った。実験に基づき、与えられたワークロードに対して正しいドラフトモデルを決定するために使用できる解析モデルを説明します。さらに、我々の洞察を用いて、既存のドラフトモデルよりも30%高いスループットを提供できるLLaMA-65B用の新しいドラフトモデルを設計する。

要約(オリジナル)

Speculative Decoding is a widely used technique to speed up inference for Large Language Models (LLMs) without modifying its outcome. When performing inference on an LLM, speculative decoding uses a smaller draft model which generates speculative tokens and then uses the target LLM to verify those draft tokens. The speedup provided by speculative decoding heavily depends on the choice of the draft model. It has been widely suggested to select a draft model that provides a high probability of the generated token being accepted by the LLM to achieve the highest throughput. However, our experiments indicate the contrary with throughput diminishing as the probability of generated tokens to be accepted by the target model increases. To understand this phenomenon, we perform extensive experiments to characterize the different factors that affect speculative decoding and how those factors interact and affect the speedups. Based on our experiments we describe an analytical model which can be used to decide the right draft model for a given workload. Further, using our insights we design a new draft model for LLaMA-65B which can provide 30% higher throughput than existing draft models.

arxiv情報

著者 Minghao Yan,Saurabh Agarwal,Shivaram Venkataraman
発行日 2024-02-02 16:15:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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