Issue 45 Β· Project 01 HF model AI / ML trending #37 β read
RikiyaT/Qwen3.5-0.8B-weight-space-programming
Hugging Face β Β·β₯ 132 Β·β 3,474Β·apache-2.0 Β·created 2026-11-02 Β·3 min read
TL;DR: A frontier LLM ("Astra"), working in a Python session over the raw weights of Qwen3.5-0.8B with a budget of just 50 forward passes, diagnosed why the model loops endlessly on math problems, located the culprit direction in two MLP layers, and subtracted it from 131,072 weights (0.016% of the model) β no gradients, no training. MATH-500 jumped from ~8% to 48β51%, confirmed by an independent hash-verified rerun. The interesting thing isn't the editing technique (it's essentially directional ablation baked into weights) β it's that an LLM did the full interpretability-diagnose-edit loop autonomously, and the artifacts are published with bit-exact diffs.
What this is
"Weight-Space Programming" is the framing: instead of fine-tuning, you hand an LLM agent the weights, a small forward-pass budget, and a goal ("make this model better at math"), and it edits the model directly. This checkpoint is the output of Experiment 8. The base Qwen3.5-0.8B hits its 32,768-token limit on 93% of math problems β it gets stuck in thinking loops. Astra traced the looping behavior to a single direction written by the MLPs of layers 15 and 19, and subtracted that direction from 64 output columns of down_proj in each layer. Only two tensors differ from the base model, and both are sha256-published.
Results
The verification story is unusually good. The checkpoint was rebuilt by a third party (akhaliq, via ML Intern on HF Jobs) from the published diff, with every tensor sha256-checked against the originally evaluated checkpoint, then re-benchmarked on full MATH-500 (500 problems Γ 4 samples, vLLM on an H200): 51.0%, with raw per-problem results in eval/. The two edited tensors' hashes are in the model card; everything else matches Qwen/Qwen3.5-0.8B exactly.
How to read this
Be clear about what was fixed. The base model is pathologically broken β 93% of generations never terminate. Much of the gain is plausibly "unblocking truncation" rather than new math ability: a model that previously ran off the rails now finishes and gets graded. That said, the edited model still hits the limit 33% of the time, so it's not fully cured, and the IFEval jump (21 β 62) suggests the loop direction was poisoning instruction-following broadly, not just math.
The mechanism itself β find a behavior direction, ablate it from weights β is well-trodden interpretability territory (activation steering, refusal-direction ablation). The genuinely new bit is agency and economy: an LLM did the tracing and surgery itself, under a 50-forward-pass budget, and produced a sparse, auditable, reproducible edit. If this generalizes beyond single-pathology fixes, "ask a frontier model to debug a smaller model's weights" becomes a real alternative to fine-tuning for certain failure modes β cheaper, interpretable by construction, and diffable.
What to check before taking "sparks" seriously: read the blog post and the exp8_math/ logs in RikiyaT/lm_understand-logs to see how much of the diagnosis was principled versus trial-and-error over 50 passes; whether other experiments in the series fix anything other than degenerate loops; and whether the edit costs anything on non-math capabilities (no broad regression suite is reported). The model card is honest about one substitution β the post evaluated a text-only export, this is the full multimodal release, but the LM tensors are hash-identical.
Try it
Live demo: akhaliq/weight-space-programming-demo (base loops, edited solves, side by side). Or locally β the model is 0.8B, so anything with a few GB of VRAM works:
from vllm import LLM, SamplingParams
from transformers import AutoTokenizer
ckpt = "RikiyaT/Qwen3.5-0.8B-weight-space-programming"
tok = AutoTokenizer.from_pretrained(ckpt)
llm = LLM(model=ckpt, dtype="bfloat16", max_model_len=34816)
prompt = tok.apply_chat_template(
[{"role": "user", "content": "What is $2^{10} + 24$?\nPlease reason step by step, and put your final answer within \\boxed{}."}],
tokenize=False, add_generation_prompt=True, enable_thinking=True)
sp = SamplingParams(temperature=0.6, top_p=0.95, top_k=20,
presence_penalty=1.5, max_tokens=32768, seed=0)
print(llm.generate([prompt], sp)[0].outputs[0].text)
Apache 2.0, same as the base model. Diffs and rebuild script: github.com/RikiyaT/lm_understand-logs, exp8_math/.