Skip to content
Docs
Compare and Morph
Weight diff

Weight Diff

A weight diff is the numeric half of Model Diff: a per-element |A − B| comparison between two aligned tensors, rendered wherever comparison mode is available - the Diff view, the Matrix/Heatmap Diff shading mode, and the Signal/Distribution Delta sub-mode.

Always logical, never raw bytes

💡

A weight diff always compares fully reassembled, logical tensor values - never raw per-shard or per-file bytes. A checkpoint re-saved with a different sharding strategy, a different file layout, or a different serialization format still diffs as unchanged if its logical values didn't change.

This is why a sharding strategy change alone never shows up as a false difference, and why comparing a safetensors checkpoint against an ONNX export of the "same" model (once properly aligned) is a meaningful comparison rather than something that trivially fails on format grounds.

Reading a diff heatmap

The diff shading mode uses Tensormorph's standard diverging color convention - cyan where the candidate increased relative to baseline, red where it decreased, dark where nothing changed - so a diff heatmap is readable using exactly the same color vocabulary as the Signed shading mode elsewhere, not a diff-specific palette you have to relearn.

Diff statistics, not just the picture

Alongside the visual heatmap, a diff carries its own tile statistics - mean absolute difference, max difference, and the fraction of elements that changed at all - computed the same mergeable way as any other statistic, so "how different are these two tensors, roughly" is answerable at a glance from the Inspector panel without reading the whole heatmap.

From numeric to semantic

A weight diff on its own only tells you where and how much changed. See Model Diff for the best-effort classification layer on top - distinguishing a difference that looks like quantization noise from one that looks like a genuine, meaningful change - and Quantization Diff specifically for the quantized-vs-full-precision case.

Related resources

  • Model Diff - alignment and semantic classification underlying every weight diff.
  • Structural Diff - comparing architecture, for when shapes or module structure themselves differ.
  • Comparison Editor - every view a weight diff can be rendered in.