Elixir Mentor

Paulo Valente on Nx

Dec 14, 2024
Paulo Valente, R&D software engineer and maintainer of Nx, builds numerical computing and ML tooling for Elixir. He explains what Nx is and how tensors work. He dives into backends, compilers, and performance tips. He covers Axon and Bumblebee for models, CPU vs GPU tradeoffs, partitioning and sharding, and running ML on Mac and mobile.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ANECDOTE

From Music DSP To Building An Online Bank With Elixir

  • Paulo's path to Elixir began with an internship at a Brazilian fintech where his team built an online bank and later migrated to Elixir.
  • His background in music and DSP led him into linear algebra and machine learning, motivating his NX work.
INSIGHT

NX Bridges Elixir And Native Numeric Code

  • NX provides a high-level Elixir interface for numerical computing by turning Elixir code into data and lowering it to native functions.
  • Paulo built NX to avoid slow BEAM loops and leverage metaprogramming to call optimized C/C++ or Rust backends for tensors.
INSIGHT

Tensors Are Multidimensional Arrays Explained

  • Tensors are generalized multi-dimensional arrays: scalars, vectors, matrices and higher dimensions like images (3D) or videos (4D).
  • Paulo illustrates tensors with RGB images as width×height×channels and video as an extra time dimension for practical intuition.
Get the Snipd Podcast app to discover more snips from this episode
Get the app