Skip to main content
株式会社オブライト
AI2026-11-0312 min read

Weight-Space Programming Explained

GPT-6 Astra Edits Qwen's Weights Directly

Nov 2026: GPT-6 Astra edited 0.016% of Qwen3.5-0.8B weights with no training, lifting MATH-500 from 7.9% to 48.1%. MIT CSAIL results, method, how to try it.


Weight-Space Programming is the name for a general-purpose large language model reading and writing a neural network's weights directly. Rikiya Takehi, Jayden Teoh, Alex Zhang, and Omar Khattab of MIT CSAIL reported it on November 2, 2026, in the blog post "Sparks of Weight-Space Programming." OpenAI's GPT-6 Astra edited weights from natural-language instructions alone, with no gradient descent and no optimizer. The headline result: rewriting just 0.016% of Qwen3.5-0.8B's weights (131,072 values) raised its MATH-500 accuracy from 7.9% to 48.1%. Most of that gain comes from removing endless looping, not from new math skill, and the authors report that the same approach did not help a different small model, Gemma 3 270M.

This article summarizes the primary sources (the blog post, the GitHub repository of experiment logs, and the Hugging Face model card): what was shown, how it works, how to try the edited model, how it differs from existing methods, and where to be careful. Numbers come from the blog and the model card unless noted, and we did not verify them independently.

What is Weight-Space Programming?

The blog defines it as a frontier LLM reading and writing a network's weights without an optimizer, and sometimes without any feedback from the environment. Normally you change a model's behavior by preparing data, choosing a loss, and updating weights step by step with gradient descent. Here the LLM (Astra) reads the numbers themselves, analyzes them with Python, and outputs rewritten weights. Weights are treated not as a by-product of training but as a program the LLM reads and writes.

ItemDetails
PublishedNovember 2, 2026
AuthorsRikiya Takehi, Jayden Teoh, Alex Zhang, Omar Khattab (all MIT CSAIL)
Model usedOpenAI gpt-6-astra via Codex CLI (reasoning effort high, xhigh, or max depending on the experiment)
ReleasesExperiment logs (GitHub: lm_understand-logs), edited Qwen3.5-0.8B (Hugging Face), demo Space
LicensesLogs, data, networks: CC BY 4.0; scripts: MIT; edited model: Apache-2.0
StatusDescribed by the authors as very early results

What it achieved: results of eight experiments

The post has eight experiments in four kinds: reading a network to identify it (1 to 3), repairing a broken policy (4), writing networks from scratch (5 and 6), and editing language models (7 and 8).

KindExperimentTargetResult (as reported)
Read1 Which gameSmall PPO-trained MLPs (17,253 weights)Named the correct game for all four: Breakout, Pong, Pac-Man, Freeway
Read2 What it generatesDiffusion models (circle, triangle, square; 23,824 weights)Identified all three shapes
Read3 Language and attention heads7.16M-weight Transformer (middle blocks only)Python, romaji, English each correct in 2 of 2 attempts; copying heads matched ground truth
Repair4 Fix a failing policyKinetix car-on-ramp (171,664 weights)From 0% success to 1,024 of 1,024 episodes, changing 3.5% of weights
Write5 From scratchMinAtar (600→32→32→6, all weights zero)Breakout 517.4 (PPO at 500M steps: 25.3)
Write6 9x9 Go1.48M-weight network, all weights zeroWon more than half of games against both PPO networks with 0 forward passes
Edit7 Find the sycophantGemma 3 270MFailed 4 of 4 from weights alone; found all 3 pairs using attention patterns
Edit8 Improve mathQwen3.5-0.8BMATH-500 from 7.9% to 48.1%

In Experiment 4, the original PPO network scored 0% in 256 evaluation episodes, and a single edit with no tools produced 1,024 successes in 1,024 episodes. In Experiment 5, Astra got only the rules, source code, and network layout, with no data, loss, gradients, tools, or rollouts. Outside Breakout it did not beat long-trained PPO: Seaquest 53.1 (PPO at 500M steps: 88.9) and Asterix 53.2 (55.2).

The Qwen3.5-0.8B edit

Experiment 8 got the most attention. Astra was given 7,469 GSM8K and 7,275 MATH training problems as practice (no test sets) and a budget of up to 50 forward passes in a Python sandbox. The base model hit the 32,768-token output limit on 85 of its first 96 practice answers, so its main failure was looping without ever finishing an answer.

Qwen3.5-0.8BMATH-500 (%)GSM8K (%)IFEval (%)Hit token limit (%)
Base7.913.821.093.0
Edited, 10 forward passes12.325.749.087.2
Edited, 25 forward passes14.125.139.986.4
Edited, 50 forward passes48.167.162.333.1

Astra traced the looping to a single direction written by the MLPs of layers 15 and 19, then subtracted that direction from 64 output columns of down_proj in each layer. Only two tensors differ from the base (model.language_model.layers.15.mlp.down_proj.weight and layers.19.mlp.down_proj.weight): 131,072 weights, about 0.016%. Evaluation used temperature 0.6, top-p 0.95, top-k 20, presence penalty 1.5, and a 32,768-token limit, with four samples per problem on MATH-500. The post says six other benchmarks were evaluated but reports only three in the table.

A negative result is reported just as prominently. On Gemma 3 270M, MATH-500 stayed between 7.0% and 7.7% after editing, against a 6.8% base. Gemma rarely loops (8.5% hit the limit), Astra found ordinary reasoning mistakes, and no single edit moved the score by more than about a point. The authors conclude that the editing could not add an ability the model lacked.

How it works: the harness and the forward-pass budget

According to the logs repository, the model was OpenAI's gpt-6-astra run through Codex CLI with built-in tools (shell, file editing, web search, sub-agents) disabled. In experiments 3, 6, 7, and 8, the model writes one Python block per turn, which runs in a sandbox with no network access and a time limit. An audit of the event streams recorded all 1,125 turns as tool-free.

- Allowed: reading weights, numpy and PyTorch computation on CPU, forward passes within a budget, and edits interleaved between passes
- Not allowed: training, gradients, fitting to data, search, rollouts, and running the network outside the budget
- Example budgets: 0 to 50 passes for Go (Exp. 6), 10, 25, or 50 for Qwen (Exp. 8), up to 100 runs for Exp. 3, up to 20 runs and 16 texts for Exp. 7
- Per-experiment limits: Exp. 4 was a single reply; Exp. 5 was fully tool-free, one-shot

The forward passes are used to evaluate, not to minimize a loss. Astra looks at the outputs, forms a hypothesis, and rewrites weights. In the Go experiment with 0 forward passes, a single 336-line Python run produced a network that won more than half of 2,000 games against each of two PPO networks (the exact win rate is not given). With 50 passes it beat a PPO network trained on 20 million games. However, the opponents are smaller networks (243→32→32→82), which conflicts with the post calling them equal-sized, so interpret that comparison with care.

Trying the edited Qwen3.5-0.8B

The edited model is on Hugging Face as RikiyaT/Qwen3.5-0.8B-weight-space-programming. It is based on Qwen/Qwen3.5-0.8B (Apache-2.0) and released under Apache-2.0. The blog's evaluation used a text-only export; the published checkpoint is the full multimodal release, whose language-model tensors were hash-verified to match, and text prompts do not use the vision tower. The demo is the akhaliq/weight-space-programming-demo Space, rebuilt and re-evaluated by Hugging Face's Ahsen Khaliq (the Space page itself has no usage description; you try it from the App tab).

MethodDetails
Demo SpaceTry it in the browser, no local setup
vLLM (Python)The model card's path: bfloat16, max_model_len 34816, chat template with enable_thinking=True, same sampling settings as the evaluation
vllm serve / SGLangRun an OpenAI-compatible API server
TransformersThe image-text-to-text pipeline, or AutoModelForMultimodalLM with AutoProcessor
Docker Model RunnerThe model card lists docker model run
llama.cpp / Ollama / LM StudioPick a quantized build from the Hub's Quantizations list (third-party builds; check yourself that the edit survives)
# Start an OpenAI-compatible server with vLLM (follows the model card; check the card for details)
vllm serve RikiyaT/Qwen3.5-0.8B-weight-space-programming --max-model-len 34816

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

VRAM needs are small. The model card lists about 0.9B parameters, so BF16 weights are roughly 0.9B x 2 bytes, about 1.8 GB, plus KV cache and runtime overhead. This is a general estimate, not an official recommendation. Because the evaluation generates up to 32,768 tokens, a long loop can grow the KV cache by several GB. You can check other models with the VRAM calculator. Keep in mind that the reported numbers come from one seed and one sampling configuration. The model card's independent re-run (all 500 MATH-500 problems x 4 samples, about 51 minutes on an H200) gave 51.0% correct and 31.6% hitting the token limit, but only MATH-500 was re-run; GSM8K and IFEval were not.

How it differs from fine-tuning, model editing, and interpretability

MethodWhat changesNeedsWho editsDifference from Weight-Space Programming
SFT / full fine-tuningAll (or most) weightsLabeled data, GPUs, training loopGradient descentNo gradient descent; an LLM writes weights directly
LoRAAdded low-rank weightsData, GPUs, training loopGradient descentEdits a few existing weights directly rather than adding layers; fitting to data was prohibited
ROME / MEMIT-style model editingA few weights tied to a specific factThe fact and a procedure to locate itClosed-form updateA general LLM reads the situation and decides the edit instead of using a fixed update rule
Mechanistic interpretabilityNothing (analysis of circuits and features)Recorded activations, analysis toolsHuman researchersGoes beyond analysis to writing the understanding back; an LLM does the interpreting
Weight-Space ProgrammingA few weights (0.016% in Exp. 8)Weights, a sandbox, a forward-pass budgetA general LLM (Astra)The trained LLM reading and writing weights is itself the method

The description of ROME/MEMIT is our general understanding; we found no direct comparison with them in the blog. In short, existing methods fix how the update is computed (gradients, closed-form formulas), while here the LLM decides how to update on the spot. The authors list future directions: auditing for backdoors, one-shot initialization, zero-data capability steering and unlearning, grafting circuits between models, and recursive self-improvement. For training-based tuning of the same Qwen3.5 family, see the Qwen3.5-9B fine-tuning guide (in Japanese).

Limits and caveats

- The gain is mostly loop removal: 93.0% of base outputs hit the token limit, and 33.1% still do after editing. The post itself attributes benefits beyond math to loop removal. It does not show that math reasoning improved
- No gain on Gemma 3 270M: there is no evidence yet that the approach generalizes to other models; editing could not add an ability the model lacked
- Sycophancy detection failed from weights alone: all four attempts failed, and only attention patterns identified all three pairs. It cannot read everything from weights
- Astra itself is not released: redoing the edits requires the gpt-6-astra API, which is expensive (see GPT-6 Astra pricing). The edited model and diffs are public, but there is no guarantee Astra produces the same edit each time
- Evaluation scope: one seed and one sampling setup; the independent re-run covers MATH-500 only. Of the benchmarks evaluated, the table shows only GSM8K, MATH-500, IFEval, and the token-limit rate
- Benchmark contamination is unconfirmed: practice problems came only from training sets, but we could not confirm from primary sources how they relate to Astra's own pretraining data
- Scale limits: networks in experiments 1 to 5 fit in context; larger ones need tools and forward passes. The authors name context length and harness inefficiency as current limits
- The Go comparison: the opponents described as equal-sized are in fact smaller than the network Astra wrote

Since the post, write-ups and community discussion have raised the point that a 7.9% baseline is unusually low for a model this size and that many failures were probably non-answers from loops. The 93.0% token-limit rate is consistent with that reading, but this comes from secondary coverage and discussion, not the primary sources. We could not check the Hacker News thread itself.

What it means for developers

This research does not change your workflow today. Astra is expensive, reproduction needs the API, and the results center on one failure mode (looping) in one model. But it shows a few useful directions. First, if a fault is localized to a specific direction, subtracting it can fix the model without retraining, which is a new option for small local models that think without stopping. Second, both the weights and the logs are public, so you can check the method yourself; the logs include each turn's prompt, response, executed code, and evaluation. Third, the authors point to auditing, such as backdoor detection. A practical first step is to try the published edited model on your own prompts and compare token-limit rate and cost. For other models you can run locally, see the local LLM comparison (June 2026) (in Japanese).

FAQ

What is Weight-Space Programming?

It is the name for a general-purpose LLM reading and writing a neural network's weights directly, without gradient descent or an optimizer. MIT CSAIL researchers reported it in a blog post on November 2, 2026.

Did Qwen3.5-0.8B's math ability really improve sixfold?

MATH-500 accuracy is reported to rise from 7.9% to 48.1%, but 93.0% of base outputs hit the token limit, so the gain is mainly from removing loops. The same method barely helped Gemma 3 270M, so it is not evidence of general math improvement.

Can I reproduce it without GPT-6 Astra?

You can check the result: the edited Qwen3.5-0.8B, the diffs against the base, and the apply script are public. Redoing the editing with a new model needs the gpt-6-astra API, and Astra itself is not released.

Can I use the edited model commercially?

The model card lists Apache-2.0. The experiment logs, data, and networks are CC BY 4.0, and benchmark data keeps each dataset's own license, so check the license that applies to your use.

Does it replace fine-tuning or LoRA?

Not at present. What was shown is mainly the repair of a specific failure mode, and a case with no improvement on another model is reported. The authors themselves call the results very early.

Feel free to contact us

Contact Us