use new modaic nomenclature
This commit is contained in:
@@ -63,14 +63,18 @@ class AttackProgram(PrecompiledProgram):
|
||||
**kwargs,
|
||||
):
|
||||
super().__init__(config, **kwargs)
|
||||
attack_model = dspy.LM(model=config.lm, max_tokens=config.max_attack_tokens)
|
||||
|
||||
attack_model = dspy.LM(model=config.lm, max_tokens=config.max_attack_tokens, temperature=config.temperature)
|
||||
self.get_response = get_response
|
||||
self.layers = config.num_layers
|
||||
|
||||
self.try_attacks = [dspy.Predict(Attack) for _ in range(self.layers)]
|
||||
self.critique_attacks = [dspy.Predict(Refine) for _ in range(self.layers)]
|
||||
|
||||
self.target_model_name = config.target_lm
|
||||
self.max_attack_tokens = config.max_attack_tokens
|
||||
self.temperature = config.temperature
|
||||
|
||||
self.set_lm(attack_model)
|
||||
|
||||
def forward(self, harmful_intent, critique=""):
|
||||
|
||||
Reference in New Issue
Block a user