From 3a0db34f042a2cdc5de91a544b8c087f559757ed Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Mon, 22 Jul 2024 14:32:06 -0500 Subject: [PATCH] use generator device for get_score_autodan Signed-off-by: Jeffrey Martin --- garak/resources/autodan/genetic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/garak/resources/autodan/genetic.py b/garak/resources/autodan/genetic.py index 2a22db7a7..b16d81a8b 100644 --- a/garak/resources/autodan/genetic.py +++ b/garak/resources/autodan/genetic.py @@ -594,7 +594,7 @@ def get_score_autodan( losses = [] input_ids_list = [] target_slices = [] - device = generator.device if generator.device >= 0 else "cpu" + device = generator.device for item in test_controls: prefix_manager = AutoDanPrefixManager( generator=generator,