TL;DR
This paper introduces XGen-7B, a family of open-source 7-billion parameter Large Language Models (LLMs) capable of processing sequences up to 8,192 tokens. By training on a massive 1.5 trillion tokens and employing a novel stage-wise training approach, XGen-7B significantly advances the state-of-the-art for open-source LLMs, particularly in handling long contexts, while also achieving competitive performance on standard benchmarks.
What Problem Does This Paper Address?
The LLM landscape is dominated by proprietary models, limiting scientific progress and accessibility. While open-source LLMs are emerging, many are constrained by shorter sequence lengths (typically 2K tokens), which is a critical bottleneck for tasks requiring understanding of extensive context, such as document analysis, code generation, and complex reasoning. This paper aims to bridge this gap by developing powerful, open-source LLMs that can effectively handle much longer sequences.
Methods
The core of XGen-7B's development lies in its innovative training methodology:
- Stage-wise Training for Long Sequences: To efficiently train models on longer sequences (up to 8K tokens), XGen-7B employs a stage-wise approach. The model is first trained on shorter sequences (2K tokens), then progressively trained on longer sequences (4K and finally 8K tokens). This allows the model to adapt to increased context lengths without the computational burden of directly training on the longest sequences from the start.
- Massive Token Training: The models are trained on an enormous dataset of up to 1.5 trillion tokens, which is crucial for achieving high performance and generalization capabilities.
- Instruction Tuning: After pre-training, XGen-7B models are further fine-tuned on public-domain instructional datasets to create instruction-tuned variants (XGen-7B-Inst). This process aligns the models to better follow user instructions and perform a wider range of tasks.
- Architecture: The model architecture is based on LLaMA, ensuring compatibility with existing frameworks, with some modifications like an increased vocabulary size.
Datasets
XGen-7B was trained on a diverse mix of publicly available datasets:
- Pre-training Data:
- Stage 1: A mixture of natural language data and code data (from RedPajama and Apex).
- Stage 2: A combination of data from Stage 1 and the BigCode Starcoder dataset, filtered for permissive licenses.
- Instruction Tuning Data:
- XGen-7B-InstwizardLM: Fine-tuned on the WizardLM-196K dataset.
- XGen-7B-Instgeneral: Fine-tuned on a mix of general public domain instruction data including OAsst, Baize, Dolly2, ShareGPT, and importantly, examples from the SCROLLS benchmark specifically curated to have long sequences (at least 4000 tokens).
Key Insights and Ideas
- Long Context is Key: The paper strongly demonstrates that enabling LLMs to process longer sequences (8K tokens vs. 2K tokens) leads to significant improvements in tasks requiring deep contextual understanding.
- Stage-wise Training is Effective: The proposed stage-wise training strategy is crucial for efficiently handling long sequences, allowing models to learn and adapt without prohibitive computational costs.
- Open-Source Powerhouse: XGen-7B proves that open-source models can rival or even surpass proprietary models in key areas, especially when focusing on critical capabilities like long context processing.
- Data Quality Matters: The careful selection and curation of both pre-training and instruction-tuning data, including specific efforts to incorporate long-sequence data, are vital for achieving the observed performance gains.
Key Results
- Benchmark Performance: XGen-7B models achieve comparable or better results than state-of-the-art open-source LLMs on standard benchmarks like MMLU (Massive Multitask Language Understanding), ARC, HellaSwag, and others.
- Long Sequence Tasks: Targeted evaluations on long sequence modeling tasks show a clear benefit of the 8K-sequence XGen-7B models over 2K-sequence models. For instance, in long-form QA and dialogue summarization, XGen-7B-Instgeneral demonstrated superior performance.
- Code Generation: XGen-7B shows competitive performance on the HumanEval benchmark for code generation, achieving a pass@1 score of 14.20, comparable to other leading 7B models.
- Instruction Following: The instruction-tuned variants, XGen-7B-InstwizardLM and XGen-7B-Instgeneral, perform impressively on benchmarks like AlpacaEval and MT-Bench, often outperforming models of similar sizes and even some larger ones.
- Carbon Footprint: The paper also reports a relatively low carbon footprint for training XGen-7B (4.5 tCO2eq), positioning it favorably compared to other large models.
Limitations and Future Work
- Potential Risks: The authors acknowledge that, like all LLMs, XGen-7B models are not free from limitations such as bias, toxicity, and hallucinations. They hope their open-source efforts will help researchers better understand and mitigate these challenges.
- Future Work: The paper implicitly suggests future work in further exploring the capabilities of long-context LLMs, refining instruction-tuning strategies, and potentially scaling XGen-7B to larger parameter sizes. The focus on open-sourcing is also a key aspect for future collaborative advancements.
Summary updated