BiTA: 大規模言語モデルにおけるロスレス高速化のための双方向チューニング
BiTA: Bi-Directional Tuning for Lossless Acceleration in Large Language Models
January 23, 2024
著者: Feng Lin, Hanling Yi, Hongbin Li, Yifan Yang, Xiaotian Yu, Guangming Lu, Rong Xiao
cs.AI
要旨
大規模言語モデル(LLM)は、推論時に自己回帰生成を採用することが一般的であり、これにより高いメモリ帯域幅の需要が生じ、結果としてレイテンシが長くなります。この非効率性を軽減するため、我々はBi-directional Tuning for Lossless Acceleration(BiTA)を提案します。これは、効率的な半自己回帰生成とドラフト検証を通じてLLMを高速化する革新的な手法です。プロンプトチューニングの概念に着想を得て、我々はLLMを双方向チューニングと呼ばれるパラメータ効率の高い設計で強化し、半自己回帰生成の能力を向上させます。効率的なツリーベースのデコーディングを採用することで、モデルはドラフト候補の生成と検証を並行して実行し、貪欲サンプリング下で自己回帰モデルと同一の出力を保証します。BiTAは軽量なプラグインモジュールとして機能し、追加の支援モデルを必要とせず、大幅な追加メモリコストを発生させることなく、既存のLLMの推論効率をシームレスに向上させます。提案されたBiTAを適用することで、LLaMA-2-70B-ChatはMT-Benchベンチマークで2.7倍の高速化を達成しました。広範な実験により、我々の手法が最先端の高速化技術を凌駕することが確認されています。
English
Large language models (LLMs) commonly employ autoregressive generation during
inference, leading to high memory bandwidth demand and consequently extended
latency. To mitigate this inefficiency, we present Bi-directional Tuning for
lossless Acceleration (BiTA), an innovative method expediting LLMs via
streamlined semi-autoregressive generation and draft verification. Inspired by
the concept of prompt tuning, we enhance LLMs with a parameter-efficient design
called bi-directional tuning for the capability in semi-autoregressive
generation. Employing efficient tree-based decoding, the models perform draft
candidate generation and verification in parallel, ensuring outputs identical
to their autoregressive counterparts under greedy sampling. BiTA serves as a
lightweight plug-in module, seamlessly boosting the inference efficiency of
existing LLMs without requiring additional assistance models or incurring
significant extra memory costs. Applying the proposed BiTA, LLaMA-2-70B-Chat
achieves a 2.7times speedup on the MT-Bench benchmark. Extensive experiments
confirm our method surpasses state-of-the-art acceleration techniques.