Skip to content

Commit

Permalink
migrate HF models & datasets to garak-llm HF org; move all models to …
Browse files Browse the repository at this point in the history
…safetensors; delete model pickles; update model & dataset names and refs in source (#854)
  • Loading branch information
leondz authored Aug 27, 2024
1 parent 517627f commit a81e5e6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions garak/buffs/paraphrase.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PegasusT5(Buff):
doc_uri = "https://huggingface.co/tuner007/pegasus_paraphrase"

def __init__(self, config_root=_config) -> None:
self.para_model_name = "tuner007/pegasus_paraphrase" # https://huggingface.co/tuner007/pegasus_paraphrase
self.para_model_name = "garak-llm/pegasus_paraphrase" # https://huggingface.co/tuner007/pegasus_paraphrase
self.max_length = 60
self.temperature = 1.5
self.num_return_sequences = 6
Expand Down Expand Up @@ -76,7 +76,7 @@ class Fast(Buff):
doc_uri = "https://huggingface.co/humarin/chatgpt_paraphraser_on_T5_base"

def __init__(self, config_root=_config) -> None:
self.para_model_name = "humarin/chatgpt_paraphraser_on_T5_base"
self.para_model_name = "garak-llm/chatgpt_paraphraser_on_T5_base"
self.num_beams = 5
self.num_beam_groups = 5
self.num_return_sequences = 5
Expand Down
8 changes: 4 additions & 4 deletions garak/detectors/misleading.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class MustRefuteClaimModel(HFDetector):
"""

DEFAULT_PARAMS = HFDetector.DEFAULT_PARAMS | {
"detector_model_path": "leondz/refutation_detector_distilbert",
"detector_model_path": "garak-llm/refutation_detector_distilbert",
"detector_target_class": "label",
}

description = (
"Using leondz/refutation_detector_distilbert to detect model refutations"
"Using garak-llm/refutation_detector_distilbert to detect model refutations"
)
bcp47 = "en"
accuracy = 0.9506 # 50:50 class balance in training data :/
Expand Down Expand Up @@ -55,11 +55,11 @@ class MustContradictNLI(HFDetector):
A "hit" occurs when the generation fails to include a contradiction.
Using ynie/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli to detect model refutations
Using copy of ynie/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli to detect model refutations
"""

DEFAULT_PARAMS = HFDetector.DEFAULT_PARAMS | {
"detector_model_path": "ynie/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli",
"detector_model_path": "garak-llm/roberta-large-snli_mnli_fever_anli_R1_R2_R3-nli",
"detector_target_class": "label",
}

Expand Down
4 changes: 2 additions & 2 deletions garak/detectors/packagehallucination.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
has since been written something).
The default is to use a Pypi package list from 9th December 2021. You might
also try the HF Hub dataset `strombergnlp/pypi-20211209`. Pypi archives
also try the HF Hub dataset `garak-llm/pypi-20211209`. Pypi archives
come from https://pypi.org/simple/ which is indexed on archive.org, see
https://web.archive.org/web/20230000000000*/https://pypi.org/simple/ .
Expand All @@ -33,7 +33,7 @@ class PythonPypi(Detector):
bcp47 = "en"

pypi_packages = None
pypi_dataset_name = "strombergnlp/pypi-20230724"
pypi_dataset_name = "garak-llm/pypi-20230724"

def _load_package_list(self):
import datasets
Expand Down
4 changes: 2 additions & 2 deletions garak/detectors/toxicity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@


class ToxicCommentModel(HFDetector):
"""Using martin-ha/toxic-comment-model DistilBERT to detect toxic content"""
"""Using backup of martin-ha/toxic-comment-model DistilBERT to detect toxic content"""

DEFAULT_PARAMS = HFDetector.DEFAULT_PARAMS | {
"detector_model_path": "martin-ha/toxic-comment-model",
"detector_model_path": "garak-llm/toxic-comment-model",
"detector_target_class": "toxic",
}

Expand Down
2 changes: 1 addition & 1 deletion garak/probes/atkgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Tox(Probe):
"max_calls": 5,
"constructive_tension": True,
"red_team_model_type": "huggingface.Pipeline",
"red_team_model_name": "leondz/artgpt2tox",
"red_team_model_name": "garak-llm/artgpt2tox",
"red_team_model_config": {
"hf_args": {"device": "cpu", "torch_dtype": "float32"}
}, # defer acceleration devices to model under test unless overriden
Expand Down

0 comments on commit a81e5e6

Please sign in to comment.