ChatPaper.aiChatPaper

Snelle Gedachteketting: Een Blik op de Toekomst vanuit Parallel Decoderen Leidt tot Snellere Antwoorden

Fast Chain-of-Thought: A Glance of Future from Parallel Decoding Leads to Answers Faster

November 14, 2023
Auteurs: Hongxuan Zhang, Zhining Liu, Jiaqi Zheng, Chenyi Zhuang, Jinjie Gu, Guihai Chen
cs.AI

Samenvatting

In dit werk stellen we FastCoT voor, een model-agnostisch raamwerk gebaseerd op parallelle decodering zonder aanvullende training van een hulpmodel of aanpassingen aan het LLM zelf. FastCoT gebruikt een contextvenster met variabele grootte dat verandert met de positie om parallelle decodering en autoregressieve decodering gelijktijdig uit te voeren, waardoor de GPU-rekenbronnen optimaal worden benut. In FastCoT biedt het parallelle decoderinggedeelte het LLM een snelle blik op de toekomst, bestaande uit benaderende tokens, wat kan leiden tot snellere antwoorden vergeleken met de reguliere autoregressieve decodering die door causale transformers wordt gebruikt. We bieden ook een implementatie van parallelle decodering binnen het LLM, die KV-cache-generatie en batchverwerking ondersteunt. Door uitgebreide experimenten tonen we aan dat FastCoT de inferentietijd met bijna 20% verkort, met slechts een verwaarloosbare prestatievermindering vergeleken met de reguliere aanpak. Daarnaast laten we zien dat de grootte van het contextvenster aanzienlijke robuustheid vertoont voor verschillende taken.
English
In this work, we propose FastCoT, a model-agnostic framework based on parallel decoding without any further training of an auxiliary model or modification to the LLM itself. FastCoT uses a size-varying context window whose size changes with position to conduct parallel decoding and auto-regressive decoding simultaneously, thus fully utilizing GPU computation resources. In FastCoT, the parallel decoding part provides the LLM with a quick glance of the future composed of approximate tokens, which could lead to faster answers compared to regular autoregressive decoding used by causal transformers. We also provide an implementation of parallel decoding within LLM, which supports KV-cache generation and batch processing. Through extensive experiments, we demonstrate that FastCoT saves inference time by nearly 20% with only a negligible performance drop compared to the regular approach. Additionally, we show that the context window size exhibits considerable robustness for different tasks.
PDF160December 15, 2024