ChatPaper.aiChatPaper

Ouroboros: Speculatieve Decodering met Verbeterde Conceptvorming door Grote Modellen

Ouroboros: Speculative Decoding with Large Model Enhanced Drafting

February 21, 2024
Auteurs: Weilin Zhao, Yuxiang Huang, Xu Han, Chaojun Xiao, Zhiyuan Liu, Maosong Sun
cs.AI

Samenvatting

Decoderingmethoden die eerst ontwerpen en vervolgens verifiëren, zoals speculatieve decodering, zijn veelgebruikte trainingsvrije methoden om de inferentie van grote taalmmodellen (LLM's) te versnellen. In plaats van een autoregressief proces te gebruiken om tokens sequentieel te decoderen, maakt speculatieve decodering eerst ontwerpen met een efficiënt klein model. Vervolgens moeten LLM's verificatie en correctie uitvoeren op een niet-autoregressieve manier om de tijdsbelasting te minimaliseren. Het genereren van langere ontwerpen kan leiden tot nog significantere snelheidswinsten zodra deze zijn geverifieerd, maar brengt ook aanzienlijke kosten voor trial en error met zich mee als het mislukt. Door de hoge kans op verificatiefouten kunnen bestaande decoderingmethoden niet te veel inhoud in één keer ontwerpen voor verificatie, wat resulteert in suboptimale inferentieversnelling. In dit artikel introduceren we Ouroboros, dat een pool van zinscandidaten construeert uit het verificatieproces van LLM's om kandidaten te bieden voor het ontwerp van het kleine model. Hierdoor kan Ouroboros de efficiëntie en effectiviteit van de initiële ontwerpen verder verbeteren. De experimentele resultaten op typische tekstgeneratietaken laten zien dat Ouroboros snelheidswinsten bereikt van respectievelijk 1,9x en 2,8x in vergelijking met lookahead decodering en speculatieve decodering. De broncode van Ouroboros is beschikbaar op https://github.com/thunlp/Ouroboros.
English
Drafting-then-verifying decoding methods such as speculative decoding are widely adopted training-free methods to accelerate the inference of large language models (LLMs). Instead of employing an autoregressive process to decode tokens sequentially, speculative decoding initially creates drafts with an efficient small model. Then LLMs are required to conduct verification and correction in a non-autoregressive fashion to minimize time overhead. Generating longer drafts can lead to even more significant speedups once verified, but also incurs substantial trial and error costs if it fails. Suffering from the high verification failure probability, existing decoding methods cannot draft too much content for verification at one time, achieving sub-optimal inference acceleration. In this paper, we introduce Ouroboros, which constructs a phrase candidate pool from the verification process of LLMs to provide candidates for draft generation of the small model. Thereby, Ouroboros can further improve the efficiency and effectiveness of the initial drafts. The experimental results on typical text generation tasks show that Ouroboros achieves speedups of up to 1.9x and 2.8x compared to lookahead decoding and speculative decoding, respectively. The source code of Ouroboros is available at https://github.com/thunlp/Ouroboros.
PDF71December 15, 2024