Re-implementing classic ML models in TypeScript with @tensorflow/tfjs-node, following Andrej Karpathy's Neural Networks. Zero to Hero. Final destination — a from-scratch two-tower retrieval model on MovieLens.
Most ML projects, courses, and tutorials are Python — that's the default. I'm taking a different route: following Andrej Karpathy's Neural Networks: Zero to Hero (which is PyTorch) but re-implementing each model in TypeScript against the equivalent TensorFlow.js APIs.
The thing is — the actual ML doesn't happen in Python. It happens in C and CUDA. Python is mostly a thin API layer over native kernels. TF.js is the same story: @tensorflow/tfjs-node binds into the C++ TensorFlow runtime. So the "Python advantage" for ML is more cultural than technical.
Given I write TypeScript day-to-day and most modern application code is TypeScript, doing ML in TS means the model ships in the same stack as the product that consumes it — no Python sidecar, no FastAPI bridge, no language boundary at inference time. Feels like a unique and underexplored angle.
Progression: TF.js fundamentals → MNIST → makemore (bigram → MLP → BatchNorm → WaveNet) → micrograd → nanoGPT → two-tower retrieval on MovieLens with a Next.js + shadcn demo UI.