-
Notifications
You must be signed in to change notification settings - Fork 0
/
GCG.yaml
75 lines (69 loc) · 2.5 KB
/
GCG.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
default_method_hyperparameters:
num_test_cases_per_behavior: 1
num_steps: 500
adv_string_init : "! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !"
allow_non_ascii: False
search_width: 512 # Number of candidates searched at each step
use_prefix_cache: True
# targets_path: ./data/adv_bench_dict.json
targets_path: ./data/400_behavior_to_target.json
target_len: -1
#== Eval Configs == #
eval_steps: 50
# 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
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
# ========== Specific experiment hyperparameters (overrides default_method_hyperparameters) ========== #
# Experiment names can be used in the save path and to override default hyperparameters.
# To add a new experiment, add a new section with the following format:
#
# experiment_name:
# <hyperparameter>: <value>
# ...
# <hyperparameter>: <value>
#
# Experiment name parsing:
# If an experiment name contains <model_name#>, then it will be expanded out into all model names in the models.yaml file.
# The parameters in these experiment configs can have the form <model_name#>['<key1>'][index1]['<key2>']... to reference values in the corresponding model config.
# If an expanded experiment name would have the same name as a manually added experiment, the manually added experiment config will be used instead.
<model_name1>:
target_model: <model_name1>['model']
test:
num_steps: 1
num_test_cases_per_behavior: 1
target_model:
model_name_or_path: lmsys/vicuna-7b-v1.5
use_fast_tokenizer: False
dtype: fp16
baichuan2_13b:
target_model:
model_name_or_path: baichuan-inc/Baichuan2-13B-Chat
device_map: auto
dtype: bf16
trust_remote_code: True
use_prefix_cache: False # Baichuan 2 13b expects KV cache to only be used during generation
check_refusal_min_loss: 0.5
gemma2_2b_it_fast:
target_model:
model_name_or_path: google/gemma-2-2b-it
use_fast_tokenizer: True
dtype: float16
use_prefix_cache: False
num_gpus: 1
gemma2_9b_it_fast:
target_model:
model_name_or_path: google/gemma-2-9b-it
use_fast_tokenizer: True
dtype: float16
use_prefix_cache: False
num_gpus: 1