# Quantization Diff

Comparing a quantized model against its full-precision source is a special case of [weight diff](/docs/compare-and-morph/weight-diff) with a different question behind it: not "did this change," but "is the *expected* quantization error the whole story, or did something else change too."

## Why this needs its own view

Every element of a quantized tensor differs from its full-precision source by construction - that's what quantization is. A plain weight diff between the two is therefore never "clean," which makes an ordinary diff heatmap nearly useless here: everything lights up, whether or not anything is actually wrong.

Quantization diff instead compares each element's actual error against the error *expected* from its [quantization scale and granularity](/docs/core-concepts/dtype-and-quantization) - an element whose error is in line with what its scale would predict is quantization noise; an element whose error is much larger than expected is a real signal worth investigating, even though both look identical in a raw diff.

## Reading a quantization diff

The Matrix/Heatmap view's quantization-diff mode shades by this normalized error rather than by raw difference, so expected noise reads as uniform low-level color and genuinely anomalous regions stand out the way an [outlier](/docs/inspect-and-analyze/outliers-and-anomalies) would in any other statistical view - the same visual language, applied to error-relative-to-expected-error instead of value-relative-to-distribution.

## Common findings

-   **Uniform low error** - quantization is behaving as expected; nothing further to investigate.
-   **Concentrated high-error regions** - often a granularity mismatch (a per-tensor scale applied where per-channel would have been more appropriate), visible as a cluster rather than noise scattered evenly.
-   **High error correlated with sparsity** - small values rounding to exactly zero (see [Sparsity](/docs/inspect-and-analyze/sparsity#why-sparsity-is-worth-checking)), which is a real behavioral change even though it's a predictable consequence of low-bit quantization.

## Related resources

-   [Dtype and Quantization](/docs/core-concepts/dtype-and-quantization) - the scale/zero-point/granularity model a quantization diff is normalized against.
-   [Weight Diff](/docs/compare-and-morph/weight-diff) - the general-purpose numeric diff this view specializes.
-   [Quantized Models](/docs/working-with-models/quantized-models) - the applied, format-level context for reading a quantized checkpoint at all.
