{"id":13691313,"url":"https://github.com/elixir-nx/ortex","last_synced_at":"2025-10-10T02:32:21.083Z","repository":{"id":164598930,"uuid":"639075609","full_name":"elixir-nx/ortex","owner":"elixir-nx","description":"ONNX Runtime bindings for Elixir","archived":false,"fork":false,"pushed_at":"2024-11-19T19:08:09.000Z","size":114,"stargazers_count":185,"open_issues_count":8,"forks_count":20,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-09-21T19:21:09.410Z","etag":null,"topics":["elixir","machine-learning","onnx","onnxruntime","rust"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-nx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-10T17:53:46.000Z","updated_at":"2025-09-10T13:14:38.000Z","dependencies_parsed_at":"2024-02-21T23:25:42.134Z","dependency_job_id":"1db6c2a3-6797-4d0d-b3e1-db48ebc7e4c8","html_url":"https://github.com/elixir-nx/ortex","commit_stats":{"total_commits":64,"total_committers":9,"mean_commits":7.111111111111111,"dds":0.359375,"last_synced_commit":"450dbe6ec6cc96e4e5509a746937ccde25de0144"},"previous_names":["relaypro-open/ortex"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-nx/ortex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fortex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fortex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fortex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fortex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-nx","download_url":"https://codeload.github.com/elixir-nx/ortex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fortex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002541,"owners_count":26083400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","machine-learning","onnx","onnxruntime","rust"],"created_at":"2024-08-02T17:00:43.254Z","updated_at":"2025-10-10T02:32:21.048Z","avatar_url":"https://github.com/elixir-nx.png","language":"Elixir","funding_links":[],"categories":["Machine Learning","Model Serving and Inference"],"sub_categories":["Deep Learning"],"readme":"# Ortex\n\n`Ortex` is a wrapper around [ONNX Runtime](https://onnxruntime.ai/) (implemented as\nbindings to [`ort`](https://github.com/pykeio/ort)). Ortex leverages\n[`Nx.Serving`](https://hexdocs.pm/nx/Nx.Serving.html) to easily deploy ONNX models\nthat run concurrently and distributed in a cluster. Ortex also provides a storage-only\ntensor implementation for ease of use.\n\nONNX models are a standard machine learning model format that can be exported from most ML\nlibraries like PyTorch and TensorFlow. Ortex allows for easy loading and fast inference of\nONNX models using different backends available to ONNX Runtime such as CUDA, TensorRT, Core\nML, and ARM Compute Library.\n\n## Examples\n\nTL;DR:\n\n```elixir\niex\u003e model = Ortex.load(\"./models/resnet50.onnx\")\n#Ortex.Model\u003c\n  inputs: [{\"input\", \"Float32\", [nil, 3, 224, 224]}]\n  outputs: [{\"output\", \"Float32\", [nil, 1000]}]\u003e\niex\u003e {output} = Ortex.run(model, Nx.broadcast(0.0, {1, 3, 224, 224}))\niex\u003e output |\u003e Nx.backend_transfer() |\u003e Nx.argmax\n#Nx.Tensor\u003c\n  s64\n  499\n\u003e\n```\n\nInspecting a model shows the expected inputs, outputs, data types, and shapes. Axes with\n`nil` represent a dynamic size.\n\nTo see more real world examples see the `examples` folder.\n\n### Serving\n\n`Ortex` also implements `Nx.Serving` behaviour. To use it in your application's\nsupervision tree consult the `Nx.Serving` docs.\n\n```elixir\niex\u003e serving = Nx.Serving.new(Ortex.Serving, model)\niex\u003e batch = Nx.Batch.stack([{Nx.broadcast(0.0, {3, 224, 224})}])\niex\u003e {result} = Nx.Serving.run(serving, batch)\niex\u003e result |\u003e Nx.backend_transfer() |\u003e Nx.argmax(axis: 1)\n#Nx.Tensor\u003c\n  s64[1]\n  [499]\n\u003e\n```\n\n## Installation\n\n`Ortex` can be installed by adding `ortex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ortex, \"~\u003e 0.1.10\"}\n  ]\nend\n```\n\nYou will need [Rust](https://www.rust-lang.org/tools/install) for compilation to succeed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-nx%2Fortex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-nx%2Fortex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-nx%2Fortex/lists"}