ONNX Runtime

Cross-platform, high-performance ML inference and training accelerator for ONNX models

Library
PyPI
v1.30.0
21,936 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
95 /100 Excellent
Development Activity 100
Maintenance 96
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 92
Code Quality 88
Innovation 85
Learning Curve 60

ONNX Runtime is a cross-platform machine-learning inference and training accelerator maintained by Microsoft. It executes models exported to the ONNX (Open Neural Network Exchange) format regardless of which framework trained them — PyTorch, TensorFlow/Keras, scikit-learn, LightGBM, XGBoost, and others all export to ONNX and can then be served by the same runtime. Rather than re-implementing a training framework, ONNX Runtime focuses on making inference (and, via ONNX Runtime Training, gradient-based training) fast and portable across wildly different hardware and operating systems.

The engine’s core abstraction is the Execution Provider (EP): a pluggable backend that maps ONNX graph operators onto specific hardware — CUDA and TensorRT for NVIDIA GPUs, DirectML and WinML for Windows, CoreML for Apple hardware, OpenVINO for Intel, QNN for Qualcomm NPUs, WebGPU/WASM for the browser, and a portable CPU fallback. At load time the runtime partitions the model graph across whichever providers are registered, applies graph-level optimizations (operator fusion, constant folding, layout transforms), and dispatches each subgraph to the fastest available provider. Bindings are published for Python, C/C++, C#, Java, JavaScript/TypeScript (Node and browser), Objective-C, and Rust, making it one of the few inference engines usable natively from nearly every major application platform.

What You Get

  • A single InferenceSession API (mirrored across Python, C++, C#, Java, JS, Rust, Objective-C) for loading and running ONNX models
  • A pluggable Execution Provider architecture spanning CUDA/TensorRT, DirectML, CoreML, OpenVINO, QNN, WebGPU/WASM, and a portable CPU backend
  • Graph-level optimizations — operator fusion, constant folding, layout transforms — applied automatically at model load time
  • ONNX Runtime Training, adding gradient computation on top of the same graph/EP infrastructure for accelerating PyTorch training loops
  • Companion tooling for quantization, model conversion, and packaging, plus dedicated example repos for inferencing and training

Common Use Cases

  • Serving a PyTorch or TensorFlow model in production without carrying the full training framework as a runtime dependency
  • Deploying the same model consistently across CPU, GPU, mobile, and browser targets by switching Execution Providers rather than rewriting inference code
  • Accelerating classical ML pipelines (scikit-learn, LightGBM, XGBoost) exported to ONNX for lower-latency serving
  • Speeding up large transformer model training on multi-node NVIDIA GPUs via ONNX Runtime Training with minimal changes to an existing PyTorch script

Under The Hood

Architecture - At the center of the codebase is a graph-based inference engine (onnxruntime/core/) that loads an ONNX protobuf model, builds an in-memory graph representation, and partitions it across one or more registered Execution Providers before running the fused, hardware-specific subgraphs. Each EP (CUDA, TensorRT, DirectML, CoreML, OpenVINO, QNN, WebGPU, and the default CPU provider) implements a common kernel-registration interface so the same graph can be split across heterogeneous hardware transparently to the caller. Language bindings (onnxruntime/python, csharp/, java/, js/, objectivec/, rust/) wrap the C API rather than reimplementing engine logic, keeping behavior consistent across languages. orttraining/ extends the same graph infrastructure with automatic differentiation for training scenarios. Tech Stack - The engine core is C++ (roughly 84% of the codebase) with CUDA/HIP kernels for GPU providers, CMake as the primary build system, and per-language packaging (setuptools/wheel for Python via setup.py, NuGet for C#, npm for JS/TS, Maven-style build for Java, Cargo for Rust). Build scripts (build.sh/build.bat) orchestrate a large, configurable CMake build supporting dozens of hardware/OS/EP combinations from a single source tree. Code Quality - Testing is extensive and organized per surface: onnxruntime/test/ covers the core engine, with parallel test suites in csharp/test, java/testdata, objectivec/test, and winml/test; a dedicated tools/perftest directory covers performance regression testing. Given the C++ core’s scale (950+ contributors, ~15k commits), code quality is enforced through required CI across many hardware targets, CPPLINT.cfg/lintrunner configs, and a documented CODEOWNERS review structure rather than a single style guide. API Design - The public API is deliberately small and uniform across every language binding: construct a session from a model, gather input tensors, call run, and read output tensors — the same four-step shape whether calling from Python, C#, Java, or Rust. This consistency is the project’s main developer-experience achievement, since it lets the same mental model transfer across a dozen deployment targets even though the underlying hardware dispatch is highly complex.

Used by 17 apps in this directory

Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
JavaScript
95%
MIT

AnythingLLM

AI Assistants · Automation · Developer Tools

66,533

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
90
Repo Health
78
Technical
64
Dependency
Built with
JavaScript 95%
Updated 6 days ago
TypeScript
49%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,667

AI-native PPT generator with Vibe editing, multi-LLM support, and fully editable PPTX export

View details
84
Repo Health
82
Technical
71
Dependency
Built with
TypeScript 49%
Python 46%
Updated 5 days ago
TypeScript
45%
AGPL 3.0

BrowserOS

AI Assistants · Browser

13,763

The open-source agentic Chromium browser with native AI agents, MCP server, and visual workflow automation — your data never leaves your machine.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 23%
Python 18%
Updated 4 days ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 5 days ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 5 days ago
TypeScript
91%
Other

GitNexus

AI Code Assistants · Developer Tools · Mcp

47,620

Index any codebase into an interactive knowledge graph and give your AI agents deep architectural context via MCP — with zero servers required.

View details
88
Repo Health
86
Technical
73
Dependency
Built with
TypeScript 91%
Updated 4 days ago
Python
82%
Apache 2.0

headroom

AI Development · Developer Tools

73,966

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
85
Repo Health
86
Technical
69
Dependency
Built with
Python 82%
Rust 12%
Updated 5 days ago
Python
86%
Apache 2.0

knowhere

AI Development · AI Memory · Developer Tools

3,541

Transform messy, unstructured documents into persistent, navigable memory that AI agents can actually use.

View details
82
Repo Health
75
Technical
66
Dependency
Built with
Python 86%
HTML 14%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers