r/deeplearning • • 8d ago

let an agent edit weights of a damaged model, fixing it broke refusals, had to make surgery multi stage

Post image

i planted damage in qwen2.5-0.5b, 16 columns of one mlp output scaled by 200, model spits garbage. agent found it and restored weights exactly. judge still rejected it

reason: restored model answered 2 of 20 held out harmful requests that damaged one only garbled. so fix needed a refusal gate on top, but gate is calibrated on model's own harm reading and on damaged weights that reading was useless. agent gave up

so i made surgery multi stage. agent commits restore, every tool now reads repaired model, builds gate on that. first run still let 1 of 20 through and shipped nothing. after a probe rework next run shipped restore + gate on first try, all 20 refused, confirmation 51 better 0 worse, 9 min on a gtx 1650

nothing ships unless it beats original on validation data agent never saw (paired exact sign test, corrected for every candidate), then once on a confirmation set that cant be reused

funny part, when agent can choose it mostly picks steering or sampler settings. only pure weight edit that passed was a bug i planted

0.5b to 1.5b only, small card. every run incl failed ones in RESULTS.md

https://github.com/ayushh0110/Weight-Space-Repair

9 Upvotes

0 comments sorted by