Layer-Probing
I studied how information evolves in the residual streams of DeepSeek and Qwen, using trained probes to measure how readable their final predictions become.
DeepSeek-R1-Distill-Qwen-7B / Qwen2-7B-Instruct
Reading the residual stream
The residual stream is the hidden state carried between layers. Each block updates it. A trained probe measures how readable the model's final prediction is from that state.
3D is unavailable in this browser. The layer control and measured results below still work.
The probe bypasses later layers; the full model supplies the target.
How I trained the probes
A forward hook captured one layer’s residual output. On GSM8K reference-solution prefixes, a separate linear probe per layer learned the full model’s next-token distribution. Only probe weights changed.
One layer shown · symbolic states and predictions
Trained on an AMD Instinct MI300X, with 256 training questions and 64 held-out questions per model.
Prediction readability across layers
Both models showed their largest increase in agreement between layers 22 and 23. This measures how closely a trained probe matches its own model, not where reasoning begins.

Residual magnitude and direction changes

Seed checks and experiment details


The frozen models ran in BF16. I trained independent FP32 affine probes for one epoch with learning rate 0.0005, accumulation over four examples, and a 512-token limit. Evaluation covered 7,676 supplied solution tokens. Each selected activation passed through the model's frozen final RMS normalization.
The objective was KL(teacher || probe). A large readout trained on a small sample reflects fitting and optimization as well as the representation. Even the last-layer probe must learn its weights.
Saved measurements, model revisions, and source-file hashes.