This is cool! This summer I made something similar but in C++. The goal was to build an entire LLM, but I only got to neural networks. GitHub repo here: <a href="https://github.com/amitav-krishna/llm-from-scratch" rel="nofollow">https://github.com/amitav-krishna/llm-from-scratch</a>. I have a few blogs on this project on my website (<a href="https://amitav.net/building-lists.html" rel="nofollow">https://amitav.net/building-lists.html</a>, <a href="https://amitav.net/building-vectors.html" rel="nofollow">https://amitav.net/building-vectors.html</a>, <a href="https://amitav.net/building-matrices.html" rel="nofollow">https://amitav.net/building-matrices.html</a> (incomplete)). I hope to finish that series eventually, but some other projects have stolen the spotlight! It probably would have made more sense to write it in Python because I had no C++ experience.