Live data from Hacker News

Deep Learning in JavaScript

github.com

1–10 of 92 posts

Re: Deep Learning in JavaScript

#2
Learning Machine Learning, I’ve always been interested in PyTorch and its Automatic Backpropagation.

In this project, I tried to reimplement most of PyTorch in Javascript. It is implemented from scratch in a well-documented, unit tested, and interpretable way, so it can help other JavaScript learners get into Machine Learning!

Hope you enjoy!

Re: Deep Learning in JavaScript

#4

Learning Machine Learning, I’ve always been interested in PyTorch and its Automatic Backpropagation. In this project, I tried to reimplement most of PyTorch in Javascript. It is implemented from scratch in a well-documented, unit tested, and interpretable way, so it can help other JavaScript learners get into Machine Learning! Hope you enjoy!

[deleted]

Re: Deep Learning in JavaScript

#6
Very very cool to see!!!

So yours is SO MUCH MORE fleshed out than mine, but I have a similar (again very fledgling) one going here that uses Typescript:

https://github.com/Marviel/lab-grad

I think there are some really neat opportunities to increase the approachability of ML algorithms when you take advantage of the Typescript templating system to explicitly ensure you're not accidentally composing tensors of incorrect shapes.

Unfortunately, my above lib above doesn't yet handle tensors, it's still at the level of individual neurons. Hopefully someday I can bring it further along, use WASM or WebGPU, etc. :)

Re: Deep Learning in JavaScript

#7

Learning Machine Learning, I’ve always been interested in PyTorch and its Automatic Backpropagation. In this project, I tried to reimplement most of PyTorch in Javascript. It is implemented from scratch in a well-documented, unit tested, and interpretable way, so it can help other JavaScript learners get into Machine Learning! Hope you enjoy!

This is awesome! Congrats. Clearly a lot of work and a very cool library.

Re: Deep Learning in JavaScript

#8

Learning Machine Learning, I’ve always been interested in PyTorch and its Automatic Backpropagation. In this project, I tried to reimplement most of PyTorch in Javascript. It is implemented from scratch in a well-documented, unit tested, and interpretable way, so it can help other JavaScript learners get into Machine Learning! Hope you enjoy!

You might look into node api or ffi and add some native code to speed up some operations on the server.

I helped with this project to do that and get prebuilt binaries: https://github.com/ashvardanian/SimSIMD

I haven't looked at ffi over node yet.

Re: Deep Learning in JavaScript

#9
The nn.Block should probably be renamed to nn.DecoderBlock as it's not very clear if it's supposed to be an encoder or a decoder block, also an option to disable the mask from attention. That said, very cool project.

Re: Deep Learning in JavaScript

#10
post #6

Very very cool to see!!! So yours is SO MUCH MORE fleshed out than mine, but I have a similar (again very fledgling) one going here that uses Typescript: https://github.com/Marviel/lab-grad I think there are some really neat opportunities to increase the approachability of ML algorithms when you take advantage of the Typescript templating system to explicitly ensure you're not accidentally composing tensors of incorr…

Thanks for the tip! I will look into your project, for sure! I am still a beginner on Typescript, but when I get the hang of it, I think I might refactor my package to Typescript. Again, thanks for the tip!
Post reply on HN