elixir-nx/ortex
59.3
Adequate · 18 September 2026
1.3k
lines of production code
Rust
with Elixir, Python
1
measurement over time
What this system is
Ortex is an Elixir library that provides an ONNX Runtime backend for the Nx numerical computing library, enabling the loading and execution of ONNX models directly within the Elixir ecosystem. It supports concurrent and distributed model serving via Nx.Serving and automatically selects appropriate hardware acceleration backends, such as CUDA or CoreML, based on the operating system. The system facilitates tensor operations and inference for various model types, including image classification and text generation, through native Rust bindings.
Features
Added DistilBert and StableLM inference examples
New example scripts demonstrate how to run ONNX models for text classification and text generation. The DistilBert example shows sentiment analysis using a model exported from Hugging Face transformers, while the StableLM example demonstrates text generation with a tuned language model. Both examples include Python export scripts and Elixir inference code using Ortex and Tokenizers.
examples · high confidence
Added Python scripts to export ResNet50 and multi-input models to ONNX with Opset 19
New Python scripts have been added to the repository to facilitate the generation of test models. The \export\_resnet.py\ script exports a pretrained ResNet50 model to ONNX format, while \multi\_input.py\ exports a custom multi-input, multi-output model. Both scripts explicitly target ONNX Opset version 19, ensuring consistent export behavior for downstream testing or integration.
python · high confidence
Initial release of Ortex ONNX Runtime wrapper
This change introduces Ortex, a new Elixir library that wraps ONNX Runtime (via the \ort\ crate) to enable loading and running ONNX models with support for various backends like CUDA and TensorRT. It integrates with Nx.Serving for concurrent and distributed model deployment and includes a storage-only tensor implementation. The release adds the core library code, configuration files (\.formatter.exs\, \.gitignore\), documentation (\README.md\), and sets the initial version to 0.1.10.
(repo-wide) · high confidence
Initial release of Ortex ONNX inference backend
Ortex introduces a new ONNX runtime integration for Elixir, providing an \Nx.Backend\ implementation (\Ortex.Backend\) that allows ONNX models to be used directly with the Nx numerical library. The library includes \Ortex.Model\ for loading and running inference on ONNX files, \Ortex.Serving\ for batched inference via \Nx.Serving\, and native bindings (\Ortex.Native\) that handle ONNX Runtime library loading and tensor operations like slice, reshape, and concatenate. This enables users to leverage pre-trained ONNX models within the Elixir/Nx ecosystem without leaving the language.
lib/ortex · high confidence
Initial release of the Ortex ONNX Runtime backend
This change introduces the Ortex backend, a new native Rust implementation for running ONNX models within Nx. It provides the core infrastructure to load ONNX models, inspect their input/output signatures, and execute inference using the ONNX Runtime (via the \ort\ crate). The backend supports a wide range of tensor data types (including signed/unsigned integers, floats, and bfloat16) and allows users to specify execution providers such as CPU, CUDA, TensorRT, and ROCm. Additionally, it exposes tensor manipulation operations like slicing, reshaping, and concatenation, along with efficient binary serialization for data transfer between the BEAM and the native layer.
native/ortex · high confidence
Introduce Ortex library for ONNX model inference
Added the \Ortex\ module, an Elixir wrapper around ONNX Runtime that allows users to load ONNX models from disk and execute forward passes. The library supports specifying execution providers (such as CPU or CUDA) and graph optimization levels, with default configurations provided for standard usage.
lib · high confidence
Behavioural changes
1 commit (0 fixes) modifying models
A change to existing behaviour in models — 1 commit, 1 file.
models · low confidence · unverified
Automatic ONNX execution provider selection based on OS
The application now automatically configures the ONNX Runtime backend features based on the operating system to optimize inference performance. On Windows, it enables DirectML; on macOS, it enables CoreML; and on other Unix-like systems, it enables CUDA and TensorRT. This configuration is applied at runtime via the new \config/runtime.exs\ file, ensuring the correct native libraries are loaded without manual intervention.
config · high confidence
Test coverage
Added test coverage for tensor shape operations; Added test suite for data type conversions and model serving.
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 59.
Lenses
- Code Health 99
- Architecture 69
- Maturity 49
- Readiness 55
- Security 94
Changes since last survey
- 86 commits — 76 feature/other, 10 fixes
By area
- (root) — 24 commits
- (repo) — 21 commits
- native/ortex — 16 commits
- lib/ortex — 11 commits
- .github/workflows — 2 commits
- examples/distilbert — 2 commits
- lib/ortex.ex — 2 commits
- python/export_resnet.py — 2 commits
- config/config.exs — 1 commit
- examples/stablelm — 1 commit
- models/tinymodel.onnx — 1 commit
- python/multi_input.py — 1 commit
- test/ortex_test.exs — 1 commit
- test/shape — 1 commit
Notable commits
- fix: Doc fixes and examples for Ortex.Serving
- fix: Merge pull request #48 from zentourist/fix/support-elixir-1.19
- fix: dependabot fix: Upgrade rustls to version 0.22.4 or later
- fix: fix for MacOS linking failure
- fix: fixes for libonnxruntime runtime path and rustler version bump
- fix: fixes for macos dylibs
- fix: fixes for shared library loading and downloading
- fix: fixes to make libonnxruntime path placement more generic
- fix: fixing copy bug
- fix: removing copy-bug helper
- change: Automatic execution provider feature selection based on environment
- change: CI: Specify Erlang vsn for macOS
- change: CI: mix test on Linux, macOS
- change: Doc changes
- change: Exclude resnet5 tests if model is not available
- change: Explicit opset version in resnet50 export test, formatting
- change: Initial commit
- change: Initial commit
- change: Merge branch 'elixir-nx:main' into bool_tensors
- change: Merge pull request #10 from elixir-nx/jv-readme
- …and 66 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
elixir-nx/ortex was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 55dc3de016041b16ec6d17589f020937b0bb18fc — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.