Something went wrong. Try again.
Fork of https://github.com/xenova/microgpt.js
Something went wrong. Try again.
Files
- Zig 54%
- JavaScript 27%
- Python 19%
README.md
microgpt.zig #
This is a fork of microgpt.js which ports the original Python implementation implemented by karpathy. This fork ports the implementations to Zig. Claude Code and Windsurf were both used for the port.
Build with zig build-exe microgpt.zig -O ReleaseFast. Run with ./microgpt
The most atomic way to train and inference a GPT in pure, dependency-free JavaScript. This repository covers the complete algorithm. Everything else is just efficiency.
Adapted from Karpathy's microgpt.py. This implementation matches the original exactly, but now can run in JavaScript environments, including browsers and Node.js.
