What is QONNX?
mainQONNX (Quantized ONNX) is a framework for representing arbitrary-precision uniform quantization within ONNX. It uses four custom operators to enable representation of binary, ternary, 3-bit, 4-bit, 6-bit, or any other quantization, as well as quantized floating-point values.
Key features:
- Quantization as an operator: Can be applied to any parameter or layer input.
- Flexible Granularity: Supports various choices for scaling factor and zero-point granularity.
- ONNX Compatibility: Quantized values are carried using standard
floatdatatypes to maintain ONNX protobuf compatibility.
QONNX provides Python utilities for:
- Functional verification (execution).
- Shape inference, constant folding, and basic optimizations.
- Summarizing inference costs (mixed-precision MACs, parameter/activation volume).
- Writing transformations and defining custom ops.
- (Experimental) Data layout conversion from NCHW to custom NHWC ops.