﻿# ONNX Runtime small-range quantization: a subnormal scale is not automatically zero

The 1.32 quantization repair preserves valid float16 subnormal scales; inspect exported small-range tensors rather than relying on model-load success.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-engine-ort-fp16-subnormal-quantization-scales/
Language: en

ONNX Runtime 1.32.0 preserves representable float16 subnormal quantization scales instead of replacing them with one. The linked PR explains that the old substitution could zero small-range weights. This is an exporter-side numerical correction, distinct from a runtime kernel flushing an unrepresentable intermediate or from ordinary low-bit approximation error.

## Representable small values still carry information

A scale can be smaller than the normal float16 range and still be representable. Replacing it with a convenient fallback changes the quantizer’s mapping. The PR preserves such values for scalar and blocked cases. A proposed regression starts with nonzero small-range weights, checks the exported scale and quantized codes, and reconstructs the weights. A tensor of all zeros is a useful control but cannot expose accidental zeroing of real small values.

## Separate quantization from runtime execution

A corrected runtime cannot recover weights already exported as zero by a previous conversion. Re-run the relevant quantization step and inspect the new artifact before comparing inference. Preserve the original source model and quantizer settings, including datatype and blocked layout. Otherwise a release update that only swaps a runtime library may appear ineffective because the numerically damaged model file remains unchanged on disk.

## Bias scales require their own coverage

The PR also addresses float16 QDQ bias handling when its scale underflows or clips. That is related but not identical to the weight-scale case. Include a model with meaningful bias and compare reconstructed contributions separately where possible. A weight-only test can pass while a bias path remains unexercised. Report both the quantized artifact properties and resulting numerical outputs, rather than treating a valid ONNX file as proof of preserved values.

## Do not promise a universal accuracy gain

The release repairs preservation of a specific numeric range. Its effect on a task metric depends on whether a model contains affected weights or biases and how they influence outputs. This article reports the upstream conversion repair and an artifact-level test design, without claiming a new benchmark score. An unaffected model can legitimately produce identical results after re-export, while an affected model needs its own quality evaluation.

## Sources

- [ONNX Runtime v1.32.0 release](https://github.com/microsoft/onnxruntime/releases/tag/v1.32.0)
- [ONNX Runtime pull request #33239](https://github.com/microsoft/onnxruntime/pull/33239)

## Related reading

- [ONNX QuantizeLinear: the scale shape and axis define what is quantized together](/journal/fg2-onnx-quantize-linear-axis-scale-contract/)
- [NNCF ONNX and ORT GenAI INT4: what a fair comparison must preserve](/journal/nncf-onnx-ort-genai-int4-export-quality-memory-boundaries/)
