Multi-dimensional arrays (tensors) and numerical definitions for Elixir, enabling machine learning and scientific computing.
Nx is a numerical computing library for Elixir that provides multi-dimensional arrays (tensors) and a comprehensive set of numerical operations. It solves the problem of performing efficient numerical computations and machine learning within the Elixir ecosystem, enabling developers to work with tensors and run computations across different hardware backends.
Elixir developers who need to perform numerical computations, data scientists working within the BEAM ecosystem, and machine learning practitioners who want to leverage Elixir's concurrency and fault-tolerance features for numerical workloads.
Developers choose Nx because it brings native numerical computing capabilities to Elixir with a clean API, multiple backend support (including GPU acceleration via EXLA), and seamless integration with the BEAM VM's strengths in concurrency and distribution.
Multi-dimensional arrays (tensors) and numerical definitions for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows writing tensor code once and running it on CPU, GPU, or TPU via EXLA or Torchx backends, as highlighted in the key features.
Maintains Elixir's functional programming principles and syntax, enabling seamless use within the BEAM ecosystem for concurrent and distributed computations.
Leverages Google's XLA compiler through EXLA for optimized hardware acceleration, providing efficient numerical operations on supported backends.
Offers a full set of numerical definitions for tensor manipulation, covering essential needs for machine learning and scientific computing in Elixir.
Compared to Python's NumPy or PyTorch, Nx has a smaller community, fewer pre-built models, and less third-party tooling, which can slow development.
Documentation is spread across subprojects like Nx, EXLA, and Torchx, with examples in EXLA, making it harder for newcomers to find unified resources.
Configuring backends like EXLA may require installing external dependencies and managing native extensions, adding overhead compared to all-in-one solutions.
Nx is an open-source alternative to the following products:
TensorFlow is an open-source machine learning framework developed by Google for building and deploying ML models across various platforms.
PyTorch is an open-source machine learning framework that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based autograd system.