Skip to content

Main content

Quantization Zero Point Reconstruction Residual Tool

Affine dequantization of one supplied integer code, without inferring clipping range or a quantizer.

Loading tool…

Description

Return affine quantization reconstruction and residual.

Quantization maps continuous values to a discrete representation under a scale, offset and rounding policy. Reconstructing a supplied integer or comparing a value with a bin center measures one local error; it does not determine a quantizer’s range, select rounding or measure a model’s accuracy.

Return affine quantization reconstruction and residual.

When to use this tool

Use Quantization Zero Point Reconstruction Residual when checking the supplied reconstruction or bin-center error convention.

How to use the tool and how it works

  1. Enter original, quantized, zeroPoint, scale. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read reconstructed, residual. Use the output convention below.

Return affine quantization reconstruction and residual. Require scale > 0 and whole quantized/zeroPoint; reconstructed = scale*(quantized-zeroPoint), residual = original-reconstructed.1

Input fieldMeaning and unitsAccepted input
originalOriginalRequired. Finite number.
quantizedSupplied integer representation; no implicit bit width or clipping range.Required. Safe integer.
zeroPointZero PointRequired. Safe integer.
scalePositive reconstruction increment per integer step.Required. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
reconstructedReconstructedRequired. Finite number.
residualoriginal minus reconstructed, in original-value units.Required. Finite number.
json
{
  "input": {
    "original": 1.2,
    "quantized": 15,
    "zeroPoint": 3,
    "scale": 0.1
  },
  "output": {
    "reconstructed": 1.2000000000000002,
    "residual": -2.220446049250313e-16
  }
}

Limitations and assumptions

  • No quantized range, clipping policy or learned scale is inferred; this reconstructs one supplied entry rather than quantizing a tensor.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete quantizer configuration and representative data for clipping, rounding, calibration and model-level error analysis.

References

  1. Calculation and input contract: artificial-intelligence/quantization-zero-point-reconstruction-residual — tool.io

Similar or alternative tools