LLM training pipeline
He covers pretraining, supervised finetuning, reward modeling and RL. He also gives practical recipes for reproducing GPT-2, finetuning, and scaling configurations to the available compute.
Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.
Rules
Covered in
GitHub · nanoGPT: The simplest, fastest repository for training/finetuning medium-sized GPTs.
Karpathy presents nanoGPT as a minimal, readable, and hackable repository for training or finetuning medium-sized GPTs, while noting that it is now deprecated in favor of nanochat. He teaches practical workflows for starting with a small character-level model, scaling configurations to available hardware, reproducing GPT-2, finetuning pretrained checkpoints, sampling outputs, and troubleshooting performance or compatibility issues.
GitHub · llm.c: LLM training in simple, raw C/CUDA
Karpathy presents llm.c as an educational, readable, and fast implementation of GPT-2/GPT-3-style pretraining in pure C/CUDA, supported by a parallel PyTorch reference. He teaches learners to begin with reproducible small runs, validate the C/CUDA implementation against PyTorch, and balance performance improvements against code complexity.
GitHub · build-nanogpt: Video+code lecture on building nanoGPT from scratch
This README describes Karpathy's from-scratch reproduction of nanoGPT, built step by step in clean git commits alongside a video lecture, starting from an empty file and ending with a GPT-2 (124M) reproduction. He explains that such base models only "dream" internet documents and are not chat models, notes that reproduction now costs about an hour and $10, and documents errata openly.
CUDA Mode Keynote | Andrej Karpathy | Eureka Labs
Karpathy teaches how llm.c rebuilt GPT-2 training from explicit C and CUDA, using PyTorch as a correctness reference while manually implementing forward passes, backward passes, memory management, kernels, precision, and distributed execution. He emphasizes keeping the implementation readable and dependency-light, optimizing iteratively without accepting complexity whose gains are too small, and presents the project as evidence that future LLMs may generate highly customized low-level software.
State of GPT
Karpathy explains the four-stage recipe for training GPT assistants (pretraining, supervised finetuning, reward modeling, reinforcement learning) and then teaches how to use these assistants effectively. He frames prompting as compensating for the cognitive differences between human brains and LLMs, which are token simulators that spend fixed compute per token and do not self-check by default.
microgpt
Karpathy teaches the complete algorithmic essence of training and running a GPT by reducing it to a dependency-free, 200-line Python program. He explains how data, tokenization, autograd, Transformer architecture, optimization, training, and inference fit together, while distinguishing the core algorithm from the engineering required to operate production-scale LLMs.
Deep Dive into LLMs like ChatGPT
The available source text is only a brief description of a general-audience video on Large Language Models like ChatGPT. It states that the video covers the full training stack of how such models are developed, mental models for thinking about their "psychology", and how to get the best use out of them.
GitHub · nanochat: The best ChatGPT that $100 can buy.
Karpathy presents nanochat as a minimal, hackable harness for running the full LLM pipeline—from tokenization and pretraining through finetuning, evaluation, and inference—on accessible hardware and budgets. He teaches a research workflow built around one complexity dial, rapid experiments at small scale, explicit metrics, and changes that generalize across model depths.
Let's reproduce GPT-2 (124M)
This source, a short video description, outlines Karpathy's end-to-end reproduction of GPT-2 (124M) from scratch. He walks through building the network, optimizing training speed, configuring the run according to the GPT-2 and GPT-3 papers' hyperparameters, and then launching training.