# Model Diff

Comparing two checkpoints in Tensormorph works at two distinct levels, and it matters which one you're reading: a **numeric diff** (what changed, by how much) and a **semantic diff** (what kind of change this looks like). The Comparison Editor and every diff-flavored view in Tensormorph - [weight diff](/docs/compare-and-morph/weight-diff), [structural diff](/docs/compare-and-morph/structural-diff), [quantization diff](/docs/compare-and-morph/quantization-diff) - build on both.

## Numeric diff

The baseline comparison is a per-element difference between two aligned tensors, most commonly rendered as a heatmap of `|A − B|` alongside the [tile statistics](/docs/inspect-and-analyze/tensor-statistics) of that difference (its own mean, max, norm). This answers "where did values change, and by how much" - it's always available for any two comparably-shaped tensors, and it's what a [merge conflict](/docs/compare-and-morph/merge-conflicts) is ultimately detected from: two changed regions that overlap.

## Semantic diff

Two tensors can have a small numeric diff that's actually meaningful (a subtle miscalibration) or a large numeric diff that's actually benign (pure quantization noise, or a permutation of expert indices that doesn't change model behavior). A semantic diff tries to classify *why* two tensors differ, not just confirm that they do.

Where confidently classifiable, a semantic diff can flag a change as, for example, consistent with a low-rank update (see [Model Morphing](/docs/core-concepts/model-morphing) and [SVD, PCA and Effective Rank](/docs/inspect-and-analyze/svd-pca-and-effective-rank)), consistent with quantization rounding rather than a real value shift (see [Quantization Diff](/docs/compare-and-morph/quantization-diff)), or structurally unclassifiable - just "these differ," with no further characterization offered. Semantic classification is a best-effort layer on top of the numeric diff, never a replacement for it; the raw heatmap is always available even when nothing about the difference can be characterized further.

## Alignment comes first

Before any diff - numeric or semantic - can run, two checkpoints need to be **aligned**: matching up which tensor in A corresponds to which tensor in B. For two revisions of the same architecture this is usually direct (same names, same shapes). For architecturally different checkpoints, or [multimodal models](/docs/working-with-models/multimodal-models) where the wrong tower could be matched across, alignment is where a diff most commonly goes wrong - a diff of misaligned tensors produces numbers that are technically correct and practically meaningless.

## Related resources

-   [Weight Diff](/docs/compare-and-morph/weight-diff) - the primary numeric-diff view built on this page.
-   [Structural Diff](/docs/compare-and-morph/structural-diff) - comparing architecture rather than values.
-   [Merge Conflicts](/docs/compare-and-morph/merge-conflicts) - conflicts detected as overlapping diffs across two branches.
