500 lines > tiny-GPT
A tiny GPT written in C++ with utilizing torch based on Andrej Karpathys https://github.com/karpathy/minGPT.
But with easier to understand more structured codebase(atleast I think so) and yeah it's completely in C++. Turned out to be better than I thought :)
This isn't really meant to used anywhere. Wrote this this morning and must say it was a blast. Maybe you find this somewhat educational. I still will be adding some things. But the original is great so check it out. Also although I use C++ for competitive programming I'm not very well versed writing software in it so maybe you will find some things weird.
I'm also a big simp of Andrej <3