A tiny language model, writing

This is a small GPT-style model built on gradlab, an engine written from scratch. It read 300,000 characters of Shakespeare and learned one thing: to guess what comes next. It does not read letter by letter: it first learned 512 common chunks of text ("the", "you", "GLOUCESTER:") and reads and writes in those, the same idea the large language models use. It is running in your browser now, with no server.

What it writes

What it is looking at

Each box is one chunk the model reads as a single unit. Brighter chunks are the ones it paid most attention to when it chose the chunk in the green box. It can only look back 32 chunks.

Try it

Low creativity repeats safe, common words. High creativity takes risks and invents more.

About this model

    Training stepLossUnseen text

    Loss is how surprised the model is by the real next chunk. Pure guessing scores about 6.4. "Unseen text" is a tenth of the plays that it never trained on.