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

FEAT Add adversarial suffix attack GCG #180

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8b3f413
added requirements for adv suffix
NaijingGuo Apr 29, 2024
611e3bd
added adv suffix code
NaijingGuo Apr 29, 2024
e04d1e7
pre-commit white space changes
NaijingGuo Apr 29, 2024
7bbaebe
Merge branch 'main' into main
NaijingGuo May 3, 2024
66fe982
load data from url instead of copying to repo
NaijingGuo May 3, 2024
29aaca4
Merge branch 'main' of https://github.com/NaijingGuo/PyRIT
NaijingGuo May 3, 2024
2796e16
refactor generate suffix into class
NaijingGuo May 4, 2024
3b5e863
updated loading HF token
NaijingGuo May 4, 2024
fbc3612
Some clean up; documented demo script
NaijingGuo May 4, 2024
7ad026c
refactored parse log and evaluation into a class, added eval demo code
NaijingGuo May 5, 2024
b3b5361
ignore evaluation output from suffix attack
NaijingGuo May 5, 2024
a717f11
Merge branch 'main' into main
NaijingGuo May 7, 2024
9f8f76a
cleaned up and renamed files
NaijingGuo May 7, 2024
f5df72a
updated readme
NaijingGuo May 7, 2024
3dc9067
refactor: move config files from Python to YAML files.
dlmgary May 8, 2024
6d6ec04
build: add torch as an extra dependency to pyproject
dlmgary May 8, 2024
c81caa9
refactor: fix imports
dlmgary May 8, 2024
ba4e50a
refactor: remove dependency on ml_collections.config_flags and update…
dlmgary May 8, 2024
da9cae2
load HF token from env
NaijingGuo May 9, 2024
407327f
updated loading configs
NaijingGuo May 10, 2024
c26dd67
small cleanup
NaijingGuo May 10, 2024
0c2b20b
updated evalutaion scipt to work w/ YAML config
NaijingGuo May 10, 2024
0b296ce
added a common mistral failure prefix
NaijingGuo May 10, 2024
7fa1978
added multiprompt (single model) support
NaijingGuo May 11, 2024
95cc394
added multimodel multiprompt support
NaijingGuo May 14, 2024
8ca044b
Merge branch 'main' into main
NaijingGuo May 14, 2024
901decb
added llama3 support
NaijingGuo May 17, 2024
29f7c18
added vicuna support
NaijingGuo May 17, 2024
75c5089
multiple prompts on all models
NaijingGuo May 17, 2024
8576f1a
added random training and testing targets with fixed seed
NaijingGuo May 21, 2024
442add2
renamed folders
NaijingGuo May 22, 2024
d4718dd
removed offset arg, updated doc string
NaijingGuo May 22, 2024
1939bf3
Merge branch 'main' into main
NaijingGuo May 22, 2024
95f6b85
white space and syntax clean up
NaijingGuo May 22, 2024
0e5662c
remove unused parameters and import
NaijingGuo May 22, 2024
07ba461
Merge branch 'main' into main
NaijingGuo May 24, 2024
67f1bb3
removed evaluation
NaijingGuo May 24, 2024
ed2bc71
clean up
NaijingGuo May 24, 2024
b2cba81
clean up
NaijingGuo May 24, 2024
be7e656
Merge branch 'main' into main
NaijingGuo May 24, 2024
5c63030
updated readme
NaijingGuo May 24, 2024
01ecd59
Merge branch 'main' of https://github.com/NaijingGuo/PyRIT
NaijingGuo May 24, 2024
ceafdaf
Merge branch 'main' into main
NaijingGuo Jun 7, 2024
2f33647
added documentation for parameters
NaijingGuo Jun 7, 2024
2353abe
white space reformat
NaijingGuo Jun 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env_example
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ AZURE_ML_REGISTRY_NAME="azureml"
# AZURE ML and HF Model Download/Register Compute Configuration
# Update with your model ID
HF_MODEL_ID="mistralai/Mistral-7B-Instruct-v0.1"
HF_TOKEN="<Provide HuggingFace Token here>"

# Update with your task name
TASK_NAME="text-generation"
AZURE_ML_COMPUTE_TYPE="amlcompute"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# PyRIT-specific configs
submodules/
results/
eval/
default_memory.json.memory

# Byte-compiled / optimized / DLL files
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ dependencies = [
"confusables==1.2.0",
"duckdb==0.10.0",
"duckdb-engine==0.11.2",
"fschat==0.2.36",
"jsonpickle>=3.0.4",
"jupyter>=1.0.0",
"ipykernel>=6.29.4",
"logzero>=1.7.0",
"ml-collections==0.1.1",
"numpy>=1.26.4",
"onnxruntime>=1.14.1",
"onnx>=1.16.0",
Expand Down Expand Up @@ -80,6 +82,9 @@ dev = [
"semantic-kernel==0.9.4b1",
"types-PyYAML>=6.0.12.9",
]
torch = [
"torch>=2.3.0"
]

[tool.pytest.ini_options]
pythonpath = ["."]
Expand Down
Empty file.
Empty file.