Downloads · 30 days
11
3% of all-time downloads
Hate-speech-CNERG/Rationale_predictor
Rationale_predictor is a machine learning model from Hate-speech-CNERG. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as bigscience-openrail-m.
This model provides the class labels either toxic or not toxic as well as the rationales predicted which indicates the explanation of why something as toxic. This model is part of the ECAI paper - "Rationale-Guided Fe…
Downloads · 30 days
11
3% of all-time downloads
All-time downloads
413
Public
Repo size
876 MB
Likes
0
Public
Click a slice to open those files.
.bin438 MB · 100%
From the Hugging Face model README
This model provides the class labels either toxic or not toxic as well as the rationales predicted which indicates the explanation of why something as toxic. This model is part of the ECAI paper - "Rationale-Guided Few-Shot Classification to Detect Abusive Language "
This model can be directly used to predict some post as toxic/non-toxic and predicting the rationales behind it
Use the code below to get started with the model.
Please use the Model_Rational_Label class inside models.py to load the models. The default prediction in this hosted inference API may be wrong due to the use of different class initialisations.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
### from models.py
from models import *
tokenizer = AutoTokenizer.from_pretrained("Hate-speech-CNERG/bert-base-uncased-hatexplain-rationale-two")
model = Model_Rational_Label.from_pretrained("Hate-speech-CNERG/bert-base-uncased-hatexplain-rationale-two")
inputs = tokenizer("He is a great guy", return_tensors="pt")
prediction_logits, _ = model(input_ids=inputs['input_ids'],attention_mask=inputs['attention_mask'])
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]