Editing 130k Weights Raised Qwen's Math Score 6x: I Ran the Missing Controls

·
AILLMevaluation

Source · Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights · Rikiya Takehi, Jayden Teoh, Alex Zhang, Omar Khattab · MIT CSAIL

Contents · 8

Damien · November 2026

In early November, Rikiya Takehi and collaborators at MIT CSAIL published a blog post titled LLMs can natively read & write neural network weights. Their tweet drew nearly ten million views. The standout result: they had GPT-6 Astra edit the weights of Qwen3.5-0.8B, modifying just 64 columns each of mlp.down_proj in layers 15 and 19 — 131,072 weights in total (0.016%) — with no gradients and no training. MATH-500 jumped from 7.9% to 48.1%, GSM8K from 13.8% to 67.1%, and IFEval from 21.0% to 62.3%.

The authors released all of their logs in RikiyaT/lm_understand-logs, including the edit script, evaluation harness, and per-problem results, so the experiment can be reproduced directly. I wanted to answer one question:

Did the score jump because Astra found a special weight direction, or would any method that breaks the repetition loop achieve the same thing?

I re-ran Experiment 8 on a single RTX 4090 and added several controls the original post didn’t include. All code, logs, pre-registered plan, and results are in 1099271/exp8-loop-controls.

Bottom Line

Both hypotheses are half right.

  • Inside thinking mode, the direction really is special. None of the other interventions I tried (changing temperature, adding repetition penalty, or swapping in two norm-matched random directions) broke most of the loops; they scored 11–23%, while the edited model beat them by 28–41 points.
  • The final score itself, though, is not special. Without touching a single weight, switching the unedited base model to non-thinking mode with the same 32k token budget scores 49.9% on MATH-500. On the same machine, the edited model scores 51.3% — not a statistically significant difference.
  • GSM8K and IFEval are the exceptions. On those two benchmarks, edited thinking beats the base model’s non-thinking mode by roughly 10 points.

Where the 7.9% Baseline Comes From

Qwen3.5 supports two modes: thinking mode reasons inside <think> before writing the final answer, whereas non-thinking mode writes the answer directly. The authors ran their evaluation with thinking turned on. At 0.8B parameters, thinking mode easily falls into repetition loops until hitting the 32,768-token cap. Qwen’s model card states this upfront: “In thinking mode … Qwen3.5-0.8B is more prone to entering thinking loops compared to other Qwen3.5 models”. In the authors’ released outputs, 93.0% of the base model’s MATH-500 responses hit the token ceiling and were cut off unfinished, leaving accuracy at 7.9%.

On the edited model, only 33.1% get truncated. Most of the recovered accuracy comes from responses that finally finished writing. The authors say as much in the body of their post:

Fixing loops, however, is not the same as making a model better at math: it lets the model finish answers it could already work out.

Once you know loops are the bottleneck, the most direct control is simple: keep it out of thinking mode.

Control 1: Turn Off Thinking

The authors’ post doesn’t mention non-thinking mode, even though the model card says “Qwen3.5-0.8B operates in non-thinking mode by default”.

I evaluated both the base model and the edited model using the model card’s benchmark sampling settings for non-thinking mode. Using the 8,192-token limit configured for non-thinking in the authors’ repo, the base model scored 44.5% and the edited model 44.3% — virtually identical. At 8k, however, 30% of responses were still truncated. Raising the cap to the same 32,768 used in thinking mode pushed the unedited base model to 49.9%.

MATH-500 (500 problems, 4 samples each)AccuracyHit Token Cap
Base model, thinking (authors’ release)7.9%93.0%
Edited, thinking (authors’ release)48.1%33.1%
Edited, thinking (my local run, new seed)51.3%32.4%
Base model, non-thinking, 32k49.9%11.7%
Edited, non-thinking, 32k50.1%0.35%

Paired per problem on my machine, edited thinking minus base non-thinking is +1.5 points, with a 95% confidence interval of [−1.3, +4.2]. Against the authors’ published 48.1%, the gap is −1.8. Put plainly, on MATH-500, the score unlocked by editing weights is one the unedited model already reaches when switched to non-thinking mode.

Applying the weight edit in non-thinking mode barely moves MATH-500 (+0.3). So there is no evidence the edit made the model “better at math,” consistent with what the authors write in the body text.

One minor wrinkle: both my local run and akhaliq’s rerun on Hugging Face land around 51%, roughly 3 points higher than the authors’ published 48.1%. The weights are bit-identical; I couldn’t isolate the discrepancy, though package versions or checkpoint export differences are plausible causes.

Control 2: Keep Thinking On, Break the Loops Another Way

Turning off thinking bypasses the loop rather than fixing it. I also wanted to check whether cheaper interventions could break the loops inside thinking mode.

I tried three categories:

  • Temperature 1.0 (the model card’s recommended setting for general thinking text tasks; the authors’ 0.6 is the model card’s benchmark setting): base model reaches 18.1%, with 81% still truncated.
  • Repetition penalty 1.1: base model reaches 23.3%, 75% truncated. Dropping the penalty to 1.05 performs worse at 14.5%.
  • Random directions: preserving the exact same columns, norm, and rank-1 structure while replacing the edited output direction with a random unit vector. Two random draws score 23.3% and 10.7%.

The edited model outperforms all of these by 28–41 points. None of these alternatives pushed truncation below 75%, whereas the edited model brings it down to 32%.

Inspecting the algebraic structure of the edit is revealing too. It takes the form W’ = W − 6·u·uᵀ·W: rather than zeroing out the projection onto u across those 64 columns, it flips the sign of that component and scales it by 5x. Both layers use the exact coefficient 6.

So inside thinking mode, this direction really is special. That said, I only tested two random directions — and those two differed by 12 points — so I can’t pin down what a typical random direction looks like.

Control 3: The “3x” on IFEval

Both the summary and the tweet emphasize that the edit “generalizes out of the box to instruction following, raising IFEval by 3x”.

IFEval runs into the same failure mode: in thinking mode, 75% of the base model’s responses get cut off, and any output that never closes </think> is scored as an empty answer. Because the authors didn’t publish their IFEval scorer, I used Google’s official evaluation script and first checked it against 400 samples released by the authors — getting 400/400 exact agreement before running new evaluations.

IFEval (541 prompts, 2 samples each)Accuracy
Base model, thinking (authors’ release)21.0%
Edited, thinking (authors’ release / my local run)62.3% / 63.8%
Base model, non-thinking, 32k52.8%
Edited, non-thinking, 32k50.5%

Out of the ~41-point jump, roughly 32 points come simply from turning off thinking. The remaining ~10 points are ones the unedited model in non-thinking mode does not close (local paired difference −11.0, 95% CI [−14.8, −7.2]). GSM8K shows the same pattern: 67.1% after editing versus 56.9% for base non-thinking.

There are two ways to read those 10 points: either the edit added genuine capability, or thinking itself helps on these benchmarks once generation stops looping. In non-thinking mode, the edit slightly lowers IFEval by 2.3 points (not significant), which lends no support to the first reading. Cleanly separating the two would take another way to get the unedited model’s thinking mode to finish cleanly — something I didn’t find in this round.

The Gap Between the Summary and the Body

While reading the post, I appreciated how direct the authors are in the body text: loops are the root cause, fixing loops doesn’t make the model stronger at math, and IFEval rises because “the loops are not special to math”.

The top summary and the tweet leave a very different impression. The summary says “this weight correction raises MATH-500 from 7.9% to 48.1% and generalizes out of the box to instruction following”, and the tweet says “improving math up to 6x and even instruction following 3x”. Readers who stop at the summary can easily come away thinking the model’s underlying math and instruction-following skills grew sharper.

The phrase “With the same sampling settings” in the summary is accurate as written — the base and edited runs did share identical settings. My controls address a separate question: what does the unedited model score under another standard setting from its own model card?

spaCy author Matthew Honnibal wrote a commentary from a different angle. He notes that the opening line “Just by looking at the raw weights” applies only to Experiments 1, 2, and 4; in the Qwen experiment, Astra writes Python and runs the model across up to 50 batches of practice problems. His question is “do all of these experiments demonstrate the same capability,” while mine is “against what baseline should this jump be judged.” The two don’t conflict. He doesn’t dispute Experiment 8’s numbers either, and my runs confirm that the direction Astra found inside thinking mode genuinely works.

Boundaries of These Findings

  • Only two random directions were tested, not enough to characterize the random-direction distribution.
  • I only spot-checked one shard of base-model thinking locally, so the 7.9% and 21.0% starting numbers come primarily from the authors’ environment.
  • Comparing the two modes varies more than thinking alone. The model card’s benchmark settings use temperature 0.7 and top_p 0.8 for non-thinking, versus 0.6 and 0.95 for thinking.
  • “Not statistically significant” is not the same as zero. The upper bound of the MATH-500 interval is +4.2, which doesn’t rule out the edited model sitting a few points higher.
  • This covers only Experiment 8. I did not reproduce the other experiments in the post (identifying games solely from raw weights, or constructing game networks from scratch).

How to Verify

Before the main controls finished running, I wrote the decision criteria into PLAN.md in the repository and pushed them to GitHub. Results already known at the time of writing (sanity checks and the 8k non-thinking runs) are listed separately and excluded from pre-registration. Every subsequent change was appended with a timestamp, making the commit history the audit trail. Each configuration’s scores.json and per-problem output files match the original repository’s format and plug straight into the authors’ merge.py. Every number in the tables above is computed directly from raw outputs by analysis/final_tables.py.

If you spot a bug in any calculation, feel free to open an issue in the repo.