garak.buffs.paraphrase
Buff that paraphrases a prompt.
- class Fast(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)Source
Bases:
Buff,HFCompatibleCPU-friendly paraphrase buff based on Humarin’s T5 paraphraser
Configurable parameters:
DEFAULT_PARAMScontents:para_model_name='garak-llm/chatgpt_paraphraser_on_T5_base'hf_args={'device': 'cpu', 'torch_dtype': 'float32', 'custom_generate': 'transformers-community/group-beam-search', 'trust_remote_code': True}
Default values are listed
See also Configuring garak for how to set these values.
Other attributes:
- doc_uri = 'https://huggingface.co/humarin/chatgpt_paraphraser_on_T5_base'
- lang = 'en'
- class PegasusT5(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)Source
Bases:
Buff,HFCompatibleParaphrasing buff using Pegasus model
Configurable parameters:
DEFAULT_PARAMScontents:para_model_name='garak-llm/pegasus_paraphrase'hf_args={'device': 'cpu', 'trust_remote_code': False}max_length=60temperature=1.5
Default values are listed
See also Configuring garak for how to set these values.
Other attributes:
- doc_uri = 'https://huggingface.co/tuner007/pegasus_paraphrase'
- lang = 'en'