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:
@@ -39,6 +39,7 @@ from .utils import (
|
|||||||
get_trial_parameters,
|
get_trial_parameters,
|
||||||
load_prompts,
|
load_prompts,
|
||||||
print,
|
print,
|
||||||
|
empty_cache,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -195,6 +196,9 @@ def run():
|
|||||||
p=2,
|
p=2,
|
||||||
dim=1,
|
dim=1,
|
||||||
)
|
)
|
||||||
|
# we don't need the residuals after computing refusal directions
|
||||||
|
del good_residuals, bad_residuals
|
||||||
|
empty_cache()
|
||||||
|
|
||||||
trial_index = 0
|
trial_index = 0
|
||||||
start_time = time.perf_counter()
|
start_time = time.perf_counter()
|
||||||
|
|||||||
Reference in New Issue
Block a user