Abstract
Various large language models (LLMs) have been proposed in recent years, continually setting new records on multiple benchmarks. However, the development of LLMs still faces several issues, such as the high cost of training models from scratch and the risk of catastrophic forgetting during continual pre-training. While many studies focus on enlarging model sizes, they often overlook the optimization of pre-training data. In this work, we propose Ziya2, a 13-billion parameter model based on LLaMA2, further pre-trained on 700 billion tokens. By focusing on data-centric optimization across different training stages, Ziya2 significantly outperforms other models in multiple benchmarks, particularly in Chinese language tasks and mathematical reasoning.
Introduction
The current trajectory of LLM development often prioritizes "scaling up"—increasing parameter counts and raw data volume. However, this approach faces significant hurdles: prohibitive training costs, the challenge of catastrophic forgetting in continual pre-training, and a lack of transparency regarding data-cleaning methodologies. Ziya2 addresses these issues by shifting the focus from model size to data-centric learning: the strategic selection, cleaning, and sequencing of data to maximize learning efficiency within cost-effective settings.
Methodology: Structural Stability and Multi-Stage Training
Ziya2 utilizes LLaMA2-13B as its foundation, undergoing continual pre-training on an additional 700 billion tokens. To ensure stability and efficiency, the researchers implemented several structural and procedural enhancements.
Structural Enhancements
To better handle Chinese text, the vocabulary was expanded by 7,400 tokens, improving encoding efficiency by approximately 34%. Furthermore, to prevent training instabilities like "loss spikes" common in mixed-precision training, critical components such as Rotary Position Embeddings (RoPE) and Layer Normalization were shifted to FP32 precision to ensure stability over long training runs.
The Three-Stage Training Pipeline
Rather than a monolithic training phase, Ziya2 employs a curriculum-based approach:
- Stage 1 (Unsupervised): 650B tokens of high-quality English and Chinese text for general knowledge acquisition.
- Stage 2 (Supervised): 29B tokens of diverse tasks (classification, reasoning, Q&A) to enhance pattern-following.
- Stage 3 (Specialized): 0.1B tokens focused on mathematical reasoning (MetaMath) to bolster logic.
Data-Centric Scaling Laws
A core contribution of the Ziya2 project is the exploration of "Data-centric Scaling Laws." Beyond the traditional variables of compute and parameters, the authors identify Coherence, Readability, and Similarity as critical factors. Their findings suggest that improving the grammatical and semantic quality of data (coherence and readability) is more effective for reducing model loss than simply increasing data similarity to specific test sets.
Experimental Results
Ziya2-13B demonstrates substantial improvements over the original LLaMA2-13B across various domains:
- Mathematics: Scores on GSM8K and MATH increased by 138% and 120%, respectively.
- Coding: Performance on HumanEval improved by 89%.
- Bilingual Proficiency: On Chinese benchmarks (CMMLU and C-Eval), Ziya2 saw gains of 61% and 68%, even surpassing GPT-3.5-turbo.
Conclusion and Future Work
Ziya2 proves that data-centric optimization allows a 13B parameter model to compete with much larger architectures. While the current "Base" model is a powerful foundation, future work will focus on instruction tuning (Ziya2-Chat), scaling to a 70B parameter version, and expanding into multimodal capabilities.
Summary updated