Skip to content

Commit

Permalink
Fix mi.json
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgroot42 committed Mar 27, 2024
1 parent 2aba034 commit 312968d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The data we used for our experiments is available on [Hugging Face Datasets](htt
## MIA experiments how to run

```
python run.py --config configs/mi_readme.json
python run.py --config configs/mi.json
```

# Attacks
Expand Down
6 changes: 3 additions & 3 deletions configs/mi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"max_tokens": 512,
"max_data": 100000,
"output_name": "unified_mia",
"specific_source": "Github",
"specific_source": "Github_ngram_13_<0.8_truncated",
"n_samples": 1000,
"blackbox_attacks": ["loss", "ref", "min_k", "zlib"],
"blackbox_attacks": ["loss", "ref", "min_k", "zlib", "ne"],
"ref_config": {
"models": [
"stabilityai/stablelm-base-alpha-3b-v2"
Expand All @@ -33,5 +33,5 @@
"device_aux": "cuda:0"
},
"dump_cache": false,
"load_from_cache": true
"load_from_hf": true
}
22 changes: 0 additions & 22 deletions configs/mi_readme.json

This file was deleted.

2 changes: 1 addition & 1 deletion mimir/attacks/min_k.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, config: ExperimentConfig, model: Model):
@ch.no_grad()
def _attack(self, document, probs, tokens=None, **kwargs):
"""
Min-k % Prob Attack. Gets model praobbilities and returns likelihood when computed over top k% of ngrams.
Min-k % Prob Attack. Gets model probabilities and returns likelihood when computed over top k% of ngrams.
"""
# Hyper-params specific to min-k attack
k: float = kwargs.get("k", 0.2)
Expand Down

0 comments on commit 312968d

Please sign in to comment.