ChatPaper.aiChatPaper

Inférence spéculative distribuée des grands modèles de langage

Distributed Speculative Inference of Large Language Models

May 23, 2024
Auteurs: Nadav Timor, Jonathan Mamou, Daniel Korat, Moshe Berchansky, Oren Pereg, Moshe Wasserblat, Tomer Galanti, Michal Gordon, David Harel
cs.AI

Résumé

Accélérer l'inférence des grands modèles de langage (LLMs) constitue un défi majeur en intelligence artificielle. Cet article présente l'inférence spéculative distribuée (DSI), un nouvel algorithme d'inférence distribué qui est prouvé plus rapide que l'inférence spéculative (SI) [leviathan2023fast, chen2023accelerating, miao2023specinfer] et que l'inférence autorégressive traditionnelle (non-SI). Comme les autres algorithmes SI, DSI fonctionne sur des LLMs figés, ne nécessitant ni entraînement ni modifications architecturales, tout en préservant la distribution cible. Les études précédentes sur SI ont démontré des accélérations empiriques (par rapport à non-SI) mais nécessitent un LLM "draft" rapide et précis. En pratique, les LLMs disponibles sur étagère n'ont souvent pas de "drafters" correspondants suffisamment rapides et précis. Nous mettons en évidence un écart : SI devient plus lent que non-SI lorsque des "drafters" plus lents ou moins précis sont utilisés. Nous comblons cet écart en prouvant que DSI est plus rapide que SI et non-SI, quel que soit le "drafter" utilisé. En orchestrant plusieurs instances du modèle cible et des "drafters", DSI est non seulement plus rapide que SI, mais supporte également des LLMs qui ne peuvent pas être accélérés avec SI. Nos simulations montrent des accélérations pour des LLMs disponibles sur étagère dans des scénarios réalistes : DSI est 1,29 à 1,92 fois plus rapide que SI.
English
Accelerating the inference of large language models (LLMs) is an important challenge in artificial intelligence. This paper introduces distributed speculative inference (DSI), a novel distributed inference algorithm that is provably faster than speculative inference (SI) [leviathan2023fast, chen2023accelerating, miao2023specinfer] and traditional autoregressive inference (non-SI). Like other SI algorithms, DSI works on frozen LLMs, requiring no training or architectural modifications, and it preserves the target distribution. Prior studies on SI have demonstrated empirical speedups (compared to non-SI) but require a fast and accurate drafter LLM. In practice, off-the-shelf LLMs often do not have matching drafters that are sufficiently fast and accurate. We show a gap: SI gets slower than non-SI when using slower or less accurate drafters. We close this gap by proving that DSI is faster than both SI and non-SI given any drafters. By orchestrating multiple instances of the target and drafters, DSI is not only faster than SI but also supports LLMs that cannot be accelerated with SI. Our simulations show speedups of off-the-shelf LLMs in realistic settings: DSI is 1.29-1.92x faster than SI.

Summary

AI-Generated Summary

PDF190December 15, 2024