Faster Cascades via Speculative Decoding

要約

カスケードと投機的デコードは、言語モデルの推論効率を向上させる 2 つの一般的なアプローチです。
どちらのアプローチも、異なるサイズのモデルをインターリーブする必要がありますが、基本的に異なるメカニズムを介しています。カスケードでは、「ハード」入力に対してのみ大きなモデルを呼び出す延期ルールが採用されていますが、投機的デコードでは投機的実行を使用して、主に並列検証モードで大きなモデルを呼び出します。
これらのメカニズムにはさまざまな利点があります。経験的には、カスケードは多くの場合、大規模なモデルよりも優れた品質を生み出すことができますが、理論的には、投機的デコードにより品質の中立性が保証されます。
このペーパーでは、投機的実行を通じて延期ルールを実装する新しい投機的カスケード手法を設計することにより、これら両方のアプローチの長所を活用します。
投機的カスケードの最適な延期ルールを特徴付け、最適なルールへのプラグイン近似を採用します。
ベンチマーク言語タスクでの T5 モデルの実験を通じて、提案されたアプローチがカスケードおよび投機的デコード ベースラインよりも優れたコストと品質のトレードオフをもたらすことを示します。

要約(オリジナル)

Cascades and speculative decoding are two common approaches to improving language models’ inference efficiency. Both approaches involve interleaving models of different sizes, but via fundamentally distinct mechanisms: cascades employ a deferral rule that invokes the larger model only for ‘hard’ inputs, while speculative decoding uses speculative execution to primarily invoke the larger model in parallel verification mode. These mechanisms offer different benefits: empirically, cascades are often capable of yielding better quality than even the larger model, while theoretically, speculative decoding offers a guarantee of quality-neutrality. In this paper, we leverage the best of both these approaches by designing new speculative cascading techniques that implement their deferral rule through speculative execution. We characterize the optimal deferral rule for our speculative cascades, and employ a plug-in approximation to the optimal rule. Through experiments with T5 models on benchmark language tasks, we show that the proposed approach yields better cost-quality trade-offs than cascading and speculative decoding baselines.

arxiv情報

著者 Harikrishna Narasimhan,Wittawat Jitkrittum,Ankit Singh Rawat,Seungyeon Kim,Neha Gupta,Aditya Krishna Menon,Sanjiv Kumar
発行日 2024-05-29 16:55:08+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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