3 ms·
Congrats on the launch, this is fantastic. I love seeing these releases. They bring me so much joy & excitement. Can you provide some thoughts on the benefits
by shay_ker 4y ago
Congrats on the launch, this is fantastic. I love seeing these releases. They bring me so much joy & excitement.
Can you provide some thoughts on the benefits of doing ML on Elixir vs. Python? Is the benefit the language semantics? Is it much easier to get distributed work in Elixir ML vs Python ML? Are the tools better/smoother? Are there ML ops improvements? Perhaps there’s a blog post I missed :)
- josevalim 4y agoI have written a bit about potential benefits in the initial announcement of Nx [0] and then on its first release [1]. In a nutshell, there has been trends in Python (such as JAX and Thinc.ai) that argue functional programming can provide better abstractions and more composable building blocks for deep learning libraries. And I believe Elixir, as a functional language with Lisp-style macros, is in an excellent position to exploit that - as seen in "numerical definitions" which compile a subset of Elixir to the CPU/GPU. I also think the Erlang VM, with its distribution and network capabilities, can provide exciting developments in the realm of federated and distributed learning. We aren't exploring those aspects yet but we are getting closer to having the foundation to do so. Regarding ML ops, I believe one main advantage is explained in this video announcement. When deploying a ML model with Nx, you can embed the model within your applications: you don't need a 3rd-party service because we batch and route requests from multiple cores and multiple nodes withing Erlang/Elixir. This can be specially beneficial for projects like Nerves [5] and we will see how it evolves in the long term (as we _just_ announced it). Finally, one of the benefits on starting from scratch after Python has paved the way is that we can learn from its ecosystem and provide a unified experience. You can think of Nx as Numpy+JAX+TFServing all in one place and we hope that doing so streamlines the developer experience. This also means libraries like Scholar [2] (which aims to serve a similar role as SciPy) and Meow [3] (for Genetic Algorithms) get to use the same abstractions and compile to the CPU/GPU. The latter can show an order of magnitude improvement over other currently used frameworks [4]. [0]: https://dashbit.co/blog/nx-numerical-elixir-is-now-publicly-available https://dashbit.co/blog/nx-numerical-elixir-is-now-publicly-... [1]: https://dashbit.co/blog/elixir-and-machine-learning-nx-v0.1 https://dashbit.co/blog/elixir-and-machine-learning-nx-v0.1 [2]: https://github.com/elixir-nx/scholar/ https://github.com/elixir-nx/scholar/ [3]: https://github.com/jonatanklosko/meow https://github.com/jonatanklosko/meow [4]: https://dl.acm.org/doi/10.1145/3512290.3528753 https://dl.acm.org/doi/10.1145/3512290.3528753 [5]: https://www.nerves-project.org/ https://www.nerves-project.org/
- benswift 4y agoWhat will be interesting (and exciting) is seeing how GPU nodes are incorporated into platforms like fly.io, to really make this “elixir for ML/AI” thing seamless.
- Abishek_Muthian 4y agoI'm used to having a Python middleware in my Go web application just for ML, The idea of achieving the same with just one monolith application using Elixir is very tempting. Has anyone switched to Elixir from Go for writing web apps? What has been your experience like?
- matreyes 4y agoYou will not regret.
- Abishek_Muthian 4y agoPlease feel free to elaborate :)
- kristerv 4y agoi switched from JS to Elixir. there are many benefits you can google yourself, but one thing i've realized for myself is that in regards to webapps LiveView is a real innovation. now PHP and others are copying what Elixir is doing, which is great, but it seems like Jose and others in the space are keeping Elixir on the frontline of innovation for a long time still. time and time again (like with the ML stuff) it amazes me how much Elixir is actually inventing new stuff and thinking outside of the "just a language" box. i almost quit programming honestly, because i just couldn't take the needless complexity of everyday life and Elixir saved my career. now i get shit done.