Downloads · 30 days
11
8% of all-time downloads
chameleon-lizard/detox-mt0-xl
detox-mt0-xl is a text generation model from chameleon-lizard. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as openrail++.
Finetune of the mt0-xl model for text detoxification task.
Downloads · 30 days
11
8% of all-time downloads
All-time downloads
134
Public
Parameters
3.7B
15 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors15 GB · 100%
From the Hugging Face model README
Finetune of the mt0-xl model for text detoxification task.
This is a finetune of mt0-xl model for text detoxification task. Can be used for synthetic data generation from toxic examples.
This model is intended to be used as a text detoxification task in 9 languages: English, Russian, Ukranian, Amharic, German, Spanish, Chinese, Arabic, Hindi.
The model may be directly used for text detoxification tasks.
Use the code below to get started with the model.
import transformers
checkpoint = 'chameleon-lizard/detox-mt0-xl'
tokenizer = transformers.AutoTokenizer.from_pretrained(checkpoint)
model = transformers.AutoModelForSeq2SeqLM.from_pretrained(checkpoint, torch_dtype='auto', device_map="auto")
pipe = transformers.pipeline(
"text2text-generation",
model=model,
tokenizer=tokenizer,
max_length=512,
truncation=True,
)
language = 'English'
text = "You are a major fucking disappointment."
print(pipe('Write a non-toxic version of the following text in {language}: {text}')[0]['generated_text'])
# Resulting text: "You are a major disappointment.""
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.