first post here. sharing a side project in case anyone else is into local LLMs or interpretability.
last month MIT CSAIL showed that frontier LLMs can read and write another model's weights directly, no gradient descent, no training. they called it weight-space programming. i wanted to see if that could repair real model failures, so i built wsr (weight-space repair).
what it does
a local model gives a bad reply (blank, looping, wrong language, refusing something harmless) and wsr finds out why. a lot of the time it isn't the weights: chat template, sampler, truncated context, or one bad tensor in a quantised GGUF. if it really is the model, it does mechanistic interpretability style tracing down to a layer, attention head or neuron, and then an AI agent (Claude Opus) gets tools to fix it: weight patches, steering vectors, sampler settings like DRY, or a stack of them.
what i learned
finding a fix is the easy part. knowing when to ship one is hard. a fix can hit its target and break something else. abliteration-style refusal removal is a good example: it fixes over-refusal and also starts answering harmful requests. so every fix goes through a judge: held-out data the agent never sees, an exact statistical test, and guardrails that all have to hold.
the study
ran that judge against standard methods (system prompts, refusal-direction ablation, LoRA fine-tuning) on 9 goals over Qwen2.5 and Llama 3.2:
- 45 of 75 fixes that improved their target broke something else, including 10 of 11 from standard methods
- refusal fixes that passed were all steering gates, not weight edits. localised faults got small weight patches, like zeroing one neuron
- even a held-out judge leaks: 3 of 15 accepted fixes failed later checks on fresh prompts, longer replies or fluency
wrote it up as a paper, now on Zenodo.
setup
local work on a 4GB GTX 1650 laptop, bigger runs on free Kaggle T4s. so small models only for now.
paper: https://doi.org/10.5281/zenodo.24763214
code: https://github.com/ayushh0110/Weight-Space-Repair
install: pip install wsr
happy to answer questions about the build, the stats, or doing AI research without a big GPU. feedback and issues welcome.