Skip to main content
QUICK REVIEW

[论文解读] XGen-7B Technical Report

Erik Nijkamp, Tian Xie|arXiv (Cornell University)|Sep 7, 2023
Topic Modeling被引用 4
一句话总结

XGen-7B 是一个在最多 1.5 万亿 token 上预训练的 7B 参数大语言模型,支持 8K 上下文长度,采用两阶段训练流程(2K → 4K → 8K),并使用包含自然语言和代码的多样化数据混合。它在标准基准测试中达到最先进性能,并在长上下文任务(如对话摘要和代码生成)中显著优于 2K 序列的开源模型。

ABSTRACT

Large Language Models (LLMs) have become ubiquitous across various domains, transforming the way we interact with information and conduct research. However, most high-performing LLMs remain confined behind proprietary walls, hindering scientific progress. Most open-source LLMs, on the other hand, are limited in their ability to support longer sequence lengths, which is a key requirement for many tasks that require inference over an input context. To address this, we have trained XGen, a series of 7B parameter models on up to 8K sequence length for up to 1.5T tokens. We have also finetuned the XGen models on public-domain instructional data, creating their instruction-tuned counterparts (XGen-Inst). We open-source our models for both research advancements and commercial applications. Our evaluation on standard benchmarks shows that XGen models achieve comparable or better results when compared with state-of-the-art open-source LLMs. Our targeted evaluation on long sequence modeling tasks shows the benefits of our 8K-sequence models over 2K-sequence open-source LLMs.

研究动机与目标

  • 解决开源 LLM 仅限于 2K 上下文长度的局限性,该局限性会阻碍其在代码生成和文档摘要等长上下文任务中的表现。
  • 通过分阶段预训练,开发一种可扩展、高效的 7B 参数模型,在支持更长上下文长度的同时保持强大性能。
  • 通过开源基础模型和指令微调版本,促进更广泛的科学与商业应用。
  • 通过在多样化公共领域指令数据集上进行监督微调,提升指令遵循能力,增强零样本和少样本泛化性能。

提出的方法

  • 采用两阶段预训练策略:首先在 2K 上下文长度下使用 1.2T token(自然语言 + 代码)进行预训练,然后在 4K 上下文长度下继续训练,最后在 8K 上下文长度下使用额外的 300B token 进行训练。
  • 使用多种数据源的混合,包括来自多样化公共语料库的自然语言、来自 RedPajama 的 GitHub 代码,以及用于代码特定预训练的 BigCode Starcoder,所有数据均采用宽松许可协议。
  • 采用基于 GPT-2 的子词分词(BPE),并添加用于代码和指令微调的特殊标记。
  • 在两个公开指令数据集(WizardLM-196K 和通用指令数据(OAsst、Baize、Dolly2、ShareGPT、SCROLLS))上对 XGen-7B-8K 基础模型进行微调,生成 XGen-7B-Inst 变体。
  • 通过混合精度训练和 TPU 集群上的模型并行化优化训练效率,总训练成本约为 57 MWh,碳排放量为 4.5 吨 CO₂eq。
  • 采用标准的大语言模型评估协议,包括在标准和长上下文基准测试中的困惑度、准确率和 ROUGE 分数。
Figure 1: Cross-entropy over training time. The model is pre-trained in three stages with a step-wise increase of the sequence length from 2K to 4K to 8K tokens. Note, the pre-training does not suffer from any loss spikes. The spikes at the transitions in sequence lengths are expected as the model a
Figure 1: Cross-entropy over training time. The model is pre-trained in three stages with a step-wise increase of the sequence length from 2K to 4K to 8K tokens. Note, the pre-training does not suffer from any loss spikes. The spikes at the transitions in sequence lengths are expected as the model a

实验结果

研究问题

  • RQ1一个在 1.5T token 上训练、采用渐进式上下文长度扩展(2K → 8K)的 7B 参数模型,能否在标准和长上下文基准测试中实现具有竞争力的性能?
  • RQ2XGen-7B 的 8K 上下文长度在长上下文任务(如对话摘要和代码生成)中与 2K 序列的开源模型相比表现如何?
  • RQ3XGen-7B 的指令微调变体在 AlpacaEval 和 MTBench 等指令遵循基准测试中,与同等大小或更大模型相比,性能提升程度如何?
  • RQ4此类模型的环境成本是多少?其能耗和碳排放量与其他大模型相比如何?
  • RQ5像 XGen-7B 这样更小、更高效的模型,是否能在基础模型和指令微调设置下,达到甚至超越更大规模的专有或开源模型的性能?

主要发现

  • XGen-7B-8K 在标准基准测试中达到与最先进开源 LLM 相当或更优的结果,尤其在代码生成任务中表现强劲。
  • 在 AlpacaEval 基准测试中,XGen-7B-Inst(通用版)优于 WizardLM-7B 和 MPT-7B 等模型,甚至超越了更大的 Falcon-40B-instruct 模型。
  • 在 MTBench 基准测试中,XGen-7B-Inst(通用版)在 Mixture-of-Model(MoE)指标上获得 8.25 分,优于 Alpaca-13B 和 Falcon-40B-instruct。
  • 在长对话摘要任务(AMI、FD、TMS)中,XGen-7B-Inst(通用版)在 AMI(5.5K token)上实现了最高的 ROUGE-1 得分 31.34,显著优于未进行输入截断的 MPT-7B-instruct 和 Alpaca-7B。
  • 该模型在长上下文任务中的表现证明了 8K 上下文长度的实际优势,XGen-7B-8K 在建模长距离依赖关系方面明显优于 2K 序列模型。
  • XGen-7B 的碳足迹估计为 4.5 吨 CO₂eq,总能耗为 57 MWh,与其他大型模型相当,但更注重效率和开放获取。
Figure 2: Perplexity over sequence length. If a model can utilize the information encoded in long sequences, then, in expectation, the perplexity should decrease over the length of such sequences. That is, the information contained in previous tokens increases the certainty of the next token predict
Figure 2: Perplexity over sequence length. If a model can utilize the information encoded in long sequences, then, in expectation, the perplexity should decrease over the length of such sequences. That is, the information contained in previous tokens increases the certainty of the next token predict

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。