LabscoMCP early access ↗
Orchestra-Research avatar✓ Official

nanogpt

Local tool required★ 13k on GitHub
part of orchestra-research/ai-research-skillsby orchestra-research

A roughly 300-line, from-scratch GPT implementation that trains in minutes on a CPU for small experiments and scales up to reproduce GPT-2 on multiple GPUs, built for understanding transformers rather than production use.

WHEN TO USE

SCOPE

USE FOR

  • Train a tiny GPT on Shakespeare's text and see it generate new dialogue in about 5 minutes on a CPU.
  • Reproduce GPT-2 (124M) from scratch on 8 GPUs to see the full training pipeline end to end.
  • Fine-tune an existing GPT-2 checkpoint on your own text with just a few config changes.
  • Read a roughly 300-line training loop to see exactly how a GPT model is built and trained.

NOT FOR

  • Training a production model at scale — Hugging Face Transformers or Megatron-LM are built for that.
  • Wanting many pretrained architectures ready to go — LitGPT covers a broader range.