s-nlp/paranmt_for_detox
Viewer • Updated • 1.39k • 19
How to use s-nlp/t5-paranmt-detox with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("s-nlp/t5-paranmt-detox")
model = AutoModelForSeq2SeqLM.from_pretrained("s-nlp/t5-paranmt-detox")This is a paraphraser based on ceshine/t5-paraphrase-paws-msrp-opinosis and additionally fine-tuned on ParaNMT filtered for the task of detoxification.
The model was trained for the paper Text Detoxification using Large Pre-trained Neural Models.
An example of its use and the code for its training is given in https://github.com/skoltech-nlp/detox