Perfect7613's picture
WeightPatch run astra-overrefusal-kits
26ae91c verified
Raw History Blame Contribute Delete
719 Bytes
for l, cols in agreed3.items():
name = f"model.layers.{l}.mlp.down_proj.weight"
mat = W.original(name).float().clone()
mat[:, cols] = 0
W.save_edit(name, mat,
evidence=f"Target activation circuit:8 and weight circuit:9 agree; harmful activation circuit:10 excluded. Trial 4 half-attenuation of these L{l} columns reduced borderline 27->23/64 with harmful 49/64 and benign 2/64 unchanged. Test complete suppression of the same columns: {cols}.")
trial5 = tools.measure.dev_eval(n=64, sets=["borderline", "harmful", "benign"])
print("Trial 5:", trial5)
print("Changed entries:", tools.edit.list_edits()["entries_changed"])
note("Trial 5: zero same 475 target-specific columns; dev " + str(trial5))