TensorX
返回文献探索

Paper · arXiv 2311.08263

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

Hongxuan Zhang, Zhining Liu, Jiaqi Zheng, Chenyi Zhuang, Jinjie Gu, Guihai Chen

16 upvotesNovember 14, 2023arXiv 预印本
AI 摘要

FastCoT, a model-agnostic framework, leverages parallel decoding with a dynamic context window to reduce inference time for large language models without significant performance degradation.

FastCoTparallel decodingcontext windowLLMauto-regressive decodingcausal transformersKV-cachebatch processing

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Fast Chain-of-Thought: A Glance of Future from Parallel Decoding Leads to Answers Faster | TensorX