perf: clear residuals after computing direction (#15)

Co-authored-by: mad-cat-lon <113548315+mad-cat-lon@users.noreply.github.com>
This commit is contained in:
red40maxxer
2025-11-17 11:48:22 -05:00
committed by GitHub
parent 09730bad70
commit 7bad84b4f1
+4
View File
@@ -39,6 +39,7 @@ from .utils import (
get_trial_parameters,
load_prompts,
print,
empty_cache,
)
@@ -195,6 +196,9 @@ def run():
p=2,
dim=1,
)
# we don't need the residuals after computing refusal directions
del good_residuals, bad_residuals
empty_cache()
trial_index = 0
start_time = time.perf_counter()