Awesome LLM pre-training resources, including data, frameworks, and methods.
406
15 commits
updated Apr 29, 2025
中文版 | English Version
Pre-training is the first and most crucial training stage in the development of large language models. As the open-source community continues to improve in areas such as model architecture, training strategies, open-source datasets, and data methods, we are committed to continuously tracking resources available for large model pre-training to give back to developers in the open-source large language model community.
Compared to comprehensive reviews, our scope is limited to commonly used resources and cutting-edge attempts related to pre-training, aiming to help users quickly get started with large language model pre-training. We also welcome contributions and updates from the open-source community to jointly promote the development of large models.
Related project links: [LLMSurvey] [YuLan-Chat] | [YuLan-Mini]
Technical reports often rely on hundreds or thousands of computing resources. Therefore, it is highly recommended to read some open-source technical reports.
We discuss training strategies from aspects such as training frameworks, training strategies, interpretability, model architecture improvements, and learning rate annealing.
The most commonly used training framework is Megatron-LM, which provides a good out-of-the-box and efficient benchmark. Combining it with other libraries can achieve better training speed.
The most commonly used pre-training framework, with a high entry threshold but more stability.
Computation-communication overlapping for MoE.
Expert parallel acceleration.
Accelerating FP8 matrix multiplication using the asynchronous features of Hopper.
Triton acceleration operator library.
Zero-redundancy data parallelism
Torch-native parallelism based on DTensor
Efficient Triton-based implementations for state-of-the-art linear attention models
Regarding hyperparameter Scaling Law, parallel strategies, initialization strategies, optimizer selection, FP8 training, etc.
About the Scaling Law of hyperparameters.
Visualizing the memory usage of parallel strategies.
An advanced version of MuP.
An efficient optimizer.
Training with optimizer states and activation values also in FP8.
About the Scaling Law of MoE.
We list some interpretability works that are inspiring for pre-training.
We list some recent improvements to model architectures.
Learning rate annealing is often combined with data quality screening.
We discuss existing open-source datasets mainly from four aspects: web pages, mathematics, code, and general-purpose.
Web page data will form the core corpus in pre-training.
An open-source web page dataset, a 3.8T dataset obtained after screening by Fasttext, etc.
A corpus for educational quality scoring, screened and scored from FineWeb, which has certain effects on knowledge-intensive questions.
NVIDIA's CC corpus.
An open-source Chinese educational quality scoring corpus by OpenCSG, screened and scored from Map-CC, SkyPile, WuDao, Wanjuan, etc.
A multilingual dataset.
Mathematical pre-training corpora can significantly improve the mathematical ability of the base model and the upper limit of post-training.
The largest open-source high-quality mathematical CC corpus.
Synthetic mathematical instruction data.
Math-related questions.
A high-difficulty mathematical dataset.
Collecting open-source Lean theorem proving datasets.
Code data can not only enhance the code generation ability of the base model but also improve its mathematical and logical abilities.
Cleaned from The-Stack-V2.
Python educational quality scoring.
The largest-scale uncleaned code data.
Cleaning Jupyter-Notebook and Python data with educational quality.
GitHub Issues and Kaggle Notebooks data.
Programming Q&A forum.
Training with synthetic instruction data generated from open-source code.
General-purpose data is often scarce long-tail data, which plays a crucial role in the usability of post-training models.
Long-tail knowledge enhancement and cleaning of various general-purpose data sources.
Converting PDF to Markdown with strong compatibility.
arXiv, conversations, DM Math, etc.
Encyclopedias, books, papers, Reddit, etc.
Law, exams, news, patents, encyclopedias, etc.
Q&A for web pages.
Filtered books, papers, web pages, and instructions from datasets such as RedPajama, Pile, and P3.
Q&A for long-range dependencies.
Datasets are often paired with high-quality data methods. We elaborate on this from aspects such as tokenizers, data配比 and courses, and data synthesis.
Tokenization is an important but often overlooked part of the model, which can significantly affect the model's ability in mathematics, knowledge, etc.
A multi-word tokenizer training method.
Predicting the vocabulary size.
Comparing the tokenization methods of numbers.
Multi-stage pre-training often enables the model to fully learn high-quality and small-scale data. Introducing more mathematical, code, CoT, and even long-thinking chain data in the continued pre-training (CPT) stage will form the core capabilities of the next generation of pre-trained models.
Divided into 8T pre-training + CPT with a smaller data scale.
Using educational scores for course data.
Optimizing the pre-training data mixing ratio.
Online data mixing.
Data mixing laws.
Cracking the data ratio of commercial models such as GPT through the merging rules of BPE tokenizers.
A clustering-based iterative data mixing bootstrapping framework.
Building an index for large-scale pre-training datasets to check data quality.
In addition to the synthetic data for mathematics and code mentioned above, we summarize some general synthetic data methods and resources. Moreover, using more long-thinking data in the later stage of pre-training is also becoming a direction worthy of exploration.
Imitation learning based on long-thinking chain synthetic data.
Generating synthetic instruction data rich in information to learn knowledge from a limited corpus.
Constructing long-text Creative Writing.
Multi-step reasoning data synthesis, decomposing complex tasks into sub-trajectories and optimizing data generation with reinforcement learning.
An open-source dataset of real user conversations.
Alignment data synthesis.
If you have suggestions for the project content, please submit Issues and PRs to jointly promote the development of large language models.
Awesome LLM pre-training resources, including data, frameworks, and methods.
406
15 commits
updated Apr 29, 2025
中文版 | English Version
Pre-training is the first and most crucial training stage in the development of large language models. As the open-source community continues to improve in areas such as model architecture, training strategies, open-source datasets, and data methods, we are committed to continuously tracking resources available for large model pre-training to give back to developers in the open-source large language model community.
Compared to comprehensive reviews, our scope is limited to commonly used resources and cutting-edge attempts related to pre-training, aiming to help users quickly get started with large language model pre-training. We also welcome contributions and updates from the open-source community to jointly promote the development of large models.
Related project links: [LLMSurvey] [YuLan-Chat] | [YuLan-Mini]
Technical reports often rely on hundreds or thousands of computing resources. Therefore, it is highly recommended to read some open-source technical reports.
We discuss training strategies from aspects such as training frameworks, training strategies, interpretability, model architecture improvements, and learning rate annealing.
The most commonly used training framework is Megatron-LM, which provides a good out-of-the-box and efficient benchmark. Combining it with other libraries can achieve better training speed.
The most commonly used pre-training framework, with a high entry threshold but more stability.
Computation-communication overlapping for MoE.
Expert parallel acceleration.
Accelerating FP8 matrix multiplication using the asynchronous features of Hopper.
Triton acceleration operator library.
Zero-redundancy data parallelism
Torch-native parallelism based on DTensor
Efficient Triton-based implementations for state-of-the-art linear attention models
Regarding hyperparameter Scaling Law, parallel strategies, initialization strategies, optimizer selection, FP8 training, etc.
About the Scaling Law of hyperparameters.
Visualizing the memory usage of parallel strategies.
An advanced version of MuP.
An efficient optimizer.
Training with optimizer states and activation values also in FP8.
About the Scaling Law of MoE.
We list some interpretability works that are inspiring for pre-training.
We list some recent improvements to model architectures.
Learning rate annealing is often combined with data quality screening.
We discuss existing open-source datasets mainly from four aspects: web pages, mathematics, code, and general-purpose.
Web page data will form the core corpus in pre-training.
An open-source web page dataset, a 3.8T dataset obtained after screening by Fasttext, etc.
A corpus for educational quality scoring, screened and scored from FineWeb, which has certain effects on knowledge-intensive questions.
NVIDIA's CC corpus.
An open-source Chinese educational quality scoring corpus by OpenCSG, screened and scored from Map-CC, SkyPile, WuDao, Wanjuan, etc.
A multilingual dataset.
Mathematical pre-training corpora can significantly improve the mathematical ability of the base model and the upper limit of post-training.
The largest open-source high-quality mathematical CC corpus.
Synthetic mathematical instruction data.
Math-related questions.
A high-difficulty mathematical dataset.
Collecting open-source Lean theorem proving datasets.
Code data can not only enhance the code generation ability of the base model but also improve its mathematical and logical abilities.
Cleaned from The-Stack-V2.
Python educational quality scoring.
The largest-scale uncleaned code data.
Cleaning Jupyter-Notebook and Python data with educational quality.
GitHub Issues and Kaggle Notebooks data.
Programming Q&A forum.
Training with synthetic instruction data generated from open-source code.
General-purpose data is often scarce long-tail data, which plays a crucial role in the usability of post-training models.
Long-tail knowledge enhancement and cleaning of various general-purpose data sources.
Converting PDF to Markdown with strong compatibility.
arXiv, conversations, DM Math, etc.
Encyclopedias, books, papers, Reddit, etc.
Law, exams, news, patents, encyclopedias, etc.
Q&A for web pages.
Filtered books, papers, web pages, and instructions from datasets such as RedPajama, Pile, and P3.
Q&A for long-range dependencies.
Datasets are often paired with high-quality data methods. We elaborate on this from aspects such as tokenizers, data配比 and courses, and data synthesis.
Tokenization is an important but often overlooked part of the model, which can significantly affect the model's ability in mathematics, knowledge, etc.
A multi-word tokenizer training method.
Predicting the vocabulary size.
Comparing the tokenization methods of numbers.
Multi-stage pre-training often enables the model to fully learn high-quality and small-scale data. Introducing more mathematical, code, CoT, and even long-thinking chain data in the continued pre-training (CPT) stage will form the core capabilities of the next generation of pre-trained models.
Divided into 8T pre-training + CPT with a smaller data scale.
Using educational scores for course data.
Optimizing the pre-training data mixing ratio.
Online data mixing.
Data mixing laws.
Cracking the data ratio of commercial models such as GPT through the merging rules of BPE tokenizers.
A clustering-based iterative data mixing bootstrapping framework.
Building an index for large-scale pre-training datasets to check data quality.
In addition to the synthetic data for mathematics and code mentioned above, we summarize some general synthetic data methods and resources. Moreover, using more long-thinking data in the later stage of pre-training is also becoming a direction worthy of exploration.
Imitation learning based on long-thinking chain synthetic data.
Generating synthetic instruction data rich in information to learn knowledge from a limited corpus.
Constructing long-text Creative Writing.
Multi-step reasoning data synthesis, decomposing complex tasks into sub-trajectories and optimizing data generation with reinforcement learning.
An open-source dataset of real user conversations.
Alignment data synthesis.
If you have suggestions for the project content, please submit Issues and PRs to jointly promote the development of large language models.