ChatPaper.aiChatPaper

Распределенное спекулятивное вывода больших языковых моделей

Distributed Speculative Inference of Large Language Models

May 23, 2024
Авторы: Nadav Timor, Jonathan Mamou, Daniel Korat, Moshe Berchansky, Oren Pereg, Moshe Wasserblat, Tomer Galanti, Michal Gordon, David Harel
cs.AI

Аннотация

Ускорение вывода больших языковых моделей (LLM) является важной задачей в искусственном интеллекте. В данной статье представлен распределенный спекулятивный вывод (DSI), новый алгоритм распределенного вывода, который доказанно быстрее, чем спекулятивный вывод (SI) [leviathan2023fast, chen2023accelerating, miao2023specinfer] и традиционный авторегрессионный вывод (не-SI). Как и другие алгоритмы SI, DSI работает с замороженными LLM, не требуя обучения или архитектурных модификаций, и сохраняет целевое распределение. Предыдущие исследования по SI продемонстрировали эмпирическое ускорение (по сравнению с не-SI), но требуют быстрого и точного чернового LLM. На практике готовые LLM часто не имеют соответствующих чернов, которые были бы достаточно быстрыми и точными. Мы показываем разрыв: SI замедляется по сравнению с не-SI при использовании медленных или менее точных чернов. Мы устраняем этот разрыв, доказывая, что DSI быстрее как SI, так и не-SI при любых черновых. Оркестрируя несколько экземпляров целевого и черновых моделей, DSI не только быстрее SI, но также поддерживает LLM, которые не могут быть ускорены с помощью SI. Наши симуляции показывают ускорение готовых LLM в реалистичных условиях: DSI быстрее SI на 1.29-1.92 раза.
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