Skip to content
, ,

MIT Used GPT-6 Astra to Edit Qwen’s Weights Directly: Math Score 7.9% to 48.1%

10–15 minutes
Shocked woman in black hoodie holding card with OpenAI logo in a green-lit server room, text 7.9% to 48% AI edits AI

MIT researchers gave OpenAI’s GPT-6 Astra direct access to the raw weights of a small open model, Qwen3.5-0.8B, and asked it to make the model better at math without any training.

Astra changed just 131,072 weights, about 0.016% of the model, and MATH-500 accuracy jumped from 7.9% to 48.1%. The catch is interesting: most of the gain came from fixing a habit of looping and repeating, not from teaching the model new math.

TLDR

  • The work is a November 2, 2026 MIT CSAIL research post called “Sparks of Weight-Space Programming” by Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab. There is no arXiv paper yet.
  • GPT-6 Astra read Qwen3.5-0.8B’s weights in a sandboxed Python kernel and removed one “loop” direction from two MLP layers (15 and 19).
  • Results: MATH-500 7.9% to 48.1%, GSM8K 13.8% to 67.1%, IFEval 21.0% to 62.3%. Answers hitting the token limit fell from 93.0% to 33.1%.
  • It did not work on Gemma 3 270M, which does not have the looping problem. Editing can remove a blocker, but it cannot add a skill the model lacks.
  • Logs, the exact weight diffs and the edited model are public, so you can inspect or run it yourself.

What Happened

Normally, if you want a language model to behave differently, you train it. You show it examples, compute gradients and nudge millions of weights a tiny bit at a time. Fine-tuning, RLHF and LoRA all work this way.

This MIT team tried something else. They treated a neural network’s weights almost like source code and asked a frontier model to read and edit them directly. They call the idea weight-space programming. VentureBeat described it as “like gene editing for neural networks.”

The headline experiment used Qwen3.5-0.8B, a small Apache 2.0 open-weight model, with its “thinking” mode on. The base model was bad at math for a simple reason. It looped.

In the team’s own practice runs, 85 of its first 96 answers ran all the way to the 32,768-token limit without finishing. Qwen’s own model card warns about this kind of reasoning loop.

GPT-6 Astra found the cause inside the weights and removed it. If you missed the earlier Astra story, my post on how GPT-6 Astra designed a hardware device gives more background on this model.

Where Is the Paper?

There is no peer-reviewed paper or arXiv listing for this work at the time of writing. The primary source is a research blog post:

  • Title: Sparks of Weight-Space Programming: LLMs can natively read and write neural network weights
  • Authors: Rikiya Takehi and Jayden Teoh (equal contribution), Alex Zhang and Omar Khattab, all at MIT CSAIL
  • Date: November 2, 2026
  • Where: rikiyat.github.io/blog/weight-space-programming/
  • Logs and code: the GitHub repo RikiyaT/lm_understand-logs (scripts under MIT, logs and data under CC BY 4.0)
  • Edited model: RikiyaT/Qwen3.5-0.8B-weight-space-programming on Hugging Face (Apache 2.0)

Note: The team also says it is building a benchmark and a supporting framework. So treat this as an early, well-documented research result, not a finished method.

How the Method Worked

Here is the setup in plain English.

  1. A sandboxed workspace. Astra got a Python kernel that could load and inspect Qwen’s weights. There was no GPU and no network access. Each turn ran through the Codex CLI with tools turned off, and code ran in a bubblewrap sandbox.
  2. Practice problems only. It could use 7,469 GSM8K and 7,275 MATH training problems. It never saw the test sets used for the final scores.
  3. A small budget of model runs. Astra could ask to actually run the model only 10, 25 or 50 times, depending on the trial. Each run could answer up to 512 problems.
  4. No training allowed. No gradients, no loss values, no fine-tuning. Astra had to reason about the weights and write the edit itself.
  5. Find the cause. Astra traced the looping behaviour to one direction (think of it as one pattern in the numbers) written by the MLP blocks of layers 15 and 19.
  6. Remove it. It subtracted that direction from 64 output columns in each of those two layers. On the model card this shows up as changes to two down_proj tensors. That is 131,072 weights in total.

The best run took 50 model-run requests, 158 conversation turns, 80 Python runs and 20.3 hours, of which about 4.7 hours were lost to a service outage. So it was not instant. It was more like a patient engineer debugging a binary file.

The idea of editing weights by hand is not brand new. Earlier methods such as ROME (NeurIPS 2022) and MEMIT (ICLR 2023) made targeted edits to change single facts inside a transformer. The difference here is that an AI model found the problem and designed the fix by itself.

The Results in Numbers

Here are the published scores for Qwen3.5-0.8B with thinking on, at different budgets of model runs.

Version MATH-500 GSM8K IFEval Answers hitting token limit
Base model 7.9% 13.8% 21.0% 93.0%
Edit with 10 runs 12.3% 25.7% 49.0% 87.2%
Edit with 25 runs 14.1% 25.1% 39.9% 86.4%
Edit with 50 runs 48.1% 67.1% 62.3% 33.1%

Notice two things. First, the big jump only came with the 50-run budget. Smaller budgets barely fixed the looping. Second, instruction following (IFEval) also improved a lot. That makes sense. The fix was not about math. It was about the model getting stuck, which hurts every kind of task.

The result has also been reproduced. Hugging Face’s Ahsen Khaliq rebuilt the model from the public logs and made a live demo. The Hugging Face model card also reports a separate MATH-500 re-run that scored 51.0%, with 31.6% of answers hitting the token limit.

The post covers other experiments too. Astra identified which Atari-style game four look-alike networks were trained on, patched a stuck driving controller by changing 3.5% of its weights, and even wrote small game-playing networks from scratch.

Limits and Caveats

This is exciting, but it is easy to over-read. Here are the honest limits.

  • It was a repair, not new knowledge. The authors do not claim Astra added six times more math knowledge. The model could already do the math. The loop was hiding it.
  • It failed on Gemma 3 270M. Gemma rarely loops (8.5% of answers hit its limit). Astra found only ordinary reasoning errors, and no edit moved MATH-500 by more than about a point. The authors’ own conclusion: editing can remove an obstacle that hides an ability, but it cannot add one the model lacks.
  • Sycophancy was hard. Astra could not spot a sycophantic model from weights alone. It only succeeded once it was given attention measurements from actual runs.
  • No cost or speed win shown yet. The work did not show that direct editing beats normal training on cost, speed or quality.
  • One small model. The headline result is a 0.8B model with a known bug. Nobody has shown this on large, well-tuned models.
  • No self-improvement loop. The researchers did not show a model repeatedly improving itself this way.
  • Critics are skeptical. PauseAI’s Maxime Fournes called the direction “reckless” and suggested it may be hype. Others pointed to the Gemma result as a sign the gain is narrow.

What It Means for Open Models

This experiment only works because Qwen’s weights are open. You cannot do this to a closed model behind an API. That matters in a few ways.

  • Cheap bug fixes. Small open models often have known quirks, such as looping, bad formatting or over-refusing harmless requests. A targeted weight patch could, in theory, fix a specific bug without a full fine-tune.
  • Better auditing. If AI models can read weights, they might help find hidden behaviours or backdoors in downloaded models. The authors list this as a future idea, not something they tested.
  • Tiny diffs. A patch touching 0.016% of weights is easy to share, review and reverse. That is very different from shipping a whole new fine-tuned checkpoint.
  • New supply chain risk. The same idea cuts both ways. Small, hard-to-spot edits could also plant bad behaviour in a model. Always get weights from trusted sources and check hashes.

If you run small models locally, this is worth watching. My guides to the best Ollama models and running Qwen on a 16GB GPU cover the practical side of local open models today.

How to Try Weight Editing Tools Safely

You cannot use GPT-6 Astra in the exact MIT harness yourself, but you can explore the same ideas with open tools. Here is a safe path.

Step 1: Run the edited Qwen model

The edited model is public under Apache 2.0. The model card lists vLLM and Docker Model Runner options. For example:

# with vLLM installed
vllm serve RikiyaT/Qwen3.5-0.8B-weight-space-programming

# or with Docker Model Runner
docker model run hf.co/RikiyaT/Qwen3.5-0.8B-weight-space-programming

Tip: The card recommends thinking mode with temperature 0.6, top_p 0.95, top_k 20, presence_penalty 1.5 and up to 32,768 new tokens. Compare it with the base Qwen3.5-0.8B on the same prompts to see the looping difference.

Step 2: Inspect the diff yourself

The GitHub logs include the final edits as exact diffs against the public base weights, plus a script to apply them. You can also compare the two models with a short script like this, which lists every tensor that changed:

# pip install safetensors torch
import glob, torch
from safetensors import safe_open

def load(folder):
    out = {}
    for path in glob.glob(folder + "/*.safetensors"):
        with safe_open(path, framework="pt") as f:
            for k in f.keys():
                out[k] = f.get_tensor(k)
    return out

base = load("./qwen-base")
edit = load("./qwen-edited")
for name, t in base.items():
    if name in edit and not torch.equal(t, edit[name]):
        changed = (t != edit[name]).sum().item()
        print(name, "changed weights:", changed)

You should see only two down_proj tensors in layers 15 and 19 listed.

Step 3: Learn to look inside models with TransformerLens

TransformerLens is an MIT-licensed library for mechanistic interpretability. Version 4.3.0 was released on October 23, 2026, and needs Python 3.10 or newer.

pip install transformer-lens

Its quick start loads GPT-2 through the new TransformerBridge and caches activations so you can study what each layer does.

Step 4: Try classic knowledge editing with EasyEdit

EasyEdit (ACL 2024, MIT license) bundles many weight-editing methods, including ROME, MEMIT, R-ROME, WISE and AlphaEdit, and lists Qwen among supported model families.

git clone https://github.com/zjunlp/EasyEdit.git
cd EasyEdit
conda create -n EasyEdit python=3.10
conda activate EasyEdit
pip install -r requirements.txt

You pick a method, point a YAML file in hparams/ at your model, and call BaseEditor with a prompt, the old answer and the new target answer.

Safety rules for any weight editing

  1. Work on a copy. Keep the original weights untouched and record their SHA-256 hashes.
  2. Use small models first, such as 0.5B to 1B, so mistakes are cheap.
  3. Run edit code in a container or virtual machine with no access to your secrets.
  4. Test on held-out data you did not use while editing, and check general skills, not just the target task.
  5. Never use edits to remove a model’s safety behaviour or to break its license terms.
  6. Label edited models clearly before sharing them, and publish the diff so others can review it.

My Take

This is one of the more fun research results of the year, and the team deserves credit for publishing full logs, exact diffs and a reproducible model. The independent re-run makes the main claim believable.

But the honest headline is narrower than “AI makes a model six times smarter.” GPT-6 Astra found a real bug, a repetition loop, and switched it off with a surgical patch. That is impressive debugging.

It is not proof that AI can pour new skills into a network, and the Gemma result shows exactly where the idea stops today.

Where I think this goes next is maintenance. Imagine downloading an open model and getting a tiny reviewed patch that fixes a known quirk, the way you get a security update for an app. That would be very useful for local AI.

Until then, if you want reliable gains, normal fine-tuning is still the proven route. If you are curious about the Codex CLI that ran the harness, see my OpenAI Codex guide.

Troubleshooting

The edited model still loops sometimes

That is expected. Even the edited model hit the token limit on about a third of MATH-500 answers. Use the recommended sampling settings, including presence_penalty 1.5.

vLLM runs out of memory

The model card suggests a max_model_len of 34,816. Lower it, or use a GPU with more memory. A 0.8B model is small, but long thinking traces use a lot of KV cache.

My diff script shows many changed tensors

Make sure both folders hold the same release and the same data type. Comparing a BF16 copy with an FP32 or quantized copy will flag every tensor.

EasyEdit install fails

Use a fresh Python 3.10 environment as the README shows. A recent upgrade added Transformers 5.x support, so mixing old and new packages can break things.

An edit fixes one answer but breaks others

This is the classic side effect of weight editing. Test on a broad held-out set, try a different method or layer, and always keep the original weights.

FAQ

Did GPT-6 Astra train Qwen?

No. It used no gradients or training. It read the weights in a Python sandbox and wrote a direct edit that removed one direction from two layers.

How much of Qwen did it change?

About 0.016% of the model, or 131,072 weights, in the MLP down-projection tensors of layers 15 and 19.

Why did the math score jump so much?

The base model kept looping until it ran out of tokens. Once the loop was removed, it could finish answers it already knew how to solve.

Is there a paper?

Not yet. The main source is the MIT CSAIL blog post “Sparks of Weight-Space Programming,” with full logs on GitHub. The team says a benchmark and framework are in progress.

Can I download the edited model?

Yes. It is on Hugging Face as RikiyaT/Qwen3.5-0.8B-weight-space-programming under the Apache 2.0 license.

Does this work on any model?

Not reliably. It failed to improve Gemma 3 270M, which did not have the looping bug. The method seems best at removing a specific blocker.

Is weight editing safe to try at home?

Yes, on small open models, if you work on copies, use a sandbox, test widely, and never strip safety features or break license terms.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Shocked woman in black hoodie holding card with OpenAI logo in a green-lit server room, text 7.9% to 48% AI edits AI