Skip to content
Docs
Inspect and Analyze
Histograms and distributions

Histograms and Distributions

The log-scale histogram is one of the core tile statistics Tensormorph computes for every tensor, and it has its own dedicated 1D view for reading a value distribution directly rather than as a byproduct of a color scale.

Why log-scale by default

Weight and activation values in a trained model are typically concentrated near zero with a long tail - a linear-scale histogram spends most of its bins on empty or near-empty space at the extremes and collapses the interesting detail near the center into a handful of bins. Tensormorph's default histogram bins on a log scale specifically to keep both the concentration near zero and the tail legible in the same plot; a linear view is available but isn't the default for exactly this reason.

Reading a distribution

The Distribution view shows:

  • The binned histogram itself, as a bar plot.
  • Markers for the statistics computed alongside it - mean, standard deviation band, min/max/absmax - so you don't have to cross-reference the Inspector panel to see where a specific value sits relative to the shape of the distribution.
  • A cumulative curve, toggleable, for reading percentile-style questions ("what fraction of values fall below X") directly off the plot.

Distribution at any granularity

Because the underlying histogram statistic is mergeable like every other tile statistic, the Distribution view works identically whether you've selected one tile, one tensor, or an entire layer - the histogram for a coarser selection is the merge of its children's histograms, not a fresh computation.

Comparing two distributions

Selecting two tensors - most commonly the same tensor across two model revisions, or two experts in an MoE layer - overlays both histograms in the same plot rather than requiring two separate views. This is the histogram-level counterpart to a weight diff: where a numeric diff shows where two tensors differ, an overlaid distribution comparison shows whether they differ in character (a shift in mean, a change in spread, a new mode appearing) even in regions where a per-element diff would be small.

Related resources