TensorX
返回文献探索

Paper · arXiv 2408.11745

FocusLLM: Scaling LLM's Context by Parallel Decoding

Zhenyu Li, Yike Zhang, Tengyu Pan, Yutao Sun, Zhichao Duan, Junjie Fang, Rong Han, Zixuan Wang, Jianyong Wang

25 upvotesAugust 21, 2024arXiv 预印本
AI 摘要

FocusLLM extends the context length of decoder-only LLMs efficiently by chunking long texts and using a parallel decoding mechanism to enhance performance on long-context tasks.

LLMsdecoder-onlycontext lengthattention distractionparallel decoding机制language modeling ability

Abstract

Empowering LLMs with the ability to utilize useful information from a long context is crucial for many downstream applications. However, achieving long context lengths with the conventional transformer architecture requires substantial training and inference resources. In this paper, we present FocusLLM, a framework designed to extend the context length of any decoder-only LLM, enabling the model to focus on relevant information from very long sequences. FocusLLM processes long text inputs by dividing them into chunks based on the model's original context length to alleviate the issue of attention distraction. Then, it appends the local context to each chunk as a prompt to extract essential information from each chunk based on a novel parallel decoding mechanism, and ultimately integrates the extracted information into the local context. FocusLLM stands out for great training efficiency and versatility: trained with an 8K input length with much less training cost than previous methods, FocusLLM exhibits superior performance across downstream long-context tasks and maintains strong language modeling ability when handling extensive long texts, even up to 400K tokens. Our code is available at https://github.com/leezythu/FocusLLM.

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

京ICP备2026059466号
FocusLLM: Scaling LLM's Context by Parallel Decoding | TensorX