ChatPaper.aiChatPaper

Inferenza Speculativa Distribuita di Modelli Linguistici di Grande Dimensione

Distributed Speculative Inference of Large Language Models

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

Abstract

Accelerare l'inferenza dei grandi modelli linguistici (LLM) rappresenta una sfida importante nell'intelligenza artificiale. Questo articolo introduce l'inferenza speculativa distribuita (DSI), un nuovo algoritmo di inferenza distribuita che è dimostrabilmente più veloce dell'inferenza speculativa (SI) [leviathan2023fast, chen2023accelerating, miao2023specinfer] e dell'inferenza autoregressiva tradizionale (non-SI). Come altri algoritmi SI, DSI funziona su LLM congelati, non richiede addestramento o modifiche architetturali e preserva la distribuzione target. Studi precedenti su SI hanno dimostrato accelerazioni empiriche (rispetto a non-SI) ma richiedono un LLM "drafter" veloce e accurato. Nella pratica, i LLM pronti all'uso spesso non dispongono di drafters corrispondenti sufficientemente veloci e precisi. Mostriamo un divario: SI diventa più lento di non-SI quando si utilizzano drafters più lenti o meno accurati. Colmiamo questo divario dimostrando che DSI è più veloce sia di SI che di non-SI con qualsiasi drafter. Orchestrando più istanze del target e dei drafters, DSI non solo è più veloce di SI, ma supporta anche LLM che non possono essere accelerati con SI. Le nostre simulazioni mostrano accelerazioni di LLM pronti all'uso in contesti realistici: DSI è 1,29-1,92 volte più veloce di 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.
PDF180February 8, 2026