I trained a 750K-parameter world-model agent on my M5 Pro to play video games!
Presenting NanoDreamer: a tiny Dreamer-inspired agent that learns game dynamics and trains an actor–critic in latent imagination.
Write-up: benjamin-bai.com/projects/na…
Built MiniGrad from first principles
- scalar autograd
- computation graphs
- reverse-mode backprop
- gradient accumulation
- SiLU, neurons, layers, MLPs, and SGD
Used it to train an MLP on XOR end-to-end
Inspired by @karpathy's micrograd
Project 1/10
I love taking notes on books that I read, but I hate it when I have to look at the table of contents, type it out and then start reading the book, so I decided to build something to do something about it!
I put my learnings in the replies!!
For reference, I intentionally wanted the UI to feel similar to craigslist.org with no particular reason, just instinct.
4/5 @Cloudflare
CloudFlare is probably one of the great hosting platforms ever and its something I will continue using in the future.
3/5 @AWSArchitecture
AWS CDK is the king for deploying cloud infrastructure. I've tried Terraform and while the experience was not bad, it does not match that of AWS CDK, highly recommend it!
2/5 @prisma
Prisma was something I always wanted to learn so I said screw it and did it for this project! Overall it was a fun experience, I still don't know the best way to do table level migrations with it yet but maybe someone has a good idea!
1/5 @vercel
Next.js is incredible and honestly I really like the concept of App Router. Modals are super cool and the overall dev experience with Next.js is quite fun given that you know React.



