Long form · T5 Evals & reliability

Weight-space programming

Last reviewed 7 Nov 2026by Pratima Chainani

Changing a trained model by reading and editing its weights directly, the way you debug source code, instead of retraining it. In the first public case, an AI found one direction in two layers of a small model that caused thinking loops, and removed it.

Watch the full 15-minute experiment (on YouTube; summary and kit on the video page), then try it yourself below.

The fault. Qwen3.5-0.8B gets stuck in thinking loops. On MATH-500, 93.0% of its answers hit the 32,768-token limit before finishing.

Observe. GPT-6 Astra, run by Omar Khattab's group at MIT CSAIL, ran the model and watched where the loop came from, using a budget of about 50 forward passes.

Hypothesise. It found one direction in the residual stream, written mainly by the MLP output (down_proj) matrices of layers 15 and 19, that drives the loop.

Patch. It removed that direction from 131,072 weights, about 0.016% of the model. No gradient training was used.

Verify. MATH-500 went from 7.9% to 48.1% (4 samples per problem, 32,768 max tokens). An independent re-run of the released checkpoint got 51.0%. With 10 or 25 forward passes, the best edits reached only 12.3% and 14.1%.

Limits. It removes an obstacle; it can't add an ability the model never had. On Gemma 3 270M, which rarely loops, MATH-500 moved only from 6.8% to 7.7%. It is a blog post, not yet peer-reviewed. Removing a direction is close to steering vectors and directional ablation, and fact editing goes back to ROME; what is new is that a model found the edit itself.

Common misread

The only way to change a trained model is to train it again.

For one clear fault, you can find the direction that causes it and edit the weights, if you measure each try.

For your code

Before you plan a fine-tune for one stubborn failure, check whether it is a single fault you can locate. Measure every edit on held-out problems.

For your roadmap

Treat weight edits as a fix for blockers, not a way to add skills, and budget for many measured tries. Review weight edits before deployment.

Try it yourself

We reproduced a small version on a laptop and on a free Colab T4 GPU, with the same model, Qwen3.5-0.8B. The code is open on GitHub, so you can read it before you run it.

  • Open the notebook in Colab: the whole experiment, one click (then Runtime → T4 GPU).
  • The code on GitHub: overthinker.py (observe, find the stuck direction, patch, re-measure), diag.py (the diagnosis), the question sets, and every result in the README. MIT licence.

What happened when we tried it

Before: 31 of 32 answers ran out of an 8,192-token budget, almost all of them repeating themselves. Removing the "stuck" direction from layers 15 and 19 (131,072 weights) changed nothing. Removing it from every layer (138 million weights) cut repetition from 31 answers to 13, but every answer still ran out: it stopped repeating and started second-guessing.

The diagnosis showed why. The chance of the model closing its thinking was 0.00% across its answers. A "finish" direction, taken from easy answers just before they stop, was strongest at layer 18: pushing it in at runtime raised answers that closed their thinking from 1 in 8 to 6 in 8; too strong a push broke the model. Writing that direction into layer 18's weights did not hold (0 of 8). Finding the direction was the easy part; the clean weight edit is the hard part.

Sources

  1. Takehi, Teoh, Zhang, Khattab: Sparks of Weight-Space Programming · 2 Nov 2026
  2. Independent write-up and re-run (51.0% on MATH-500) · Nov 2026
  3. Hacker News discussion (ROME, steering vectors) · 2 Nov 2026

More on T5 Evals & reliability

Every term, by layer