So a week ago ..i read the MIT paper on weight space programming it fascinated me a lot..i thought of something like autonomous weight-space repair framework So I built Weight space repair cli open source, and spent most of the effort on what happens around the edit. It tackles almost all types of model failures due to its flexibilty(obv except when the model literally lacks the skill) What it adds to the setup in the MIT post Multi-stage surgery: The frontier model can also commit a fix , then further working can be done on that clean base. It can stack up to 4 times rn, commit can also can be rolled back , the stack is then judged against the original model. like in one of the test run, it repaired qwen 0.5b with a weight edit first to restore fluency but when it observed it started answering harmful prompt , it stacked a refusal steering gate on top of clean base and shipped it working cleanly Triage and deep triage: before going to surgery layer , it checks if the problem is with setup like template , sampler , context etc . if the quant is the cause , it finds tensor. like qwen 0.5b's official q4_0 also refuses "40 names for a cat" it traced it to blk.16.attn_v. if failure survives all that it goes inside network at full precision and finds which layer, head or neuron writes it. For a blank-reply bug I planted, it found the exact neuron blind. judge the agent can't see: Every fix is scored on validation data which agent never sees, original and fix answers the same item with same seed, exact sign test corrected for every candidate, at least a 5 point gain should be there , along with a regression suit and some easy questions . Then one final run on the confirmation set which cant be never resused. More than weight edits: the fix can be a weight patch, steering gate , sampler setting or stack of them, agent can do and all that with the tools wsr provides it Shipping: Patches apply, revert, and export to the GGUF through llama.cpp. patch records the SHA-256 of tensor and refuses other weights. Every fix ships with a manifest telling how it was judged. Any agent. Any OpenAI-compatible endpoint can be used a local model too Here are some of the results Failure Model What it chose Confirmation (better / worse) Blank replies (bug I planted) Qwen2.5-0.5B zeroed the planted neuron 40 / 0 Loops in long lists Qwen2.5-0.5B the DRY sampler, over a repetition penalty 30 / 1 Over-refusal Qwen2.5-0.5B and 1.5B a steering gate (below) 15 / 2, 15 / 0 Under-refusal Qwen2.5-0.5B and 1.5B, Llama-3.2-1B the same gate 12 / 0, 12 / 1, 23 / 0 Ukrainian answered in Russian Llama-3.2-1B weight edit + gate + DRY, in stages 23 / 0 Garbage from damaged weights (planted) Qwen2.5-0.5B exact weight restore + gate, in stages 51 / 0 It picked DRY on its own: For lists stuck at repeating a item it measured a repetation penalty and DRY . then chose DRY . Validation incresed from 80% to 97% also the gate reads the model’s own sense of harm and moves the refusal up or down to match Limits: i did all this on gtx 1650 so i could only test smaller models Agent used in these run was opus 5.5 with kiro If someone got a bigger card or local model good at tool calling i would love to know how it does https://github.com/ayushh0110/Weight-Space-Repair   submitted by   /u/Top_Speaker_7785 [link]   [comments]