Install any skill in seconds. Free to start, no credit card required.
Get Started Free →mkurman/nanogpt
Minimal GPT pretraining and fine-tuning (nanoGPT). The simplest, fastest repository for training medium-sized GPTs with ~300-line model.py and ~300-line train.py. Reproduces GPT-2 (124M) on OpenWebText. Supports DDP multi-GPU/multi-node, character-level training, weight loading from HuggingFace GPT-2 checkpoints, and simple finetuning. Note: superseded by nanochat for new projects; this repo remains valuable as a reference implementation and learning tool.
Passed 23 of 23 test cases with the skill, and 21 of 23 without it.
2 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
What is the successor project repository developed after nanoGPT by Andrej Karpathy for full-stack LLM modeling?
| Checked | Without skill | With skill |
|---|---|---|
| Names `nanochat` (or `nchat`) | Missed | Passed |
The instructions your model reads when the skill loads.
--|--------|--------|-------|---------|-------------| | Shakespeare char | ~10M | 6 | 6 | 384 | 1 GPU, 3 min | | GPT-2 small | 124M | 12 | 12 | 768 | 8×A100, 4 days | | GPT-2 medium | 350M | 24 | 16 | 1024 | Modify config | | GPT-2 large | 774M | 36 | 20 | 1280 | Modify config | | GPT-2 XL | 1.5B | 48 | 25 | 1600 | Multi-node |
# Benchmark training speed
python train.py config/train_gpt2.py --eval_only
# Loss tracking
# nanoGPT-reported GPT-2 (124M) on OpenWebText: val loss 2.85
# OpenAI GPT-2 (124M) on WebText: val loss ~3.11
# (domain gap between WebText and OpenWebText accounts for difference)
# Custom benchmarks
python train.py config/train_shakespeare_char.py --eval_iters=200
init_from='scratch'|'resume'|'gpt2*' — switch between training modes--compile=True on GPU for ~2x speedupgradient_accumulation_steps emulates larger batch sizeswte (embedding) and lm_head — standard GPT practicetorchrun for multi-GPU — not python -m torch.distributed.launchtest cases passed, vs 21 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.