-
Notifications
You must be signed in to change notification settings - Fork 756
FEAT: Drop fastchat from GCG (#965) #1049
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
Merged
romanlutz
merged 30 commits into
microsoft:main
from
varshini2305:feature/replace_fastchat
May 13, 2026
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
c611a36
test: add unit tests for GCG core algorithm components
romanlutz 9a2e7fc
test: add data/config and lifecycle tests for GCG
romanlutz 612c66f
test: add GCG integration tests with real GPT-2 model
romanlutz df31760
TEST: remove run_only_if_all_tests marker from GCG integration tests
romanlutz aad9a6f
Merge remote-tracking branch 'origin/main' into gcg-refactor
romanlutz fb5cb70
MAINT: fix pre-commit lint issues in GCG tests
romanlutz c98af28
MAINT: remove mlflow dependency from GCG, fix Dockerfile
romanlutz 98795bb
Merge remote-tracking branch 'origin/main' into gcg-refactor
romanlutz 0739083
MAINT: remove dead gbda_deterministic param, add AML launcher scripts
romanlutz db2a096
FIX: remove dead mpa_kwargs passed to MultiPromptAttack.__init__
romanlutz e7bee41
MAINT: switch Azure ML baseline to llama-2 (phi-3 has fastchat bug #965)
romanlutz 9a02400
TEST: add wiring test for IndividualPromptAttack -> MultiPromptAttack
romanlutz 123243b
TEST: add vicuna integration tests covering non-llama _update_ids path
romanlutz bd81029
TEST: add Azure ML GCG e2e test, update notebook to llama-2
romanlutz 0043339
MAINT: invoke GCG runner via 'python -m', drop scripts/ launchers
romanlutz 52e7c5d
MAINT: scope pyarrow 3.14 pin to the gcg extra
romanlutz 9aa1ca1
TEST: run the AML notebook itself instead of duplicating its logic
romanlutz 076ba36
DOC: regenerate 1_gcg_azure_ml.ipynb with executed cell outputs
romanlutz e7137db
FEAT: notebook polls AML job and prints generated suffix
romanlutz bee8f3f
MAINT: bump azure-ai-ml to >=1.32.0 to silence ListSecrets telemetry …
romanlutz 1ea66c2
Merge remote-tracking branch 'origin/main' into gcg-refactor
romanlutz 4c1ba12
TEST: cover log.log_gpu_memory branches and move to test_log.py
romanlutz d32d13b
FEAT: Drop fastchat from GCG, use tokenizer.apply_chat_template (#965)
varshini2305 863c490
FEAT: Add Phi-4 GCG config
romanlutz 122582e
Merge remote-tracking branch 'origin/main' into gcg-fastchat
romanlutz 1ba1be4
TEST: cover error paths added by fastchat removal in attack_manager.py
romanlutz cd9717d
Merge remote-tracking branch 'origin/main' into gcg-fastchat
romanlutz bdf9f1d
TEST: write GCG attack logfiles into tmp_path, not cwd
romanlutz 825d036
Merge remote-tracking branch 'origin/main' into gcg-fastchat
romanlutz dcdc247
TEST: assert sample_control changes at most one position
romanlutz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
220 changes: 74 additions & 146 deletions
220
pyrit/auxiliary_attacks/gcg/attack/base/attack_manager.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
pyrit/auxiliary_attacks/gcg/experiments/configs/individual_phi_4.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| transfer: False | ||
| target_weight: 1.0 | ||
| control_weight: 0.0 | ||
| progressive_goals: False | ||
| progressive_models: False | ||
| anneal: False | ||
| incr_control: False | ||
| stop_on_success: False | ||
| verbose: True | ||
| allow_non_ascii: False | ||
| num_train_models: 1 | ||
| result_prefix: "results/individual_phi4" | ||
| tokenizer_paths: ["microsoft/phi-4"] | ||
| tokenizer_kwargs: [{"use_fast": True}] | ||
| model_paths: ["microsoft/phi-4"] | ||
| model_kwargs: [{"low_cpu_mem_usage": True, "use_cache": False}] | ||
| devices: ["cuda:0"] | ||
| train_data: "" | ||
| test_data: "" | ||
| n_train_data: 50 | ||
| n_test_data: 0 | ||
| control_init: "! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !" | ||
| n_steps: 500 | ||
| test_steps: 50 | ||
| batch_size: 512 | ||
| learning_rate: 0.01 | ||
| topk: 256 | ||
| temp: 1 | ||
| filter_cand: True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.