I just wanted to gauge people’s interest.
So, I’ve got this tool in the works. It’s supposed to take a model implementation in PyTorch and spit out an Axon implementation. I haven’t written the Axon emitter yet, though. Once I do, it won’t just let you run the model. It will translate the model into Elixir.
See, models on Arxiv come with a PyTorch reference implementation. This is why people usually use PyTorch for research; you can basically import arxiv_paper. Elixir has nothing like that. We’re way behind because the best we can do is have someone hand-implement a model in Axon. You have to translate, by hand, from the PyTorch implementations we find on Arxiv. Bumblebee is basically a body of that work.
So I’m trying to automate it and make it so you can fire up this Elixir library in your CLI and basically do import arxiv_paper, and get it back in Axon. This is different from ONNX importing. ONNX just lets you run a model. This actually translates the PyTorch model to Elixir so you can tweak it, do LoRA, etc. The old axon_onnx library is stale, though, and the ONNX hop adds another step where things can break.
Today it captures a PyTorch model via FX or torch.export, round-trips it through a JSON graph into Elixir where you can validate it, infer shapes, expand it to primitives and collapse it back, and compiles it back out to PyTorch .
The first step is an Axon emitter that works for common architectures (CNNs, MLPs) on Arxiv.
My question is: if I can get this working to that benchmark, would anyone want to use it? Elixir, generally speaking, is not a research language for ML (more for deployment and orchestration) but as long as Axon exists, we might as well have something like this.
How it happened
My original idea was a graph-theoretic notation to enable transpilation of ML models between languages. You compile your PyTorch implementation (or whatever language) into my notation. Then that notation can be compiled into any other language. A model transpiler, in other words.
# Primitive Set — ML Architecture Notation Version 0.4 — Draft --- # - Pastebin.com ← my original notation.
My friend at Brainfuel has this thing called LawSpec. I showed him my notation and he used his LawSpec thing to make it an actual Elixir application. I forked it:
I have yet to write the back-end Axon emitter to enable transpilation. But like I said, it shouldn’t take that long to get common model architectures working.
Questions:
- Would you use it?
- What would it take for you to trust this over a hand port?


















