Topics / #pretraining
Pretraining projects on GitHub
Resources on pretraining large language models from scratch.
As of , the most-starred Pretraining projects on GitHub are LLMs-from-scratch (109.2K stars), unsloth (80.4K stars) and nanochat (61K stars). GitHub.Locker tracks 13 Pretraining repositories with 347.4K stars combined. The fastest-growing on December 2 was unsloth, with +64 stars in a day.
Hot right now
Most stars gained in a day · Dec 2
+64unsloth
unslothai/unsloth · ★ 80.4KUnsloth is a local-first app for running and training LLMs, diffusion, TTS and embedding models on your own machine, including models like Qwen3.8, DeepSeek-V4, MiniMax-H3, Gemma 4 and FLUX.
+63LLMs-from-scratch
rasbt/LLMs-from-scratch · ★ 109.2KThis is the official code repository for the book 'Build a Large Language Model (From Scratch)', which teaches you to implement a GPT-like LLM in PyTorch step by step, from tokenization through pretraining and finetuning.
+24nanochat
karpathy/nanochat · ★ 61KA minimal, hackable harness for training your own LLM end to end (tokenization, pretraining, finetuning, evaluation, inference) on a single GPU node, ending in a chatbot you talk to over a CLI.
+20train-llm-from-scratch
FareedKhan-dev/train-llm-from-scratch · ★ 13.3KA from-scratch tutorial and codebase for training your own LLM end to end: tokenizing raw text, pretraining a GPT-style Transformer, and then post-training it with SFT, a reward model, DPO/ORPO/KTO, PPO and GRPO into an aligned, reasoning-style assistant.
The all-time top
13 projects · by stars
- 109.2K
#1 · rasbt/LLMs-from-scratchLLMs-from-scratch
This is the official code repository for the book 'Build a Large Language Model (From Scratch)', which teaches you to implement a GPT-like LLM in PyTorch step by step, from tokenization through pretraining and finetuning.
- 80.4K
#2 · unslothai/unslothunsloth
Unsloth is a local-first app for running and training LLMs, diffusion, TTS and embedding models on your own machine, including models like Qwen3.8, DeepSeek-V4, MiniMax-H3, Gemma 4 and FLUX.
- 61K
#3 · karpathy/nanochatnanochat
A minimal, hackable harness for training your own LLM end to end (tokenization, pretraining, finetuning, evaluation, inference) on a single GPU node, ending in a chatbot you talk to over a CLI.
- 4

llm.c
31.5Kkarpathy/llm.c · Cudallm.c is Karpathy's project for training large language models in raw C and CUDA, with no dependency on 245MB of PyTorch or 107MB of cPython. It currently focuses on pretraining GPT-2 and GPT-3-scale models, with train_gpt2.cu as the main CUDA training path.
- 5

Chinese-LLaMA-Alpaca
18.9Kymcui/Chinese-LLaMA-Alpaca · PythonOpen-source Chinese LLaMA and Alpaca large language models. The base LLaMA was extended with a Chinese vocabulary and further pre-trained on Chinese data, and Alpaca versions were instruction-tuned on Chinese instructions; training and deployment scripts are open too.
- 6

dinov2
13.6Kfacebookresearch/dinov2 · Jupyter NotebookDINOv2, a self-supervised visual feature learning method from Meta AI's FAIR team, shipped as PyTorch code and pretrained models. Its features plug into classifiers as simple as linear layers across many vision tasks, with no fine-tuning required.
- 7

train-llm-from-scratch
13.3KFareedKhan-dev/train-llm-from-scratch · PythonA from-scratch tutorial and codebase for training your own LLM end to end: tokenizing raw text, pretraining a GPT-style Transformer, and then post-training it with SFT, a reward model, DPO/ORPO/KTO, PPO and GRPO into an aligned, reasoning-style assistant.
- 8
PaddleFormers
13KPaddlePaddle/PaddleFormers · PythonPaddleFormers is a Transformers-style library built on Baidu's PaddlePaddle deep learning framework, giving the PaddlePaddle ecosystem the same kind of model interface and training workflow as Hugging Face Transformers, with full training support for 100+ LLMs and vision-language models.
- 9

MSA
3.5KEverMind-AI/MSA · PythonMSA (Memory Sparse Attention) is an end-to-end trainable, scalable latent-memory framework that lets LLMs handle context windows up to 100M tokens, replacing RAG or fixed-size RNN-style memory with a differentiable sparse-attention memory bank.
- 10

OpenWAM
1.2KOpenWAM-Official/OpenWAM · PythonOpenWAM is an open research stack for systematically building World-Action Models (WAMs) for robots, breaking the usual tightly-coupled design choices into modular, swappable components you can compare in controlled experiments.
- 11
LoongForge
863baidu-baige/LoongForge · PythonAn open-source training framework from Baidu's Baige team for LLMs, VLMs, diffusion and embodied models, built for faster training and lower cost on NVIDIA GPUs and Kunlun XPUs.
- 12

Motus2
568shengshu-ai/Motus2 · PythonMotus2 is a self-evolving general world model for dexterous robot manipulation. A single model with shared weights acts as a policy, a simulator, and an evaluator, coupling them into a closed decision-and-learning loop so the system can perceive, predict, act, and improve itself.
- 13
manaca-1b-base
255Instituto-IA-LNCC/manaca-1b-base · PythonAn open ~1.72B-parameter language model trained from scratch for Brazilian Portuguese. The repo holds the whole reproducible pipeline: Docker environment, corpus pipeline, tokenizer training, Megatron-LM pretraining, and a Portuguese benchmark suite.
Related topics
Often tagged together
- deep-learning581
- python2,381
- gpu797
- llm1,585
- machine-learning766
- research690
- fine-tuning175
- ai2,002
- cuda382
- huggingface349
- linux4,248
- pytorch347
- large-language-models209
- nvidia342
- open-source5,454
- transformer185
- apache-2.01,438
- training77
- academic-research203
- attention-mechanism49
- docker1,642
- lora83
- pretrained-models56
- artificial-intelligence234