title: Training-Free Long-Context Scaling of Large Language Models
summary: The ability of Large Language Models (LLMs) to process and generate coherent
  text is markedly weakened when the number of input tokens exceeds their
  pretraining length. Given the expensive overhead of finetuning large-scale
  models with longer sequences, we propose Dual Chunk Attention (DCA), which
  enables Llama2 70B to support context windows of more than 100k tokens without
  continual training. By decomposing the attention computation for long sequences
  into chunk-based modules, DCA manages to effectively capture the relative
  positional information of tokens within the same chunk (Intra-Chunk) and across
  distinct chunks (Inter-Chunk), as well as integrates seamlessly with Flash
  Attention. In addition to its impressive extrapolation capability, DCA achieves
  performance on practical long-context tasks that is comparable to or even
  better than that of finetuned models. When compared with proprietary models,
  our training-free 70B model attains 94% of the performance of gpt-3.5-16k,
  indicating it is a viable open-source alternative. All code and data used in
  this work are released at https://github.com/HKUNLP/ChunkLlama.
paper_authors._id: 65dea1e31403407a305b5e6d
paper_authors.name: Chenxin An
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-02-28T08:27:33.271Z
paper_authors._id: 64acb321264bbbf171a2b040
paper_authors.avatarUrl: /avatars/0ad344c0e9b1e3fda469932f91d117dc.svg
paper_authors.fullname: Chenxin An
paper_authors.type: user
paper_authors.user: Chancy
paper_authors._id: 65dea1e31403407a305b5e6e
paper_authors.name: Fei Huang
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-02-28T12:52:57.853Z
paper_authors._id: 635b8b6a37c6a2c12e2cce00
paper_authors.avatarUrl: /avatars/229fb72180529141515d1df797b33709.svg
paper_authors.fullname: Fei Huang
paper_authors.type: user
paper_authors.user: hzhwcmhf
paper_authors._id: 65dea1e31403407a305b5e6f
paper_authors.name: Jun Zhang
paper_authors._id: 65dea1e31403407a305b5e70
paper_authors.name: Shansan Gong
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-10-24T07:16:32.608Z
paper_authors._id: 628c83d186fc004b14e1ed48
paper_authors.avatarUrl: /avatars/05ff943a9b89b5f67c5bc254bf45b8f5.svg
paper_authors.fullname: Shansan Gong
paper_authors.type: user
paper_authors.user: Sansa
paper_authors._id: 65dea1e31403407a305b5e71
paper_authors.name: Xipeng Qiu
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-02-28T12:54:02.882Z
paper_authors._id: 61457b8deff2c9fdb4de4988
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1632381702899-61457b8deff2c9fdb4de4988.jpeg
paper_authors.fullname: Xipeng Qiu
paper_authors.type: user
paper_authors.user: xpqiu
paper_authors._id: 65dea1e31403407a305b5e72
paper_authors.name: Chang Zhou
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-02-28T12:54:16.511Z
paper_authors._id: 622892774323cef93a956a4a
paper_authors.avatarUrl: /avatars/e57ef5c3b0c4289988ccd42f14e54336.svg
paper_authors.fullname: chang zhou
paper_authors.type: user
paper_authors.user: jiemizc
paper_authors._id: 65dea1e31403407a305b5e73
paper_authors.name: Lingpeng Kong
paper_title: Training-Free Long-Context Scaling of Large Language Models
paper_summary: The ability of Large Language Models (LLMs) to process and generate coherent
  text is markedly weakened when the number of input tokens exceeds their
  pretraining length. Given the expensive overhead of finetuning large-scale
  models with longer sequences, we propose Dual Chunk Attention (DCA), which
  enables Llama2 70B to support context windows of more than 100k tokens without
  continual training. By decomposing the attention computation for long sequences
  into chunk-based modules, DCA manages to effectively capture the relative
  positional information of tokens within the same chunk (Intra-Chunk) and across
  distinct chunks (Inter-Chunk), as well as integrates seamlessly with Flash
  Attention. In addition to its impressive extrapolation capability, DCA achieves
  performance on practical long-context tasks that is comparable to or even
  better than that of finetuned models. When compared with proprietary models,
  our training-free 70B model attains 94% of the performance of gpt-3.5-16k,
  indicating it is a viable open-source alternative. All code and data used in
  this work are released at https://github.com/HKUNLP/ChunkLlama.
paper_ai_summary: Dual Chunk Attention (DCA) enhances Llama2 70B to handle over 100k tokens without fine-tuning by decomposing attention into chunk-based modules, achieving performance comparable to finetuned models.
paper_ai_keywords: Large Language Models (LLMs) input tokens pretraining length finetuning Dual Chunk Attention (DCA) context windows attention computation chunk-based modules relative positional information Flash Attention extrapolation capability practical long-context tasks training-free model gpt-3.5-16k open-source alternative