Framework
nanoGPT
nanoGPT is an open-source AI framework, launched in 2022, made for developers.
A minimal PyTorch codebase for training and fine-tuning GPT-2-sized models.
Main jobs: Fine-tuning, Model training. It is open source and free to use. You can use it in the terminal and offline on your own machine.
Markdown version of https://godooo.ai/en/framework/nanogpt. Every page on this site has one: add .md to its address.
At a glance
- Type
- Framework
- Launched
- 2022
- Galaxy
- Models & APIs
- Open source
- Yes · MIT
- Source code
- github.com/karpathy/nanoGPT
- GitHub stars
- 63,353
- How you run it
- Terminal · Runs offline
- Made for
- Developers
- Website
- github.com
What it can do
Fine-tuningmain jobunconfirmed
“train new models from scratch, or finetune pretrained checkpoints”— github.com, 2026-09-24
Model trainingmain jobunconfirmed
“The simplest, fastest repository for training/finetuning medium-sized GPTs.”— github.com, 2026-09-24
unconfirmedproposed by a machine, awaiting calibration
Alternatives
- Kohya's GUIOpen source, freeAlso does: Fine-tuning, Model training
- LlamaFactoryOpen source, freeAlso does: Fine-tuning, Model training
- MLXOpen source, freeAlso does: Model training, Fine-tuning
- TRLOpen source, freeAlso does: Fine-tuning, Model training
- UnslothOpen source, freeAlso does: Fine-tuning, Model training
- Hugging FaceFree plan + paid upgradesAlso does: Fine-tuning, Model training
- PyTorchOpen source, freeAlso does: Model training
- TensorFlowOpen source, freeAlso does: Model training
- TransformersOpen source, freeAlso does: Model training
- JAXOpen source, freeAlso does: Model training
- ModelScopeOpen source, freeAlso does: Fine-tuning, Model training
- AxolotlOpen source, freeAlso does: Fine-tuning
Connections
- Created by
- Andrej Karpathy
- Built with
- PyTorch
Questions
What is nanoGPT?
nanoGPT is an open-source AI framework, launched in 2022, made for developers. A minimal PyTorch codebase for training and fine-tuning GPT-2-sized models.
Is nanoGPT free?
Yes. nanoGPT is open source (MIT) and free to use.
Is nanoGPT open source?
Yes, under the MIT license. The source code is at https://github.com/karpathy/nanoGPT.
Can nanoGPT run locally?
Yes. nanoGPT can run offline on your own machine.
What can nanoGPT do?
Main jobs: Fine-tuning, Model training.
What are open-source alternatives to nanoGPT?
Open-source ones: Kohya's GUI, LlamaFactory, MLX, TRL, Unsloth, PyTorch, TensorFlow and Transformers. Others: Hugging Face.
Sources
- github.com/karpathy/nanoGPTchecked 2026-09-24