# tfjs-zero-to-hero

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.

**Type:** repo
**Added:** 2026-05-16
**Link:** https://github.com/Mark-Life/tfjs-zero-to-hero
**Topics:** Machine Learning, Open Source
**Tags:** typescript, ml, learning

---

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](https://karpathy.ai/zero-to-hero.html) (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.

---

## Links

- Directory entry: https://andrey-markin.com/directory/tfjs-zero-to-hero
- All directory entries: https://andrey-markin.com/directory
- Contact: https://andrey-markin.com/#contact
