Speculative Decoding with Big Little Decoder

要約

近年、Transformerアーキテクチャに基づく大規模言語モデルが登場し、自然言語処理分野における劇的な進歩が可能になった。しかし、これらのモデルは推論レイテンシが長く、そのため導入が制限され、様々なリアルタイムアプリケーションにとって法外に高価なものとなっている。自己回帰生成タスクでは、トークン・レベルの並列化を利用することなく、トークンを逐次生成するためにモデルを繰り返し実行する必要があるため、推論待ち時間はさらに悪化する。この問題に対処するため、我々はBig Little Decoder (BiLD)を提案する。BiLDは、様々なテキスト生成アプリケーションの推論効率と待ち時間を改善できるフレームワークである。BiLDフレームワークには、協調的にテキストを生成するサイズの異なる2つのモデルが含まれる。小さなモデルは低い推論コストでテキストを生成するために自己回帰的に実行され、大きなモデルは小さなモデルの不正確な予測を非自己回帰的に改良するために時々呼び出されるだけである。BiLDは小モデルと大モデルを協調させるために、2つのシンプルかつ効果的なポリシーを導入する。(1)大モデルに制御を引き渡すタイミングを決定するフォールバックポリシー、(2)大モデルが小モデルの不正確な予測を修正する必要があるタイミングを決定するロールバックポリシーである。異なるタスクとモデルで我々のフレームワークを評価するために、IWSLT 2017 De-EnとWMT 2014 De-Enでの機械翻訳、XSUMとCNN/DailyMailでの要約を含む様々なテキスト生成シナリオにBiLDを適用した。NVIDIA T4 GPU上で、我々のフレームワークは最小限の生成品質劣化で最大2.12倍のスピードアップを達成した。さらに、我々のフレームワークは完全にプラグアンドプレイであり、学習プロセスやモデルアーキテクチャを変更することなく適用できる。我々のコードはオープンソースである

要約(オリジナル)

The recent emergence of Large Language Models based on the Transformer architecture has enabled dramatic advancements in the field of Natural Language Processing. However, these models have long inference latency, which limits their deployment, and which makes them prohibitively expensive for various real-time applications. The inference latency is further exacerbated by autoregressive generative tasks, as models need to run iteratively to generate tokens sequentially without leveraging token-level parallelization. To address this, we propose Big Little Decoder (BiLD), a framework that can improve inference efficiency and latency for a wide range of text generation applications. The BiLD framework contains two models with different sizes that collaboratively generate text. The small model runs autoregressively to generate text with a low inference cost, and the large model is only invoked occasionally to refine the small model’s inaccurate predictions in a non-autoregressive manner. To coordinate the small and large models, BiLD introduces two simple yet effective policies: (1) the fallback policy that determines when to hand control over to the large model; and (2) the rollback policy that determines when the large model needs to correct the small model’s inaccurate predictions. To evaluate our framework across different tasks and models, we apply BiLD to various text generation scenarios encompassing machine translation on IWSLT 2017 De-En and WMT 2014 De-En, and summarization on XSUM and CNN/DailyMail. On an NVIDIA T4 GPU, our framework achieves a speedup of up to 2.12x speedup with minimal generation quality degradation. Furthermore, our framework is fully plug-and-play and can be applied without any modifications in the training process or model architecture. Our code is open-sourced

arxiv情報

著者 Sehoon Kim,Karttikeya Mangalam,Suhong Moon,John Canny,Jitendra Malik,Michael W. Mahoney,Amir Gholami,Kurt Keutzer
発行日 2023-09-01 07:58:52+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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