Inside TinyGPT, one letter at a time

A tiny transformer is running in your browser right now. Each time it writes a letter you can see where every attention head looked, what each layer was guessing, and the final odds it picked from.

loading model…

What it has written

Click any letter to look at the model from that position. The orange box is the position being inspected; shading shows where the selected attention head is looking from there.

Attention heads

Each head is a small search: from the inspected letter, it decides which earlier letters to read. Click one to shade the text above with it.

Its guess after each layer

The same "what comes next?" read-out, applied part-way through. Watch the guess sharpen as data flows up.

Final odds for the next letter

Top 10 of the whole alphabet it knows. Orange is what it picked.