Finetune of the mt0-xl model for text toxification task.
This is a finetune of mt0-xl model for text toxification task. Can be used for synthetic data generation from non-toxic examples.
This model is intended to be used for synthetic data generation from non-toxic examples.
The model may be directly used for text toxification tasks.
The model may be used for generating toxic versions of sentences.
Since this model generates toxic versions of sentences, it may be used to increase toxicity of generated texts.
Use the code below to get started with the model.
1import transformers
2
3checkpoint = 'chameleon-lizard/tox-mt0-xl'
4
5tokenizer = transformers.AutoTokenizer.from_pretrained(checkpoint)
6model = transformers.AutoModelForSeq2SeqLM.from_pretrained(checkpoint, torch_dtype='auto', device_map="auto")
7
8pipe = transformers.pipeline(
9 "text2text-generation",
10 model=model,
11 tokenizer=tokenizer,
12 max_length=512,
13 truncation=True,
14)
15
16language = 'English'
17text = "That's dissapointing."
18print(pipe('Rewrite the following text in {language} the most toxic and obscene version possible: {text}')[0]['generated_text'])
19# Resulting text: "That's dissapointing, you stupid ass bitch."
Be sure to prompt with the provided prompt format for the best performance. Failure to include target language may result in model responses be in random language.