aditya|micro-gpt lab

MicroGPT Lab

Teach a machine
to write.

Language is just patterns. What if you could show a machine enough examples that it figures out the rules on its own?

That is exactly what happens here. Watch it — step by step.

Begin the experiment →No install. No account. Runs entirely in your browser.
200
lines of Python
0
ML frameworks
100%
runs in your browser
things to learn

The transformer pipeline

TextTokensEmbeddingsAttentionMLPLogitsSoftmaxNext Token

Six steps. One story.

01
The Material
Choose a dataset. Every character becomes a token.
02
The Language
See text dissolve into integers, the only language math understands.
03
The Learning
Watch loss fall in real time. Each step is one tiny correction.
04
The Understanding
Inspect embeddings and attention. Look inside the trained mind.
05
The Voice
Turn temperature up. Turn it down. Listen to what changes.
06
The Score
Perplexity is how surprised the model is. Lower means wiser.
Open the pipeline →
MicroGPT Lab by Aditya Saxena · Based on microgpt.py by Andrej Karpathy · Runs 100% in your browser