基础模型的有效长上下文扩展
Effective Long-Context Scaling of Foundation Models
AI总结:
本文通过从Llama 2持续预训练构建支持32,768令牌上下文的长上下文LLM,在长上下文任务上超越gpt-3.5-turbo-16k,并分析了位置编码与预训练设计的影响。
摘要:
我们提出了一系列支持有效上下文窗口高达32,768个令牌的长上下文LLM。我们的模型系列是通过从Llama 2进行持续预训练构建的,使用更长的训练序列,并在长文本被上采样的数据集上进行。我们在语言建模、合成上下文探测任务以及广泛的研究基准上进行了广泛评估。在研究基准上,我们的模型在大多数常规任务上取得了持续的改进,并在长上下文任务上相对于Llama 2取得了显著改进。值得注意的是,通过一种不需要人工标注长指令数据的成本效益高的指令微调程序,70B变体在长上下文任务套件上的整体性能已经可以超越gpt-3.5-turbo-16k。除了这些结果,我们对方法的各个组成部分进行了深入分析。我们深入研究了Llama的位置编码,并讨论了其在建模长依赖关系方面的局限性。我们还考察了预训练过程中各种设计选择的影响,包括数据混合和序列长度的训练课程——我们的消融实验表明,在预训练数据集中拥有丰富的长文本并不是实现强性能的关键,并且我们实证验证了长上下文持续预训练比从头开始使用长序列预训练更高效且同样有效。
英文摘要:
We present a series of long-context LLMs that support effective context windows of up to 32,768 tokens. Our model series are built through continual pretraining from Llama 2 with longer training sequences and on a dataset where long texts are upsampled. We perform extensive evaluation on language modeling, synthetic context probing tasks, and a wide range of research benchmarks. On research benchmarks, our models achieve consistent improvements on most regular tasks and significant improvements on long-context tasks over Llama 2. Notably, with a cost-effective instruction tuning procedure that does not require human-annotated long instruction data, the 70B variant can already surpass gpt-3.5-turbo-16k's overall performance on a suite of long-context tasks. Alongside these results, we provide an in-depth analysis on the individual components of our method. We delve into Llama's position encodings and discuss its limitation in modeling long dependencies. We also examine the impact of various design choices in the pretraining process, including the data mix and the training curriculum of sequence lengths -- our ablation experiments suggest that having abundant long texts in the pretrain dataset is not the key to achieving strong performance, and we empirically verify that long context continual pretraining is more efficient and similarly effective compared to pretraining from scratch with long sequences.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。