--- id: qonnx version: "1.0.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # qonnx — Frontend and utilities for QONNX License: permissive · Maintenance: active · Downloads: 74.0K/mo ## 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 above — 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 pip install qonnx uv add qonnx poetry add qonnx ## Installing 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: unspecified - Install friction: low - Maintenance: active - Downloads: 74.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags quantized neural networks ONNX, arbitrary precision quantization, ONNX model execution, inference cost analysis, mixed precision neural networks, quantization aware training export, ONNX custom operators, quantization, neural-networks, onnx [View on SkillFed](https://skillfed.io/packages/qonnx) · [View on PyPI](https://pypi.org/project/qonnx/)