Model Diff: where a model and its instruct sibling differ, layer by layer
Model Diff in Ozera shows where two language models of the same shape differ when they read the same tokens: a base model and its instruct version, or an Ozera model and a custom model of the same shape.
It compares the two models layer by layer, finds the directions their difference lies along, and patches one model’s activations into the other, with no code.
Pairs and texts
The pairs are each open-weight base model with its instruct sibling (SmolLM2 135M, SmolLM2 360M, SmolLM3 3B, Gemma 3 270M, Gemma 3 1B, Qwen3 0.6B, Qwen3 1.7B and Qwen3 4B), and Ozera-Nano or Ozera-Mini with your custom model of the same shape. The base model is the reference.
Both models read a built-in sample (64 texts of prose, or 64 of instructions) or your own texts (4 to 200 texts, up to 256 tokens each and 8,000 in all), as plain text or in the instruct model’s chat template. A text’s first token is never compared, and tokens with massive activations at a layer are left out of that layer’s statistics and counted.
Views
Layers
At every residual stream position: the relative distance between the two models’ activations of the same token (0 for identical models, about 1.4 for unrelated ones), linear CKA with its chance level, and Procrustes R², each also on the two halves of the texts (only the distance on models 2,048 or more wide) so that a profile can be told from an accident of the sample. Per token: the KL divergence between their next-token predictions, and the tokens they disagree on most.
Directions
The principal components of the difference between the two models at one layer, the tokens at either end of each, and a test on held-out texts: each component’s per-token difference is added to the base model, and the share of the KL between the models that it closes is compared with random directions carrying the same amounts.
Patch
One model’s residual stream, attention output or MLP output patched into the other on one prompt (up to 64 tokens), by layer and position, and read as the KL from the donor’s prediction at the last position. Patching a layer at every position shows from which layer on the recipient alone reproduces the donor.
The measures
Linear CKA (centred kernel alignment) measures how similar two sets of activations are up to rotation and uniform scaling: 1 when one is a rotated and scaled copy of the other, weighted towards the directions that vary most. Its chance level is what randomly paired tokens score, which is not small for a wide model read on few tokens. Procrustes R² is how much of one model’s activations a scaled rotation of the other’s explains. The KL divergence, KL(other ‖ base) in nats per token, measures how far the second model’s next-token distribution is from the base model’s.
Cost
Each view’s run is priced from its estimated GPU time and shown before it starts; both models run together on one GPU. A layer comparison on a built-in sample costs about $0.13 (as of November 2026).
Frequently asked questions
What changes inside a model when it is instruction-tuned?
Model Diff measures it for the open-weight models in Ozera: where along the layers the instruct model’s activations part from the base model’s, which tokens’ predictions differ most, which directions carry the difference, and whether adding them to the base model moves its predictions towards the instruct model’s.
Can I compare two different models, such as Qwen3 and Gemma 3?
Not in Model Diff, which needs two models of the same shape reading the same tokens. To compare how two different models represent a concept, run it on both in the Geometry Lab and compare the runs.
What is linear CKA?
Linear centred kernel alignment is a similarity score between two sets of activations of the same inputs. It is 1 when one set is a rotated and uniformly scaled copy of the other; Ozera reports it next to the score randomly paired tokens would get.
Can I diff a model I trained?
Yes, if it is an Ozera custom model: train an Ozera-Nano or Ozera-Mini on your text in Custom Models, and Model Diff compares it with the Ozera model of the same shape. Fine-tuning open-weight models is not supported.