qonnx
Frontend and utilities for QONNX
What it is and what it does
QONNX is a toolkit for representing and working with quantized neural networks in ONNX format. It introduces custom operators—IntQuant, FloatQuant, BipolarQuant, and Trunc—that enable arbitrary-precision integer and minifloat quantization while remaining compatible with standard ONNX protobuf. Quantized values are stored as standard floats to maintain compatibility.
The package provides utilities for executing QONNX models for functional verification, performing shape inference and constant folding, calculating inference costs in terms of mixed-precision MACs and memory volume, and transforming models between quantization representations. It integrates with quantization-aware training frameworks like Brevitas, QKeras, and HAWQ for export, and supports deployment via FPGA-focused frameworks like FINN and hls4ml.
Use it for:
- Export quantized models from Brevitas or QKeras and verify their behavior by executing them with QONNX utilities
- Analyze inference cost of a quantized model in terms of bit operations, memory footprint, and per-layer MAC counts
- Convert quantized models from QONNX representation to QCDQ-style quantization for different deployment targets
- Develop custom quantization transformations and executable operators using QONNX's Python infrastructure
- Prepare quantized neural networks for FPGA deployment via FINN or hls4ml by using QONNX as an intermediate representation
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
QONNX provides Python utilities to work with quantized neural networks in ONNX format, including custom operators for arbitrary-precision integer and minifloat quantization, model execution, shape inference, and inference cost analysis.
Yes, if you work with quantized neural networks and need a common representation for export, analysis, or deployment. The package is actively maintained, has no known vulnerabilities, uses permissive licensing, and integrates with established QAT frameworks and FPGA toolchains. Install friction is low. Not necessary if you only work with standard full-precision ONNX models.
Install
qonnx on PyPI
pip
pip install qonnxuv
uv add qonnxpoetry
poetry add qonnxInstalling qonnx
Before you install
Low friction installation with a pure-Python wheel. Active maintenance as of June 2026 with 191 repository stars. Depends on 11 runtime packages including numpy, onnx, onnxruntime, and protobuf—all established libraries.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
Quickstart
pip install qonnx
from qonnx.core.modelwrapper import ModelWrapper
from qonnx.core.onnx_exec import execute_onnx
import numpy as np
model = ModelWrapper("my-qonnx-model.onnx")
idict = {"in0": np.load("in0.npy"), "in1": np.load("in1.npy")}
odict = execute_onnx(idict)
Verify before relying
- Minimum Python version requirement (requires_python field is unspecified in metadata)
- Whether all 11 runtime dependencies are strictly required or if some are optional for specific features
Package facts
| License | Apache-2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — importlib-metadata, attrs, clize, protobuf, bitstring, numpy, onnx, onnxruntime, onnxscript, sigtools, toposort |
| Maintenance | actively maintained — 176 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 74,027/month — #14,888 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: qonnx-1.0.0-py2.py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
onnx-toolParse, analyze, optimize, and profile ONNX…
permissive · top 15,000 on PyPI
optimum-quantoA PyTorch quantization backend that reduces…
permissive · top 15,000 on PyPI
nncfNNCF provides post-training and training-time…
permissive · top 5,000 on PyPI
nvidia-modeloptApplies state-of-the-art model optimization…
permissive · top 15,000 on PyPI
diffqDiffQ performs differentiable quantization of…
noncommercial · top 15,000 on PyPI
qwixQwix is a JAX quantization library that applies…
permissive · top 15,000 on PyPI
onnxsimSimplifies ONNX neural network models by…
permissive · top 15,000 on PyPI
onnxruntime_extensionsExtends ONNX Runtime with custom operators for…
permissive · top 15,000 on PyPI
model-compression-toolkitCompresses and optimizes neural networks…
permissive · top 15,000 on PyPI
onnxoptimizerApplies graph-level optimizations to ONNX…
permissive · top 15,000 on PyPI