Tiny GPT in Go. Optimised for Understanding. Trained on Jules Verne Books A developer released a minimal GPT implementation written entirely in Go, trained on Jules Verne novels. The model generates short text fragments like "Mysterious Island" and takes about 40 minutes to train on an M3 MacBook Air. The project prioritizes educational clarity over performance, removing batch dimensions and external dependencies to serve as a companion to Karpathy's "Neural Networks: Zero to Hero" course. Simple GPT implementation in pure Go. Trained on favourite Jules Verne books. What kind of response you can expect from the model: Mysterious Island. Well. My days must follow Or this: Captain Nemo, in two hundred thousand feet weary in the existence of the world. bash $ go run . It takes about 40 minutes to train on MacBook Air M3. The trained weights will be saved to model-1.234M file. If you rerun the model, it will pick up the saved weights and continue training. The loss should decrease each time, indicating that the model is learning something useful. You can train on your own dataset by pointing the data.dataset variable to your text corpus. To run in chat-only mode once the training is done: bash $ go run . -chat You can use this repository as a companion to the Neural Networks: Zero to Hero https://karpathy.ai/zero-to-hero.html course. Use git checkout