--- id: onnx version: "1.22.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # onnx — Open Neural Network Exchange License: permissive · Maintenance: active · Downloads: 20.5M/mo ## What it is and what it does ONNX is a standardized, open-source format for representing machine learning models—both deep learning and traditional ML—along with a Python package for loading, inspecting, and manipulating those models. It defines an extensible computation graph model, built-in operators, and standard data types, with a focus on inference (scoring). The package lets you load ONNX model files, validate their structure, perform shape and type inference, and convert between opset versions. ONNX is widely adopted across frameworks (PyTorch, TensorFlow, scikit-learn, and others) and hardware platforms, making it a bridge between research and production. By using ONNX, you can train a model in one framework and deploy it with a different runtime or hardware accelerator without rewriting inference code. The Python package depends on numpy, protobuf, typing_extensions, and ml_dtypes, and provides abi3-compatible wheels for Python 3.12 and later, allowing a single binary to work across multiple Python versions. Use it for: - Export a model trained in PyTorch or TensorFlow to ONNX format for deployment on edge devices or inference servers. - Load and validate ONNX models to ensure they conform to the specification before production use. - Convert models between different ONNX opset versions to maintain compatibility across tools and runtimes. - Perform shape and type inference on ONNX graphs to understand model I/O and intermediate tensor properties. - Build model optimization and transformation pipelines that work across multiple training frameworks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ONNX provides an open-source format and runtime for representing and executing AI models across different frameworks and hardware platforms, enabling model interoperability and inference. Yes. ONNX is a mature, widely-adopted standard (active maintenance, 21312 stars, top 5000 PyPI package) with no known vulnerabilities, permissive licensing, and broad platform support. Install it if you need to work with ONNX models, export models to ONNX format, or build cross-framework inference pipelines. The medium install friction is manageable given the availability of prebuilt wheels for common platforms and Python versions. ## Install pip install onnx uv add onnx poetry add onnx ## Installing onnx Before you install: Medium install friction with prebuilt wheels for common platforms (macOS, Linux x86_64, Windows, ARM) and Python versions 3.10–3.14. Active maintenance with a recent release and 21312 repository stars. Depends on numpy, protobuf, typing_extensions, and ml_dtypes. License in practice: Apache-2.0 is permissive; you may use, modify, and distribute ONNX freely in commercial and open-source projects, provided you include a copy of the license and note any material changes. Quickstart: pip install onnx import onnx model = onnx.load('model.onnx') onnx.checker.check_model(model) Requires Python 3.10 or later. Model files must be in valid ONNX format. Verify before relying: - Whether the package includes a reference implementation or if optional dependencies are needed for full inference capability. - Performance characteristics and inference speed compared to native framework execution. - Supported ONNX opset versions and operator coverage for your specific models. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 20.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags neural network model format, model interoperability framework, ai model inference runtime, cross-framework model exchange, deep learning model serialization, onnx model loading and execution, portable ai model format, model-format, interoperability, inference [View on SkillFed](https://skillfed.io/packages/onnx) · [View on PyPI](https://pypi.org/project/onnx/)