about
Training-Free Long-Context Scaling of Large Language Models (arxiv.org)
2 points by helloericsf on Apr 23, 2024 | hide | past | pdf | discuss on HN

In plain words: Without retraining on long texts, this splits the model's word-linking into chunks and tracks each token's position inside and across chunks, letting a 70B model handle over 100k tokens. It matched or beat retrained models on long tasks, reaching 94% of a proprietary model.

Abstract

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 \url{https://github.com/HKUNLP/ChunkLlama}.

Chenxin An, Fei Huang, Jun Zhang, Shansan Gong, Xipeng Qiu, Chang Zhou, Lingpeng Kong
arXiv:2402.17463 · cs.CL · submitted Feb 27, 2024 · updated May 29, 2024
abstract · pdf · html

add comment on HN
Also discussed: Apr 2024 (1 point, 0 comments)