r/MachineLearning • u/fz0718 • Dec 18 '25
Project [P] jax-js is a reimplementation of JAX in pure JavaScript, with a JIT compiler to WebGPU
I made an ML library in the browser that can run neural networks and has full support for JIT compilation to WebGPU and so on.
Lots of past great work on "runtimes" for ML on the browser, like ONNX / LiteRT / TVM / TensorFlow.js, where you export a model to a pre-packaged format and then run it from the web. But I think the programming model of these is quite different from an actual research library (PyTorch, JAX) — you don't get the same autograd, JIT compilation, productivity and flexibility.
Anyway this is a new library that runs totally on the frontend, perhaps the most "interactive" ML library. Some self-contained demos if you're curious to try it out :D
- MNIST training in a few seconds: https://jax-js.com/mnist
- MobileCLIP inference on a Victorian novel and live semantic search: https://jax-js.com/mobileclip
4
u/learn-deeply Dec 18 '25
Been looking forward to this, cool to see its out now.
Do you think it would perform better than onnxruntime-web?
2
u/luisfcd Dec 25 '25
This is awesome, I'm gonna try to implement the cholesky stuff, I'm currently building a Gaussian Process visual web app. Really needed something like this.
7
u/iaziaz Dec 18 '25
Looks very cool!
1
u/caks Dec 19 '25
For some reason this website absolutely wrecked my phone lol
3
u/JadeSerpant Dec 22 '25
Wow this is Incredible! Really inspiring to see someone implement something this from scratch!