Remix.run Logo
verma7 4 hours ago

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).

WithinReason 16 minutes ago | parent [-]

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