File size: 1,035 Bytes
26ae91c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | print("Reverting exploratory two-column edit:", tools.edit.revert())
selected2 = {}
for score, l, j in ranked2[:16]:
if score > 0:
selected2.setdefault(l, []).append(j)
for l, cols in selected2.items():
print(tools.edit.project_out(
f"model.layers.{l}.mlp.down_proj.weight",
safe_dirs[l], cols=cols, strength=0.75,
evidence=f"Target activation {target_act2['circuit']} and independent weight {target_weight2['circuit']} both select L{l} neurons {cols}; excluded expanded harmful activation {harm_act2['circuit']}. Positive writes along first-half refused-safe vs answered-safe residual direction, orthogonalized against harmful-minus-benign."))
trial2 = tools.measure.dev_eval(n=64, sets=["borderline", "harmful", "benign"])
print("Trial 2:", trial2)
print("Accounting:", tools.edit.list_edits())
note("Replaced initial edit because expanded harmful ranking includes its neurons. Trial 2 uses top 16 positive target-specific writers at strength 0.75: " + str(selected2) + "; dev " + str(trial2)) |