ONNX Runtime

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

Library
PyPI
v1.29.0
21,399stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
95/100Excellent
Development Activity100
Maintenance96
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
81/100Excellent
Architecture92
Code Quality88
Innovation85
Learning Curve60

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 9 apps in this directory

Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

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

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
TypeScript
48%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,476

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

View details
83
Repo Health
82
Technical
71
Dependency
Built with
TypeScript48%
Python47%
Updated 3 days ago
Python
80%
Apache 2.0

headroom

AI Development · Developer Tools

66,835

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
84
Repo Health
86
Technical
73
Dependency
Built with
Python80%
Rust14%
Updated today
Python
83%
Apache 2.0

knowhere

AI Development · Developer Tools

2,515

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

View details
83
Repo Health
75
Technical
70
Dependency
Built with
Python83%
HTML16%
Updated today
Python
68%
MIT

Langflow

AI Agents · AI Development

153,450

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

View details
90
Repo Health
85
Technical
66
Dependency
Built with
Python68%
TypeScript22%
Updated today
Python
60%
MIT

LibrePhotos

File Storage

8,044

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

View details
82
Repo Health
78
Technical
67
Dependency
Built with
Python60%
TypeScript37%
Updated 3 days ago
Python
33%
Apache 2.0

magika

Developer Tools · Security

17,958

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

View details
75
Repo Health
85
Technical
77
Dependency
Built with
Python33%
Rust26%
TypeScript18%
Updated today
Python
95%
MIT

MemPalace

AI Agents · AI Development

58,455

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

View details
85
Repo Health
84
Technical
72
Dependency
Built with
Python95%
Updated yesterday
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

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

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python37%
Svelte33%
JavaScript22%
Updated today

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

Search