Re:Torch.ts – building PyTorch in TypeScript from scratch to...
by 13point5 on Wednesday December 31, 2025 @03:49AM
(#46442503)
Right now it's just a tensor manipulation lib but will be adding an autograd engine soon. It's been fun learning about strides and doing matmuls by hand and then coding it without numpy.
[ Parent
| on HN ]
Re:Torch.ts – building PyTorch in TypeScript from scratch to...
by primitivesuave on Saturday January 03, 2026 @08:28PM
(#46483828)
Thanks for sharing! I used to teach students to build ML algorithms from scratch (everything from Markov chains to multilayer perceptrons and convolution neural networks) - I rewrote some of my notes in TypeScript here:
1. https://github.com/keshavsaharia/numbers/blob/dev/lib/nn/neu...
2. https://github.com/keshavsaharia/numbers/blob/dev/lib/cnn/cn... (still working on the visualization)
Hope you find these useful in your own learning journey!