ChatPaper.aiChatPaper

빠른 사고 연쇄: 병렬 디코딩 리드가 더 빠른 답변으로 이어지는 미래의 단초

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

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

초록

본 연구에서는 추가적인 보조 모델 훈련이나 대형 언어 모델(LLM) 자체의 수정 없이 병렬 디코딩(parallel decoding)을 기반으로 한 모델-불문 프레임워크인 FastCoT를 제안합니다. FastCoT는 위치에 따라 크기가 변하는 가변 크기 컨텍스트 창을 사용하여 병렬 디코딩과 자기회귀 디코딩(auto-regressive decoding)을 동시에 수행함으로써 GPU 계산 자원을 최대한 활용합니다. FastCoT에서 병렬 디코딩 부분은 LLM에 근사 토큰으로 구성된 미래를 빠르게 살펴볼 수 있게 하여, 인과적 트랜스포머(causal transformer)가 사용하는 일반적인 자기회귀 디코딩에 비해 더 빠른 답변을 이끌어낼 수 있습니다. 또한, LLM 내부에서 KV 캐시 생성과 배치 처리를 지원하는 병렬 디코딩 구현을 제공합니다. 광범위한 실험을 통해 FastCoT가 일반적인 접근 방식에 비해 성능 저하가 거의 없으면서도 추론 시간을 약 20% 절약할 수 있음을 입증했습니다. 더불어, 컨텍스트 창 크기가 다양한 작업에 대해 상당한 견고성을 보인다는 점도 확인했습니다.
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