# Nx and Machine Learning in Elixir with Sean Moriarity

> Episode of [Elixir Wizards](https://podistic.com/podcast/elixir-wizards.md) · Published June 19, 2025 · Duration 44:21

- **Listen on Podistic:** https://podistic.com/episode/nx-and-machine-learning-in-elixir-with-sean-moriarity
- **Audio:** https://aphid.fireside.fm/d/1437767933/03a50f66-dc5e-4da4-ab6e-31895b6d4c9e/53f845b4-fada-46fc-ada0-0449ce84fb6a.mp3 (audio/mpeg)

## About this episode

Today on Elixir Wizards, hosts Sundi Myint and Charles Suggs catch up with Sean Moriarity, co-creator of the Nx project and author of Machine Learning in Elixir. Sean reflects on his transition from the military to a civilian job building large language models (LLMs) for software. He explains how the Elixir ML landscape has evolved since the rise of ChatGPT, shifting from building native model implementations toward orchestrating best-in-class tools. 

We discuss the pragmatics of adding ML to Elixir apps: when to start with out-of-the-box LLMs vs. rolling your own, how to hook into Python-based libraries, and how to tap Elixir’s distributed computing for scalable workloads. Sean closes with advice for developers embarking on Elixir ML projects, from picking motivating use cases to experimenting with domain-specific languages for AI-driven workflows.

### Key topics discussed in this episode:

*   The evolution of the Nx (Numerical Elixir) project and what's new with ML in Elixir
*   Treating Elixir as an orchestration layer for external ML tools
*   When to rely on off-the-shelf LLMs vs. custom models
*   Strategies for integrating Elixir with Python-based ML libraries
*   Leveraging Elixir’s distributed computing strengths for ML tasks
*   Starting ML projects with existing data considerations
*   Synthetic data generation using large language models
*   Exploring DSLs to streamline AI-powered business logic
*   Balancing custom frameworks and service-based approaches in production
*   Pragmatic advice for getting started with ML in Elixir

### Links mentioned:

[https://hexdocs.pm/nx/intro-to-nx.html](https://hexdocs.pm/nx/intro-to-nx.html)  
 [https://pragprog.com/titles/smelixir/machine-learning-in-elixir/](https://pragprog.com/titles/smelixir/machine-learning-in-elixir/)  
 [https://magic.dev/](https://magic.dev/)  
 [https://smartlogic.io/podcast/elixir-wizards/s10-e10-sean-moriarity-machine-learning-elixir/](https://smartlogic.io/podcast/elixir-wizards/s10-e10-sean-moriarity-machine-learning-elixir/)  
 Pragmatic Bookshelf: [https://pragprog.com/](https://pragprog.com/)  
 ONNX Runtime Bindings for Elixir: [https://github.com/elixir-nx/ortex](https://github.com/elixir-nx/ortex)  
 [https://github.com/elixir-nx/bumblebee](https://github.com/elixir-nx/bumblebee)  
 Silero Voice Activity Detector: [https://github.com/snakers4/silero-vad](https://github.com/snakers4/silero-vad)  
 Paulo Valente Graph Splitting Article: [https://dockyard.com/blog/2024/11/06/2024/nx-sharding-update-part-1](https://dockyard.com/blog/2024/11/06/2024/nx-sharding-update-part-1)  
 Thomas Millar's Twitter [https://x.com/thmsmlr](https://x.com/thmsmlr)  
 [https://github.com/thmsmlr/instructor\_ex](https://github.com/thmsmlr/instructor_ex)  
 [https://phoenix.new/](https://phoenix.new/)  
 [https://tidewave.ai/](https://tidewave.ai/)  
 [https://en.wikipedia.org/wiki/BERT\_(language\_model)](https://en.wikipedia.org/wiki/BERT_\(language_model\))  
 Talk: PyTorch: [Fast Differentiable Dynamic Graphs in Python](https://www.youtube.com/watch?v=am895oU6mmY) by Soumith Chintala  
 [https://hexdocs.pm/axon/Axon.html](https://hexdocs.pm/axon/Axon.html)  
 [https://hexdocs.pm/exla/EXLA.html](https://hexdocs.pm/exla/EXLA.html)  
 VLM (Vision Language Models Explained): [https://huggingface.co/blog/vlms](https://huggingface.co/blog/vlms)  
 [https://github.com/ggml-org/llama.cpp](https://github.com/ggml-org/llama.cpp)  
 Vector Search in Elixir: [https://github.com/elixir-nx/hnswlib](https://github.com/elixir-nx/hnswlib)  
 [https://www.amplified.ai/](https://www.amplified.ai/)  
 Llama 4 [https://mistral.ai/](https://mistral.ai/)  
  
 Mistral Open-Source LLMs: [https://mistral.ai/](https://mistral.ai/)  
 [https://github.com/openai/whisper](https://github.com/openai/whisper)  
 Elixir Wizards Season 5: Adopting Elixir [https://smartlogic.io/podcast/elixir-wizards/season-five](https://smartlogic.io/podcast/elixir-wizards/season-five)  
 [https://docs.ray.io/en/latest/ray-overview/index.html](https://docs.ray.io/en/latest/ray-overview/index.html)  
 [https://hexdocs.pm/flame/FLAME.html](https://hexdocs.pm/flame/FLAME.html)  
 [https://firecracker-microvm.github.io/](https://firecracker-microvm.github.io/)  
 [https://fly.io/](https://fly.io/)  
 [https://kubernetes.io/](https://kubernetes.io/)  
 WireGuard VPNs [https://www.wireguard.com/](https://www.wireguard.com/)  
 [https://hexdocs.pm/phoenixpubsub/Phoenix.PubSub.html](https://hexdocs.pm/phoenixpubsub/Phoenix.PubSub.html)  
 [https://www.manning.com/books/deep-learning-with-python](https://www.manning.com/books/deep-learning-with-python)  
 Code BEAM 2025 Keynote: Designing LLM Native Systems - Sean Moriarity  
 Ash Framework [https://ash-hq.org/](https://ash-hq.org/)  
 Sean’s Twitter: [https://x.com/seanmoriarity](https://x.com/seanmoriarity)  
 Sean’s Personal Blog: [https://seanmoriarity.com/](https://seanmoriarity.com/)  
  
 Erlang Ecosystems Foundation Slack: [https://erlef.org/slack-invite/erlef](https://erlef.org/slack-invite/erlef)  
 Elixir Forum [https://elixirforum.com/](https://elixirforum.com/)  
 Sean’s LinkedIn: [https://www.linkedin.com/in/sean-m-ba231a149/](https://www.linkedin.com/in/sean-m-ba231a149/)

Special Guest: Sean Moriarity.
