garak.buffs.paraphrase
Buff that paraphrases a prompt.
- class garak.buffs.paraphrase.Fast(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)
Bases:
Buff
,HFCompatible
CPU-friendly paraphrase buff based on Humarin’s T5 paraphraser
- DEFAULT_PARAMS = {'hf_args': {'device': 'cpu', 'torch_dtype': 'float32'}, 'para_model_name': 'garak-llm/chatgpt_paraphraser_on_T5_base'}
- bcp47 = 'en'
- doc_uri = 'https://huggingface.co/humarin/chatgpt_paraphraser_on_T5_base'
- class garak.buffs.paraphrase.PegasusT5(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)
Bases:
Buff
,HFCompatible
Paraphrasing buff using Pegasus model
- DEFAULT_PARAMS = {'hf_args': {'device': 'cpu', 'trust_remote_code': False}, 'max_length': 60, 'para_model_name': 'garak-llm/pegasus_paraphrase', 'temperature': 1.5}
- bcp47 = 'en'
- doc_uri = 'https://huggingface.co/tuner007/pegasus_paraphrase'