dPhong31415

dPhong31415

Elixir for generative AI?

I’ve been playing with the idea of building a generative AI app (images/video). Part of me really wants to use Elixir because I love how it handles concurrency and real-time stuff. But I keep wondering… would Elixir just end up being the orchestrator while Python does the actual AI heavy lifting? Or is Nx/Axon good enough now to lean more into Elixir for the ML side too?

Anyone here tried going down this path? Curious what worked (or didn’t).

Most Liked

Margaret

Margaret

Editor at PragProg
joelpaulkoch

joelpaulkoch

At the end of the day whether it’s Elixir or Python, the actual heavy lifting is done below that in C/C++/CUDA/…

So I think the first question is whether you really want to run the models yourself or just use an API which would probably be way cheaper, given that you’ll need a GPU to do image/video generation if you don’t want to wait 10 minutes for a single image. If you use an API for the generative AI part, it doesn’t matter if you write your app in Elixir or Python, so use Elixir and have some fun :wink:

If you want to run the model yourself, Axon/Nx is definitely good enough to run it because it makes use of the same underlying libraries as the Python world (as the most developed backend for Nx is xla via exla library, I think it lacks a bit behind the cutting edge stuff from pytorch. I’m not sure though and I don’t think it would really matter for you’re use case). The bigger issue you’ll run into is that you need an implementation in Elixir for the model you want to run. And that’s in the bumblebee library, which can’t keep up with all the new models developed in Python. If the model is not implemented yet and you’re interested in how all of this works under the hood, you can implement it and open a PR :wink:

The easier way out here is to use the pythonx library, run the model from there and as soon as you or someone else implemented it you can switch to Nx

toon159

toon159

Thank you for the great information :folded_hands:

Where Next?

Popular Ai topics Top

trazorx
Is it possible to build a recommendation system for my online shop? I have online shop and i want to add a recommendation system on it a...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New
dPhong31415
I’ve been playing with the idea of building a generative AI app (images/video). Part of me really wants to use Elixir because I love how ...
New
AadityaJujagar
So I came across this privacy-first AI tool for desktop, Jan.ai, so I decided to use it for document analysis purposes with the use of a ...
New

Other popular topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1045 20596 392
New
New
PragmaticBookshelf
Ruby, Io, Prolog, Scala, Erlang, Clojure, Haskell. With Seven Languages in Seven Weeks, by Bruce A. Tate, you’ll go beyond the syntax—and...
New
wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
PragmaticBookshelf
Create efficient, elegant software tests in pytest, Python's most powerful testing framework. Brian Okken @brianokken Edited by Kat...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
RobertRichards
Hair Salon Games for Girls Fun Girls Hair Saloon game is mainly developed for kids. This game allows users to select virtual avatars to ...
New