Back to Projects

Build from first principles

Build a Tiny GPT from Scratch

Turn Shakespeare into tokens, build every part of a decoder-only transformer yourself, train it until the loss falls, and generate new text with temperature, top-k and top-p.