News for hackers. Stuff that matters.
Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by shay_ker on Thursday December 08, 2022 @07:20PM (#33915780)
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 :)

Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by josevalim on Friday December 09, 2022 @01:40AM (#33918303)
I 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-... [1]: https://dashbit.co/blog/elixir-and-machine-learning-nx-v0.1 [2]: https://github.com/elixir-nx/scholar/ [3]: https://github.com/jonatanklosko/meow [4]: https://dl.acm.org/doi/10.1145/3512290.3528753 [5]: https://www.nerves-project.org/

Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by benswift on Friday December 09, 2022 @02:27AM (#33918633)
What 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.
Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by josevalim on Friday December 09, 2022 @02:36AM (#33918678)
Definitely. Running ML/AI nodes close to your users on the edge and collocated with your app can be an exciting combo!
Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by andy_ppp on Friday December 09, 2022 @04:45AM (#33919488)
AI that is specifically learning from your behaviour with a (partial) model per user I suspect is both terrifying and magical.
Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by Abishek_Muthian on Friday December 09, 2022 @12:31PM (#33924028)
I'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?

Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by matreyes on Saturday December 10, 2022 @07:58AM (#33932218)
You will not regret.
Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by Abishek_Muthian on Saturday December 10, 2022 @08:00AM (#33932234)
Please feel free to elaborate :)
Re:Bumblebee: GPT2, Stable Diffusion, and More in Elixir by kristerv on Monday December 12, 2022 @04:02AM (#33952502)
i 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.