logoalt Hacker News

verma7yesterday at 6:00 AM1 replyview on HN

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


Replies

WithinReasonyesterday at 9:21 AM

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

show 1 reply