Perfect7613's picture
WeightPatch run astra-overrefusal-kits
26ae91c verified
Raw History Blame Contribute Delete
956 Bytes
print(tools.edit.revert())
scaled_units = {l: cols for l, cols in agreed2.items() if cols}
print("Selected column count:", sum(map(len, scaled_units.values())))
for l, cols in scaled_units.items():
name = f"model.layers.{l}.mlp.down_proj.weight"
mat = W.original(name).float().clone()
mat[:, cols] *= 0.5
W.save_edit(name, mat,
evidence=f"SafeTune activation {target_act2['circuit']} and weight {target_weight2['circuit']} intersection for borderline-minus-benign, excluding harmful activation {harm_act2['circuit']}: L{l} {cols}. Trials 1/2 found harmful-orthogonal projection insufficient; test selective neuron output attenuation, not global refusal ablation.")
trial3 = tools.measure.dev_eval(n=64, sets=["borderline", "harmful", "benign"])
print("Trial 3:", trial3)
print("Accounting:", tools.edit.list_edits())
note("Trial 3: 50% output-column attenuation on expanded independently agreed target-only neurons; " + str(trial3))