You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ pip install -e .
26
26
27
27
## Overview
28
28
29
-
The GCG algorithm was introduced in [Universal and Transferrable Attacks on Aligned Language Models](https://arxiv.org/pdf/2307.15043)[1] by Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, Zico Kolter, and Matt Fredrikson. This implementation implements the original algorithm and supports several modifications that can improve performance, including multi-position token swapping [2], a historical attack buffer [2][3], the mellowmax loss function [4][5], and probe sampling [6].
29
+
The GCG algorithm was introduced in [Universal and Transferrable Attacks on Aligned Language Models](https://arxiv.org/pdf/2307.15043)[1] by Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, Zico Kolter, and Matt Fredrikson. nanoGCG implements the original algorithm and supports several modifications that can improve performance, including multi-position token swapping [2], a historical attack buffer [2][3], the mellowmax loss function [4][5], and probe sampling [6].
30
30
31
31
## Usage
32
32
@@ -93,7 +93,7 @@ The parameters that can be configured and their defaults are:
-`probe_sampling_config: ProbeSamplingConfig = None` - A collection of configuratble parameters for probe sampling. See the example below.
96
+
-`probe_sampling_config: ProbeSamplingConfig = None` - A collection of configurable parameters for probe sampling. See the example below.
97
97
98
98
Note that the default nanoGCG configuration will run the GCG algorithm as described in the [original paper](https://arxiv.org/pdf/2307.15043) without algorithmic changes like multi-position token swapping and mellowmax.
99
99
@@ -136,13 +136,13 @@ You can enable probe sampling by specifying the `probe_sampling_config` with app
136
136
import nanogcg
137
137
import torch
138
138
139
-
from nanogcg import GCGConfig
139
+
from nanogcg import GCGConfig, ProbeSamplingConfig
140
140
from transformers import AutoModelForCausalLM, AutoTokenizer
0 commit comments