ChatPaper.aiChatPaper

Naar Optimale Multi-Concept Speculatieve Decodering

Towards Optimal Multi-draft Speculative Decoding

February 26, 2025
Auteurs: Zhengmian Hu, Tong Zheng, Vignesh Viswanathan, Ziyi Chen, Ryan A. Rossi, Yihan Wu, Dinesh Manocha, Heng Huang
cs.AI

Samenvatting

Grote Taalmodellen (LLM's) zijn een onmisbaar onderdeel geworden van taken voor natuurlijke taalverwerking. Autoregressieve bemonstering is echter een efficiëntieknelpunt geworden. Multi-Concept Speculatief Decoderen (MDSD) is een recente benadering waarbij bij het genereren van elk token een kleine conceptuele model meerdere concepten genereert, en het doel-LLM controleert ze parallel, zodat de uiteindelijke output overeenkomt met de doelmodelverdeling. De twee belangrijkste ontwerpkeuzes in MDSD zijn de conceptbemonsteringsmethode en het verificatiealgoritme. Voor een vaste conceptbemonsteringsmethode is het optimale acceptatiepercentage een oplossing voor een optimaal transportprobleem, maar de complexiteit van dit probleem maakt het moeilijk om het optimale acceptatiepercentage op te lossen en het verschil te meten tussen bestaande verificatiealgoritmen en de theoretische bovengrens. Dit artikel bespreekt de dualiteit van het optimale transportprobleem, waardoor het mogelijk is om het optimale acceptatiepercentage efficiënt te berekenen. Voor het eerst meten we de theoretische bovengrens van de efficiëntie van MDSD voor woordenschatgroottes in de duizenden en kwantificeren we het verschil tussen bestaande verificatiealgoritmen en deze bovengrens. We vergelijken ook verschillende conceptbemonsteringsmethoden op basis van hun optimale acceptatiepercentages. Onze resultaten tonen aan dat de conceptbemonsteringsmethode sterk van invloed is op het optimale acceptatiepercentage, waarbij bemonstering zonder vervanging beter presteert dan bemonstering met vervanging. Bovendien bereiken bestaande verificatiealgoritmen niet de theoretische bovengrens voor zowel bemonstering zonder vervanging als met vervanging. Onze bevindingen suggereren dat zorgvuldig ontworpen conceptbemonsteringsmethoden potentieel het optimale acceptatiepercentage kunnen verbeteren en de ontwikkeling van verificatiealgoritmen mogelijk maken die nauw aansluiten bij de theoretische bovengrens.
English
Large Language Models (LLMs) have become an indispensable part of natural language processing tasks. However, autoregressive sampling has become an efficiency bottleneck. Multi-Draft Speculative Decoding (MDSD) is a recent approach where, when generating each token, a small draft model generates multiple drafts, and the target LLM verifies them in parallel, ensuring that the final output conforms to the target model distribution. The two main design choices in MDSD are the draft sampling method and the verification algorithm. For a fixed draft sampling method, the optimal acceptance rate is a solution to an optimal transport problem, but the complexity of this problem makes it difficult to solve for the optimal acceptance rate and measure the gap between existing verification algorithms and the theoretical upper bound. This paper discusses the dual of the optimal transport problem, providing a way to efficiently compute the optimal acceptance rate. For the first time, we measure the theoretical upper bound of MDSD efficiency for vocabulary sizes in the thousands and quantify the gap between existing verification algorithms and this bound. We also compare different draft sampling methods based on their optimal acceptance rates. Our results show that the draft sampling method strongly influences the optimal acceptance rate, with sampling without replacement outperforming sampling with replacement. Additionally, existing verification algorithms do not reach the theoretical upper bound for both without replacement and with replacement sampling. Our findings suggest that carefully designed draft sampling methods can potentially improve the optimal acceptance rate and enable the development of verification algorithms that closely match the theoretical upper bound.
PDF52February 27, 2025