YuLan: An Open-source Large Language Model

Yutao Zhu, Kun Zhou, Kelong Mao, Wentong Chen, Yiding Sun, Zhipeng Chen, Qian Cao, Yihan Wu, Yushuo Chen, Feng Wang, Lei Zhang, Junyi Li, Xiaolei Wang, Lei Wang, Beichen Zhang, Zican Dong, Xiaoxue Cheng, Yuhan Chen, Xinyu Tang, Yupeng Hou, Qiangqiang Ren, Xincheng Pang, Shufang Xie, Wayne Xin Zhao, Zhicheng Dou, Jiaxin Mao, Yankai Lin, Ruihua Song, Jun Xu, Xu Chen, Rui Yan, Zhewei Wei, Di Hu, Wenbing Huang, Ze-Feng Gao, Yueguo Chen, Weizheng Lu, Ji-Rong WenarXiv 2024 · DOI

TL;DR

This paper introduces YuLan, a 12-billion parameter open-source LLM trained on a massive, diverse corpus of multilingual text. YuLan employs a novel three-stage pre-training strategy with curriculum learning to enhance its capabilities, achieving performance on par with state-of-the-art models across various benchmarks, particularly in Chinese language tasks.

What Problem Does This Paper Address?

The rapid advancement of Large Language Models (LLMs) has led to their widespread adoption in numerous applications. However, a significant barrier to further research and development in the open-source community is the lack of detailed training information for existing LLMs. This often stems from the proprietary nature of industry technology and the substantial computational resources required for training. This paper aims to bridge this gap by providing a comprehensive technical roadmap and detailed insights into the training process of YuLan, an open-source LLM.

Methods

YuLan's development involved a multi-stage training process:

  • Pre-training: A three-stage approach was used:
  • Standard Pre-training: Initial training on a diverse corpus.
  • Capability-Enhanced Pre-training: Focused on improving performance on comprehensive benchmarks by incorporating educational assessments and increasing context length.
  • Long-tail Knowledge-Aware Pre-training: A novel strategy to identify and augment knowledge gaps by synthesizing question-answer pairs and retrieving relevant data.
  • Curriculum Learning: A key innovation is the use of curriculum learning across all stages. This involves structuring the training data from simpler to more complex tasks, enabling the model to learn progressively.
  • Instruction-Tuning: The model is fine-tuned on synthesized instruction data, progressing from simple to complex multi-turn tasks.
  • Human Alignment: A Direct Preference Optimization (DPO) based reward function is used to estimate instance difficulty, followed by an easy-to-hard curriculum for human alignment.
  • Tokenizer Enhancement: The original LLaMA tokenizer was expanded with Chinese tokens to improve efficiency and input length for Chinese texts.
  • Architecture: YuLan follows the LLaMA architecture, utilizing SwiGLU activation and RMSNorm for normalization.

Datasets

YuLan was trained on a diverse corpus including:

  • Pre-training Data: Approximately 1.7T tokens from a mixture of English, Chinese, and multilingual texts, sourced from:
  • Web Pages (OpenWebText2, C4, RefinedWeb, CC-100, ClueWeb 22, CC-Stories, Dolma's CC, Common Crawl)
    • Code (The Stack, GitHub)
    • Encyclopedias (Wikipedia, Baidu Encyclopedia)
    • Academic Papers (arXiv, peS2o)
    • QA Forums (Stack Exchange, Zhihu)
    • Books (Books3, Project Gutenberg, CBook, Bestsellers, English and Chinese textbooks)
    • News Articles (CC-news, RealNews, CICG)
    • Legal Documents (China Judgments Online)
    • Patents (WanJuan corpus)
    • Educational Assessments (Chinese exam questions from WanJuan corpus)
  • Instruction-Tuning Data: A combination of existing datasets (Flan-v2, OpenOrca, xP3, MetaMathQA, MathInstruct, ShareGPT) and synthesized complex multi-turn instructions.
  • Human Alignment Data: Aggregated datasets including HH-RLHF, Stanford SHP, BeaverTails, Synthetic GPT-j, UltraFeedback, and CValues.

Evaluation Benchmarks: The paper evaluates YuLan on various benchmarks including BoolQ, PIQA, Hellaswag, WinoGrande, WSC273, ARC-easy, ARC-challenge, OpenBookQA, CommonSenseQA, TriviaQA, RACE, CoQA, CMRC2018, C3, GSM8K, AQUA-RAT, MMLU, C-Eval, and Gaokao.

Key Insights and Ideas

  • Curriculum Learning is Crucial: The paper strongly emphasizes the effectiveness of curriculum learning across pre-training, instruction tuning, and human alignment stages. By progressively increasing task complexity, YuLan demonstrates improved learning efficiency and overall capability.
  • Long-tail Knowledge is a Challenge: Identifying and addressing "long-tail" knowledge gaps is a significant challenge. YuLan's novel strategy of synthesizing Q&A pairs and using TF-IDF for retrieval shows promise in improving performance on less common topics.
  • Chinese Language Performance: YuLan achieves competitive performance on Chinese benchmarks, highlighting the importance of incorporating diverse multilingual data and specific strategies for Chinese language processing.
  • Data Diversity Matters: The study shows that a diverse mix of data sources, including high-quality, web, news, and law data, is essential for balanced performance across different tasks and languages.
  • Educational Assessments Boost Performance: Incorporating educational assessments, especially in Chinese, significantly improved performance on comprehensive benchmarks like MMLU, suggesting a valuable cross-lingual transfer of knowledge.

Key Results

  • YuLan (12B parameters) achieves performance on par with state-of-the-art LLMs across various English and Chinese benchmarks.
  • The model demonstrates strong performance on commonsense reasoning tasks, particularly on BoolQ, OBQA, and CommonsenseQA.
  • YuLan-Chat shows a win rate exceeding 55% on AlpacaEval, indicating superior alignment with human preferences.
  • The paper presents a detailed technical roadmap for developing LLMs from scratch, offering valuable insights for the research community.

Limitations and Future Work

  • Computational Resources: The authors acknowledge that their computational resources were limited, preventing them from training LLMs with very long contexts from scratch. They adopted a strategy of increasing context length during training.
  • Data Quality Gaps: Despite extensive preprocessing, gaps in data quality are still attributed to performance differences compared to other advanced LLMs, particularly in factual knowledge.
  • Instruction Tuning Impact: The paper notes that instruction tuning and human alignment might affect LLMs' utilization of knowledge, suggesting further exploration is needed.
  • Future Work: The paper aims to foster innovation and transparency in AI research, implying that further development and exploration of LLM training techniques are ongoing. The availability of their model and code encourages future research.

Summary updated

BibTeX
@misc{zhu2024yulan,
  author = {Yutao Zhu and Kun Zhou and Kelong Mao and Wentong Chen and Yiding Sun and Zhipeng Chen and Qian Cao and Yihan Wu and Yushuo Chen and Feng Wang and Lei Zhang and Junyi Li and Xiaolei Wang and Lei Wang and Beichen Zhang and Zican Dong and Xiaoxue Cheng and Yuhan Chen and Xinyu Tang and Yupeng Hou and Qiangqiang Ren and Xincheng Pang and Shufang Xie 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 Ze-Feng Gao and Yueguo Chen and Weizheng Lu and Ji-Rong Wen},
  title = {{YuLan: An Open-source Large Language Model}},
  year = {2024},
  eprint = {2406.19853},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.19853},
}
Figure