ben (@benbye) header
ben (@benbye) profile picture

understanding intelligence through video games @uwaterloo prev @tensormesh @databricks @meta

Toronto & SF
Joined June 2025
And thats a wrap! 10/10 projects over the past month
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…
1
23
867
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…
40
45
4
541
21,047
For this project, I also wanted a deeper understanding of all the components I was using, so I also wrote my own autograd engine, tensor library, neural network layers, AdamW optimizer, autoencoder, and causal transformer from scratch. The blog has two paths: a shorter version focused on NanoDreamer and the interesting experiments, and a deep dive into building everything from first principles.
1
13
1,319
Very cool stuff!
fine-tuned qwen on my 16gb gpu to respond without the letter e what i learned: > simply masking the 'e' tokens out produces gibberish > you can just RL a model to speak coherently writeup here: kevin-wu.ca/blog/qwn/
7
688
Mini-projects 7–9: building a tiny transformer world model and training an actor–critic through imagined rollouts on MinAtar. This has been driving me crazy, but it’s finally learning from random weights. here’s a 15-point Space Invaders run! Now, training across more games now, with final benchmarks, tweaks, and performance improvements underway. Full write-up, post, and repo coming soon.
Mini-Project 6/10: Training a Visual Encoder and Decoder for MinAtar Space Invaders with My Own Neural Network Engine
2
1
16
513
Mini-Project 6/10: Training a Visual Encoder and Decoder for MinAtar Space Invaders with My Own Neural Network Engine
Mini-project 5/10: Actor-Critic RL on a smaller version of Pac-Man.
2
1
1
16
956
Truly believe video games will be the key to general physical intelligence
there is a massive market at the intersection of fun video games and generating datasets for frontier labs
3
10
400
Mini-project 5/10: Actor-Critic RL on a smaller version of Pac-Man.
Project 4/10: Built a tiny GPT on top of my MiniNN. Trained it on Shakespeare.
1
1
9
817
Very very cool
DINOv2 has never seen a caption, and Qwen3 has never seen an image. We still aligned their embedding spaces without a single image-caption pair. It even works when the images and the captions come from different datasets. Project page: dominik-schnaus.github.io/un… ⬇️
4
220
Project 4/10: Built a tiny GPT on top of my MiniNN. Trained it on Shakespeare.
Project 3/10: built MiniNN, a bare-bones ML framework, on top of my TensorGrad autodiff engine. Trained a 101,770-parameter network on MNIST and reached 95.56% test accuracy after 30 epochs. MiniNN supports: - Trainable parameters and reusable modules - Vectorized linear layers with Xavier initialization - Sigmoid, Tanh, SiLU, and stable Softmax - Sequential model composition - Mean squared error loss - Mini-batch training with SGD
2
1
16
606
Project 3/10: built MiniNN, a bare-bones ML framework, on top of my TensorGrad autodiff engine. Trained a 101,770-parameter network on MNIST and reached 95.56% test accuracy after 30 epochs. MiniNN supports: - Trainable parameters and reusable modules - Vectorized linear layers with Xavier initialization - Sigmoid, Tanh, SiLU, and stable Softmax - Sequential model composition - Mean squared error loss - Mini-batch training with SGD
Project 2/10: extended MiniGrad into TensorGrad - NumPy tensor autograd - Broadcasting-aware gradients - Reductions, slicing, and shape operations - Vector, matrix, and batched matrix multiplication - Exp, log, sigmoid, and SiLU - Stable softmax and logsumexp - Finite-difference gradient checks Used it to recover y = 2x₁ − 3x₂ + 1 with gradient descent.
8
1
22
1,250
Project 2/10: extended MiniGrad into TensorGrad - NumPy tensor autograd - Broadcasting-aware gradients - Reductions, slicing, and shape operations - Vector, matrix, and batched matrix multiplication - Exp, log, sigmoid, and SiLU - Stable softmax and logsumexp - Finite-difference gradient checks Used it to recover y = 2x₁ − 3x₂ + 1 with gradient descent.
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
9
1
1
23
2,598
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
10
3
2
29
2,685
I built LeMario from scratch, a JEPA world model trained directly on 737K Super Mario frames + controller inputs, with no rewards. It predicts future states and uses CEM to control Mario over short horizons. Based on LeWorldModel by @lucasmaes_. Technical write-up below
17
10
3
67
7,332
Took me 3 hours to finally display hello world using firmware traps 😭
6
1,014
Met one of the founding members of valorant 😭 @justmazer Fun night with cool people. @a16z
we brought together 25 of the top builders in Waterloo last night w/ a16z @speedrun the level of ambition and intelligence in the room is just as strong as Stanford or MIT. But you can sense that these folks feel like they have something to prove watch out for them 🚀
1
11
1,475