PicoGPT: GPT in a QR Code
Yes, it's small enough to fit inside a QR code. You can scan it to try it out.
Origin
Andrej Karpathy tweeted this on X today, talking about MicroGPT
It was genuinely so cool but then I saw something that made me laugh out loud
IT WASN'T MINIFIED FURTHER
So uh yeah, that's all this is, I minified it further at picogpt.py
and it works IN JUST 64 LINES!
For context, these 64 lines of python include:
- A custom Autograd engine
- Multi-head attention (MHA)
- Feed-forward MLP with GeLU approximation
- AdamW Optimizer
- Training & Inference loops
The qrgen.py script is adapted from my Doom running inside a QR code project: backdooms.
The QR now contains a single bootstrap command. When scanned, copy the text and paste it in a terminal to:
- restore
picogpt.py - run
picogpt.pyimmediately
As for the naming choice, iykyk


