What problem does it solve? Learning how GPT models work internally is difficult when production frameworks hide details behind heavy abstractions. This Skill provides a ~300-line GPT implementation that reproduces GPT-2 (124M) on OpenWebText, letting you understand, modify, and train transformers from scratch. ## Core Features & Use Cases - Character-Level Training: Train a small GPT on Shakespeare in about 5 minutes on CPU, then generate sample text. - GPT-2 Reproduction: Reproduce GPT-2 (124M) on OpenWebText using multi-GPU DDP training with torchrun. - Fine-Tuning Pretrained Models: Load OpenAI GPT-2 checkpoints (gpt2, gpt2-medium, gpt2-large, gpt2-xl) and fine-tune on custom datasets. - Use Case: A student learning transformers can prepare the Shakespeare dataset, train a 6-layer character-level model on CPU, and generate Shakespeare-style text within minutes, then scale up to GPT-2 reproduction on GPUs. ## Quick Start Train a small GPT model on the Shakespeare dataset using nanoGPT and generate sample text from the trained checkpoint.