Skip to content

Commit

Permalink
use generator device for get_score_autodan
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
  • Loading branch information
jmartin-tech committed Jul 22, 2024
1 parent 6c1bd1f commit 3a0db34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion garak/resources/autodan/genetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3a0db34

Please sign in to comment.