ONNX Runtime

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

Library
PyPI
v1.31.0
22,153 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
71%
MIT

Langflow

AI Agents · AI Development

155,973

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
64
Dependency
Built with
Python 71%
TypeScript 21%
Updated 5 days ago
Python
55%
MIT

LibrePhotos

File Storage

8,111

Self-hosted photo library with AI-powered face recognition, semantic search, and automatic event albums — no cloud required.

View details
84
Repo Health
78
Technical
66
Dependency
Built with
Python 55%
TypeScript 43%
Updated 5 days ago
Rust
59%
Apache 2.0

magika

Developer Tools · Security

18,740

AI-powered file type detection that identifies 200+ content types with ~99% accuracy in milliseconds using a compact deep learning model.

View details
85
Repo Health
85
Technical
74
Dependency
Built with
Rust 59%
YARA 12%
Python 10%
Updated 6 days ago
Python
95%
MIT

MemPalace

AI Agents · AI Development · AI Memory

59,720

Local-first AI memory with verbatim storage, pluggable backends, and 96.6% retrieval recall on LongMemEval — no API key required.

View details
86
Repo Health
84
Technical
73
Dependency
Built with
Python 95%
Updated 6 days ago
Python
38%
Other

Open WebUI

AI Agents · AI Assistants

156,607

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
92
Repo Health
75
Technical
66
Dependency
Built with
Python 38%
Svelte 35%
JavaScript 19%
Updated 5 days ago
TypeScript
93%
MIT

OpenReel Video

Video Editors

5,442

A browser-based, GPU-accelerated video editor with multi-track timelines, color grading, and 4K export — no uploads, no installs, no watermarks.

View details
72
Repo Health
80
Technical
71
Dependency
Built with
TypeScript 93%
Updated 1 weeks ago
Python
50%
AGPL 3.0

VoiceStudio

Mcp · Music Audio · Voice AI

83,641

Open-source, fully local ElevenLabs alternative for voice cloning, voice design, video dubbing, dictation, transcription and audiobooks, with a local API and MCP server for agents.

View details
86
Repo Health
83
Technical
70
Dependency
Built with
Python 50%
JavaScript 22%
TypeScript 21%
Updated 5 days ago
TypeScript
50%
Other

World Monitor

Analytics · Monitoring

89,376

Real-time global intelligence dashboard that fuses AI-synthesized news, geopolitical risk scoring, and infrastructure tracking into one open-source situational awareness platform.

View details
87
Repo Health
89
Technical
68
Dependency
Built with
TypeScript 50%
JavaScript 48%
Updated 5 days 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