LongSkywork:一种在大语言模型中高效扩展上下文长度的训练方案
LongSkywork: A Training Recipe for Efficiently Extending Context Length in Large Language Models
AI总结:
本文提出了LongSkywork长上下文大语言模型及其高效训练方案,通过在标准SFT后引入长上下文SFT阶段及两种合成数据方法,显著提升了模型处理20万token的能力,其13B版本性能媲美Claude2.1。
摘要:
我们介绍了LongSkywork,这是一个能够处理多达200,000个token的长上下文大语言模型(LLM)。我们提供了一种高效扩展LLM上下文长度的训练方案。我们发现,增强长上下文处理能力的关键要素是在标准SFT阶段之后引入一个长上下文SFT阶段。仅需200次迭代,即可将标准SFT模型转换为长上下文模型。为了减少为长上下文语言建模收集和标注数据的工作量,我们开发了两种创建合成数据的新方法。这些方法在持续预训练阶段以及监督微调(SFT)阶段均有应用,极大地提升了我们长上下文LLM的训练效率。我们的研究结果表明,合成的长上下文SFT数据在某种程度上能够超越人工整理数据的性能。LongSkywork在多种长上下文基准测试上取得了出色的表现。在Needle测试(一个用于长上下文信息检索的基准测试)中,我们的模型在多个上下文跨度上均达到了完美的准确率。此外,在实际应用场景中,LongSkywork-13B展现出与领先的长上下文模型Claude2.1相当的性能,这凸显了我们提出方法的有效性。
英文摘要:
We introduce LongSkywork, a long-context Large Language Model (LLM) capable of processing up to 200,000 tokens. We provide a training recipe for efficiently extending context length of LLMs. We identify that the critical element in enhancing long-context processing capability is to incorporate a long-context SFT stage following the standard SFT stage. A mere 200 iterations can convert the standard SFT model into a long-context model. To reduce the effort in collecting and annotating data for long-context language modeling, we develop two novel methods for creating synthetic data. These methods are applied during the continual pretraining phase as well as the Supervised Fine-Tuning (SFT) phase, greatly enhancing the training efficiency of our long-context LLMs. Our findings suggest that synthetic long-context SFT data can surpass the performance of data curated by humans to some extent. LongSkywork achieves outstanding performance on a variety of long-context benchmarks. In the Needle test, a benchmark for long-context information retrieval, our models achieved perfect accuracy across multiple context spans. Moreover, in realistic application scenarios, LongSkywork-13B demonstrates performance on par with Claude2.1, the leading long-context model, underscoring the effectiveness of our proposed methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。