Hacker News new | past | comments | ask | show | jobs | submit
I wrote a C++ translation of it: https://github.com/verma7/microgpt/blob/main/microgpt.cc

2x the number of lines of code (~400L), 10x the speed

The hard part was figuring out how to represent the Value class in C++ (ended up using shared_ptrs).

I made an explicit reverse pass (no autodiff), it was 8x faster in Python