microgpt.js
The most atomic way to train and inference a GPT in pure, dependency-free JavaScript. This file is the complete algorithm. Everything else is just efficiency.
▶ run
output
press run to train microgpt.js in your browser
microgpt.js