Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attack fixes #555

Merged
merged 22 commits into from
Apr 8, 2024
Merged

Attack fixes #555

merged 22 commits into from
Apr 8, 2024

Conversation

erickgalinkin
Copy link
Collaborator

Fixes and improvements to TAP, GCG, AutoDAN.

@erickgalinkin
Copy link
Collaborator Author

Not sure why the cohere library is causing failures. We should fix that in another branch.

@erickgalinkin erickgalinkin linked an issue Mar 22, 2024 that may be closed by this pull request
@erickgalinkin
Copy link
Collaborator Author

Rebased and force-pushed to fix Cohere error.

… target models in TAP to work better with VRAM. Modify GCG, TAP, and AutoDAN probes to return an empty list to avoid assertion errors. Fix AutoDAN mutation generator.
garak/probes/dan.py Outdated Show resolved Hide resolved
@@ -1429,7 +1431,7 @@ def run(
test_steps: int = 50,
incr_control: bool = True,
stop_on_success: bool = True,
verbose: bool = True,
verbose: bool = False,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be taken from garak._config.system.verbose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can! That's a good one.

target_max_tokens: int = 150,
evaluator_max_tokens: int = 10,
evaluator_temperature: float = 0.0,
self,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey do you know how these params can be set when invoking via the probe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need a ProbeConfig class in _config.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

values in _config.plugins.probes.ClassName are automatically set in classes at instantiation time - just wondering a bit about the stuff in resources/. maybe let's wait for demand before triaging dealing with that

Copy link
Owner

@leondz leondz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a lot of work, the integration looks like it has continued to be non-trivial, but the harmonisation now looks clear

Copy link
Owner

@leondz leondz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@erickgalinkin erickgalinkin merged commit bbfb3fe into main Apr 8, 2024
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 8, 2024
@jmartin-tech jmartin-tech deleted the attack_fixes branch April 8, 2024 12:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCG/AutoDAN generative probes
3 participants