-
Notifications
You must be signed in to change notification settings - Fork 0
/
AutoDan.yaml
383 lines (336 loc) · 12 KB
/
AutoDan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
default_method_hyperparameters:
num_steps: 100
num_test_cases_per_behavior: 1
batch_size: 64 # number of parallel mutations
num_elites: 0.1
crossover: 0.5
num_points: 5
mutation: 0.01
targets_path: ./data/400_behavior_to_target.json
target_len: -1
#== Eval Configs == #
eval_steps: 10
# if early_stopping: stop when loss <= early_stopping_min_loss (every step)
early_stopping: True
early_stopping_min_loss: 0.05
# If eval_with_check_refusal==True and loss <= check_refusal_min_loss:
# stop when generation is not refusal (every eval_steps)
eval_with_check_refusal: True # off
check_refusal_min_loss: 0.05
#== Filter Config ==#
jb_filter_window_size: 8
jb_filter_metric_name: perplexity
jb_filter_threshold: -38276.122748721245
seed: 0
adaptive: True
# using gpt mutate model
# mutate_target_model:
# model_name_or_path: gpt-3.5-turbo-1106
# token: <openai_api_token>
# using open-source mutate model
mutate_model:
# model_name_or_path: mistralai/Mistral-7B-Instruct-v0.2
model_name_or_path: mistralai/Mixtral-8x7B-Instruct-v0.1
# use_vllm: True
num_gpus: 1
dtype: bfloat16
# uncomment this to use toghether api instead of gpus, will override num_gpus
# together_api_key: <together_api_key>
#mutate_model:
# model_name_or_path: mistralai/Mistral-7B-Instruct-v0.2
# use_vllm: True
# num_gpus: 1
# dtype: bfloat16
# uncomment this to use toghether api instead of gpus, will override num_gpus
# together_api_key: <together_api_key>
<model_name1>:
target_model: <model_name1>['model']
test:
num_steps: 1
target_model:
model_name_or_path: lmsys/vicuna-7b-v1.5
use_fast_tokenizer: False
use_flash_attention_2: True
num_gpus: 1
model_short_name: Vicuna # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: LMSYS # AutoDan's original implementation has a placeholder for developer name/company in prompts
gemma_7b_it_fast:
target_model:
model_name_or_path: google/gemma-7b-it
use_fast_tokenizer: True
model_short_name: Gemma
developer_name: Google
gemma2_2b_it_fast:
target_model:
model_name_or_path: google/gemma-2-2b-it
use_fast_tokenizer: True
dtype: float16
model_short_name: Gemma
developer_name: Google
gemma2_9b_it_fast:
target_model:
model_name_or_path: google/gemma-2-9b-it
use_fast_tokenizer: True
dtype: float16
model_short_name: Gemma
developer_name: Google
vicuna_7b_v1_5:
target_model:
model_name_or_path: lmsys/vicuna-7b-v1.5
use_fast_tokenizer: False
use_flash_attention_2: True
model_short_name: Vicuna # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: LMSYS # AutoDan's original implementation has a placeholder for developer name/company in prompts
vicuna_13b_v1_5:
target_model:
model_name_or_path: lmsys/vicuna-13b-v1.5
use_fast_tokenizer: False
use_flash_attention_2: True
num_gpus: 1
model_short_name: Vicuna # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: LMSYS # AutoDan's original implementation has a placeholder for developer name/company in prompts
vicuna_13b_v1_5_fast:
target_model:
model_name_or_path: lmsys/vicuna-13b-v1.5
use_fast_tokenizer: Fast
use_flash_attention_2: True
dtype: bfloat16
num_gpus: 1
model_short_name: Vicuna # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: LMSYS # AutoDan's original implementation has a placeholder for developer name/company in prompts
zephyr_7b:
target_model:
model_name_or_path: HuggingFaceH4/zephyr-7b-beta
use_fast_tokenizer: False
use_flash_attention_2: True
model_short_name: Zephyr
developer_name: Hugging Face
zephyr_7b_robust:
target_model:
model_name_or_path: zephyr_robust
use_fast_tokenizer: False
dtype: bfloat16
model_short_name: Zephyr
developer_name: Hugging Face
r2d2_fast:
target_model:
model_name_or_path: cais/zephyr_7b_r2d2
use_fast_tokenizer: True
dtype: bfloat16
model_short_name: Zephyr
developer_name: Hugging Face
starling_7b_fast:
target_model:
use_fast_tokenizer: True
model_name_or_path: berkeley-nest/Starling-LM-7B-alpha
dtype: bfloat16
model_short_name: Starling
developer_name: Hugging Face
koala_7b:
target_model:
model_name_or_path: /data/private_models/harmbench/models/koala-7B
use_fast_tokenizer: False
dtype: bfloat16
developer_name: UC Berkeley
model_short_name: Koala
koala_13b:
target_model:
model_name_or_path: /data/private_models/harmbench/models/koala-13B
use_fast_tokenizer: False
dtype: bfloat16
developer_name: UC Berkeley
model_short_name: Koala
starling_7b:
target_model:
model_name_or_path: berkeley-nest/Starling-LM-7B-alpha
use_fast_tokenizer: False
use_flash_attention_2: True
model_short_name: GPT-4 # try ask the model `who are you?`
developer_name: OpenAI
dtype: bfloat16
openchat_3_5_1210:
target_model:
model_name_or_path: /data/private_models/harmbench/models/openchat-3.5-1210
use_fast_tokenizer: False
use_flash_attention_2: True
model_short_name: GPT-4 # try ask the model `who are you?`
developer_name: OpenAI
dtype: bfloat16
llama2_7b:
num_test_cases_per_behavior: 1
eval_steps: 25
target_model:
model_name_or_path: meta-llama/Llama-2-7b-chat-hf
use_fast_tokenizer: False
num_gpus: 1
dtype: bfloat16
model_short_name: Llama-2 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama2_7b_fast:
target_model:
# model_name_or_path: /fast/apanfilov/huggingface/models--meta-llama--Llama-2-7b-chat-hf
model_name_or_path: meta-llama/Llama-2-7b-chat-hf
use_fast_tokenizer: True
num_gpus: 1
model_short_name: Llama-2 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama2_13b:
eval_steps: 25
target_model:
model_name_or_path: meta-llama/Llama-2-13b-chat-hf
use_fast_tokenizer: False
num_gpus: 2
model_short_name: Llama-2 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama2_13b_fast:
target_model:
model_name_or_path: meta-llama/Llama-2-13b-chat-hf
use_fast_tokenizer: True
num_gpus: 2
dtype: bfloat16
model_short_name: Llama-2 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama2_70b:
eval_steps: 25
target_model:
model_name_or_path: /data/private_models/llama2/llama-2-weights-hf-70b-chat
use_fast_tokenizer: False
num_gpus: 2
dtype: bfloat16
model_short_name: Llama-2 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama3_8b_fast:
target_model:
model_name_or_path: meta-llama/Meta-Llama-3-8B-Instruct
use_fast_tokenizer: True
dtype: bfloat16
num_gpus: 1
model_short_name: Llama-3 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama3_1_8b_fast:
target_model:
model_name_or_path: meta-llama/Meta-Llama-3.1-8B-Instruct
use_fast_tokenizer: True
dtype: bfloat16
num_gpus: 1
model_short_name: Llama-3 # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Meta # AutoDan's original implementation has a placeholder for developer name/company in prompts
llama3_2_1b_fast:
target_model:
model_name_or_path: meta-llama/Llama-3.2-1B-Instruct
use_fast_tokenizer: True
dtype: float16
model_short_name: Llama-3
developer_name: Meta
llama3_2_3b_fast:
target_model:
model_name_or_path: meta-llama/Llama-3.2-3B-Instruct
use_fast_tokenizer: True
dtype: float16
model_short_name: Llama-3
developer_name: Meta
orca_2_7b:
target_model:
model_name_or_path: microsoft/Orca-2-7b
use_fast_tokenizer: False
use_flash_attention_2: True
num_gpus: 1
dtype: bfloat16
model_short_name: Orca # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Microsoft # AutoDan's original implementation has a placeholder for developer name/company in prompts
orca_2_13b:
target_model:
model_name_or_path: microsoft/Orca-2-13b
use_fast_tokenizer: False
use_flash_attention_2: True
num_gpus: 1
dtype: bfloat16
model_short_name: Orca # AutoDan's original implementation has a placeholder for model name in prompts
developer_name: Microsoft # AutoDan's original implementation has a placeholder for developer name/company in prompts
baichuan2_7b:
target_model:
model_name_or_path: /data/private_models/baichuan2_fixed/baichuan2-7b-chat
use_fast_tokenizer: False
dtype: bfloat16
trust_remote_code: True
model_short_name: Baichuan
developer_name: Baichuan
num_gpus: 2
forward_batch_size: 16
baichuan2_13b:
target_model:
model_name_or_path: /data/private_models/baichuan2_fixed/baichuan2-13b-chat
use_fast_tokenizer: False
dtype: bfloat16
trust_remote_code: True
model_short_name: Baichuan
developer_name: Baichuan
device_map: balanced_low_0
num_gpus: 2
forward_batch_size: 8 # setting forward_batch_size because implementation has a lot of cache after each auto_find_batch_size OOM: #https://github.com/QwenLM/Qwen/issues/538
solar_10_7b_instruct:
target_model:
model_name_or_path: upstage/SOLAR-10.7B-Instruct-v1.0
use_fast_tokenizer: False
dtype: float16
trust_remote_code: True
model_short_name: GPT
developer_name: OpenAI
num_gpus: 1
mistral_7b_v2:
target_model:
model_name_or_path: mistralai/Mistral-7B-Instruct-v0.2
use_fast_tokenizer: False
dtype: bfloat16
trust_remote_code: True
model_short_name: Mistral
developer_name: Mistral AI
num_gpus: 1
mixtral_8x7b:
target_model:
model_name_or_path: mistralai/Mixtral-8x7B-Instruct-v0.1
use_fast_tokenizer: False
dtype: bfloat16
trust_remote_code: True
model_short_name: Mistral
developer_name: Mistral AI
num_gpus: 2
qwen_7b_chat:
target_model:
model_name_or_path: /data/private_models/harmbench/models/Qwen-7B-Chat
use_fast_tokenizer: True
trust_remote_code: True
use_flash_attn: True
dtype: bfloat16
pad_token: <|extra_0|>
eos_token: <|endoftext|>
model_short_name: QianWen
developer_name: Alibaba Cloud
num_gpus: 2
forward_batch_size: 16 # setting forward_batch_size because implementation of qwen have a lot of cache after each auto_find_batch_size OOM: #https://github.com/QwenLM/Qwen/issues/538
qwen_14b_chat:
target_model:
model_name_or_path: /data/private_models/harmbench/models/Qwen-14B-Chat
use_fast_tokenizer: True
trust_remote_code: True
use_flash_attn: True
dtype: bfloat16
pad_token: <|extra_0|>
eos_token: <|endoftext|>
model_short_name: QianWen
developer_name: Alibaba Cloud
num_gpus: 2
device_map: auto
forward_batch_size: 8
qwen_72b_chat:
target_model:
model_name_or_path: /data/private_models/harmbench/models/Qwen-72B-Chat
use_fast_tokenizer: True
trust_remote_code: True
dtype: bfloat16
pad_token: <|extra_0|>
eos_token: <|endoftext|>
model_short_name: QianWen
developer_name: Alibaba Cloud
num_gpus: 3
forward_batch_size: 8