in pyrit/auxiliary_attacks/gcg/experiments/train.py [0:0]
def generate_suffix(
self,
*,
token: str = "",
tokenizer_paths: list = [],
model_name: str = "",
model_paths: list = [],
conversation_templates: list = [],
result_prefix: str = "",
train_data: str = "",
control_init: str = "! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !",
n_train_data: int = 50,
n_steps: int = 500,
test_steps: int = 50,
batch_size: int = 512,
transfer: bool = False,
target_weight: float = 1.0,
control_weight: float = 0.0,
progressive_goals: bool = False,
progressive_models: bool = False,
anneal: bool = False,
incr_control: bool = False,
stop_on_success: bool = False,
verbose: bool = True,
allow_non_ascii: bool = False,
num_train_models: int = 1,
devices: list = ["cuda:0"],
model_kwargs: list = [{"low_cpu_mem_usage": True, "use_cache": False}],
tokenizer_kwargs: list = [{"use_fast": False}],
n_test_data: int = 0,
test_data: str = "",
lr: float = 0.01,
topk: int = 256,
temp: int = 1,
filter_cand: bool = True,
gbda_deterministic: bool = True,
logfile: str = "",
random_seed: int = 42,