
Karpathy's GPT-2 training in plain C and CUDA, with no PyTorch, to show exactly what training an LLM involves.
“Strips away every framework so you can read the actual forward pass, backward pass and optimiser, then see how they are made fast on GPUs.”
The clearest look at what LLM training really involves, without frameworks.
As low-level as it gets
Readable but demanding
By Andrej Karpathy
Runnable training code
Training only
Last updated mid-2025
Code-first
Free, MIT-licensed
31,000+ GitHub stars
Reviewed by the Hive editors on 3 Dec 2026 from 1 page read. High confidence.
Nobody has tagged this on X yet. Reply to a post about it and tag @resourcehivebot to be the first.
Picked by the Hive editors · Report a problem