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
joeb

joeb

I agree. It would be awesome if we can do a lot of these Generative AI stuff in Elixir.

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

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

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New
NewsBot
Node.js v22.14.0 has been released. Link: Release 2025-02-11, Version 22.14.0 'Jod' (LTS), @aduh95 · nodejs/node · GitHub
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