onnxsim
Simplify your ONNX model
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses permissive licenses, and solves a real problem in ONNX model deployment. Medium install friction is acceptable given the precompiled wheels for modern Python versions and multiple platforms. Install if you work with exported ONNX models and need to reduce their size or remove redundant operations.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10 and the onnx package (a runtime dependency).
- Medium install friction due to precompiled wheels for multiple Python versions and platforms (cp310–cp314, macOS arm64, Linux x86_64/aarch64, Windows).
- Active maintenance with a release 2 days ago and 4386 repository stars.
License · maintenance · safety
MIT AND (Apache-2.0 OR BSD-2-Clause) (permissive) — Dual-licensed under MIT and (Apache-2.0 OR BSD-2-Clause), both permissive. You may use, modify, and distribute freely under either license's terms.
last release 2026-08-12 (2 days) · last repo commit 2026-08-14 · 4,386 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 542,989 downloads/mo, #6,087 on PyPI
Alternatives
Verify before relying
pip install onnxsim
import onnx
from onnxsim import simplify
model = onnx.load('model.onnx')
model_simp, check = simplify(model)
assert check, "Simplified model validation failed"- Whether onnxruntime is truly optional or recommended for performance; fact sheet notes it falls back to ONNX reference evaluator but does not quantify the performance difference.
- Whether the web version and Node.js npm package share feature parity with the Python package or have limitations not mentioned in the excerpt.
What it is and what it does
ONNX Simplifier takes a compiled ONNX neural network model and reduces it by eliminating redundant operations through constant folding, shape inference, and graph optimization. It runs a fixed-point loop of these three techniques until the model stops changing, then optionally validates the result against the original on random inputs to ensure correctness.
The package is used to shrink models exported from frameworks like PyTorch, making them faster to load and run while preserving numerical behavior. It handles both static and dynamic input shapes, supports custom operators (including TensorRT plugins), can inline local functions, simplify subgraphs, and convert between ONNX opset versions. It is available as a Python package with a CLI, a C API, a Rust wrapper, and a zero-install web version.
Use it for
- Reduce the size of PyTorch models exported to ONNX before deployment to edge devices or inference servers.
- Remove redundant reshape, transpose, and constant-computation nodes introduced during framework export.
- Validate that a simplified ONNX model produces numerically equivalent outputs on random test inputs.
- Upgrade or downgrade an ONNX model's opset version while cleaning up any redundant nodes the conversion introduces.
- Simplify models containing custom operators like TensorRT plugins without manually moving them to a custom domain.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses permissive licenses, and solves a real problem in ONNX model deployment. Medium install friction is acceptable given the precompiled wheels for modern Python versions and multiple platforms. Install if you work with exported ONNX models and need to reduce their size or remove redundant operations.
Install
onnxsim on PyPI
Before you install
Medium install friction due to precompiled wheels for multiple Python versions and platforms (cp310–cp314, macOS arm64, Linux x86_64/aarch64, Windows). Active maintenance with a release 2 days ago and 4386 repository stars.
Requires Python >=3.10 and the onnx package (a runtime dependency).
License in practice
Dual-licensed under MIT and (Apache-2.0 OR BSD-2-Clause), both permissive. You may use, modify, and distribute freely under either license's terms.
Quickstart
pip install onnxsim
import onnx
from onnxsim import simplify
model = onnx.load('model.onnx')
model_simp, check = simplify(model)
assert check, "Simplified model validation failed"
Verify before relying
- Whether onnxruntime is truly optional or recommended for performance; fact sheet notes it falls back to ONNX reference evaluator but does not quantify the performance difference.
- Whether the web version and Node.js npm package share feature parity with the Python package or have limitations not mentioned in the excerpt.
Package facts
| License | MIT AND (Apache-2.0 OR BSD-2-Clause) permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 2 packagesonnxrich |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 542,989 / month, #6,087 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Software Development |
Evidence: onnxsim-0.7.3-cp310-cp310-macosx_13_0_arm64.whl; onnxsim-0.7.3-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; onnxsim-0.7.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; onnxsim-0.7.3-cp310-cp310-win_amd64.whl; onnxsim-0.7.3-cp311-cp311-macosx_13_0_arm64.whl; onnxsim-0.7.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; onnxsim-0.7.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; onnxsim-0.7.3-cp311-cp311-win_amd64.whl; onnxsim-0.7.3-cp312-abi3-macosx_13_0_arm64.whl; onnxsim-0.7.3-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; onnxsim-0.7.3-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; onnxsim-0.7.3-cp312-abi3-win_amd64.whl; onnxsim-0.7.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “constant folding neural networks”
- onnxsimSimplifies ONNX neural network models by running constant folding,…
- onnxoptimizerApplies graph-level optimizations to ONNX models, including a library…
- qonnxQONNX provides Python utilities to work with quantized neural…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also onnxoptimizer · spo4onnx · onnx-tool · onnxscript · onnx-weekly · onnx-graphsurgeon · onnx-ir · onnx2torch · onnx · tf2onnx