kokolegorille

kokolegorille

Elixir and Deep learning

Hello everyone,

This is a light talk about Alphazero.

Recently I have been impressed by latest AI from google, learning the game of go in 21 days and chess in 4 hours. It looks like the matrix world is not so far.

Most of the tools for deep learning are not done in Erlang/Elixir, because they are not really good at numbers crunching. But they can communicate with external libraries, for example with Python.

It looks like a breaking change, the year computers started to learn by themselves.

Any thoughts about the possible role of Erlang/Elixir could play in building the next super AI?

Most Liked

CptnKirk

CptnKirk

I think that all BEAM languages are currently hamstrung by not having an easy way of using them as front-end LLVM targets. As far as I know, most popular Deep Learning libraries are written in C/C++ with higher level language bindings made available via automated compiler toolchain magic. Compile to LLVM and generate the front-end language bindings (bytecode, opcode, whatever).

This may be due to a number of reasons: Data type incompatibilities, BEAM scheduler/thread incompatibility, BEAM isolation semantics, etc.

Dirty schedulers might help to a certain degree. But one would still need to be able to concretely map all low-level types present in C to BEAM bytecode and I don’t know how difficult that is.

This state of affairs bums me out and not just for Deep Learning. There seem to be many libs and SDKs available for a dozen languages, and Erlang/Elixir never makes these lists. Presumably, because it’s too difficult to auto-generate the language binding.

This doesn’t mean that all is lost. There are a number of ways to bridge Elixir with AI-ready languages. For example, Python is an incredibly popular language for building/training deep learning models. Inference can then happen in another front-end language. You can then bridge Elixir to this language. Or keep the small inference logic in Python and the rest of your inference server logic in Elixir. Use Ports to communicate between the Elixir/other_lang processes.

Even in this case you really need to like doing “everything else” in Elixir in order to justify the architecture and code overhead. And you still need to deal with data type impedance problems over the Port. That, unfortunately, is where I think Elixir and Deep Learning will be stuck in 2018.

CptnKirk

CptnKirk

Thanks. :slight_smile: I’m no expert. Just done a bit of research out of anger. There are others that can probably give a more correct and nuanced technical explanation of why BEAM can’t have nice things.

I think it boils down to this scenario being the other side of the BEAM coin. The same characteristics that make it better than other VMs for certain things, make it worse for this thing.

Where Next?

Popular in Discussions Top

jesse
Hi everyone, I hesitated to post this here because I don’t want you to think I’m spamming, but I’ve been working on a Platform-as-a-Serv...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
mmmrrr
Just saw that dhh announced https://hotwire.dev/ Is it just me or is this essentially live view? :smiley: Although I like the “iFrame-e...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement