Towards Effective and Efficient Continual Pre-training of Large Language Models

Jie Chen, Zhipeng Chen, Jiapeng Wang, Kun Zhou, Yutao Zhu +14 more
7/26/2024
cs.CL

Official code: RUC-GSAI/Llama-3-SynE (40 stars, Apache-2.0, last commit 2025-05-31).

Abstract

Continual pre-training (CPT) has been an important approach for adapting language models to specific domains or tasks. To make the CPT approach more traceable, this paper presents a technical report for continually pre-training Llama-3 (8B), which significantly enhances the Chinese language ability and scientific reasoning ability of the backbone model. To enhance the new abilities while retaining the original abilities, we design specific data mixture and curriculum strategies by utilizing existing datasets and synthesizing high-quality datasets. Specifically, we synthesize multidisciplinary scientific question and answer (QA) pairs based on related web pages, and subsequently incorporate these synthetic data to improve the scientific reasoning ability of Llama-3. We refer to the model after CPT as Llama-3-SynE (Synthetic data Enhanced Llama-3). We also present the tuning experiments with a relatively small model -- TinyLlama, and employ the derived findings to train the backbone model. Extensive experiments on a number of evaluation benchmarks show that our approach can largely improve the performance of the backbone models, including both the general abilities (+8.81 on C-Eval and +6.31 on CMMLU) and the scientific reasoning abilities (+12.00 on MATH and +4.13 on SciEval), without hurting the original capacities. Our model, data, and codes are available at https://github.com/RUC-GSAI/Llama-3-SynE.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Llama-3-SynE: A Significantly Enhanced Version of Llama-3 with Advanced Scientific Reasoning and Chinese Language Capabilities | 继续预训练提升 Llama-3 的科学推理和中文能力

404Shell, PythonJul 24, 20241 years agoApache-2.0
chinesecontinual-pre-traininglarge-language-modelreasoningscience

Similar Papers

Cite this paper

@article{chen2024towards,
  title  = {Towards Effective and Efficient Continual Pre-training of Large Language Models},
  author = {Jie Chen and Zhipeng Chen and Jiapeng Wang and Kun Zhou and Yutao Zhu and Jinhao Jiang and Yingqian Min and Wayne Xin Zhao and Zhicheng Dou and Jiaxin Mao and Yankai Lin and Ruihua Song and Jun Xu and Xu Chen and Rui Yan and Zhewei Wei and Di Hu and Wenbing Huang and Ji-Rong Wen},
  year   = {2024},
  eprint = {2407.18743},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.18743v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.18743.svg)](https://codeofpaper.com/paper/2407.18743)

Discussion