This model card documents the demo paper "PEACE: Providing Explanations and
Analysis for Combating Hate Expressions" accepted at the 27th European
Conference on Artificial Intelligence:
https://www.ecai2024.eu/calls/demos
.
The Model
This model is a hate speech detector fine-tuned specifically for detecting
implicit hate speech. It is based on the paper "PEACE: Providing Explanations
and Analysis for Combating Hate Expressions" by Greta Damo, Nicolás Benjamín
Ocampo, Elena Cabrio, and Serena Villata, presented at the 27th European
Conference on Artificial Intelligence.
Training Parameters and Experimental Info
The model was trained using the ISHate dataset, focusing on implicit data.
Training parameters included:
Batch size: 32
Weight decay: 0.01
Epochs: 4
Learning rate: 2e-5
For detailed information on the training process, please refer to the
model's
paper
.
Usage
First you might need the transformers version 4.30.2.
pip install transformers==4.30.2
This model was created using pytorch vanilla. In order to load it you have to use the following Model Class.
import torch
text = "Are you sure that Islam is a peaceful religion?"
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
_, logits = contrastive_model(inputs["input_ids"], inputs["attention_mask"])
probabilities = torch.softmax(logits, dim=1)
_, predicted_labels = torch.max(probabilities, dim=1)
Datasets
The model was trained on the
ISHate dataset
, specifically
the training part of the dataset which focuses on implicit hate speech.
Evaluation Results
The model's performance was evaluated using standard metrics, including F1 score
and accuracy. For comprehensive evaluation results, refer to the linked paper.
peace_cont_bert huggingface.co is an AI model on huggingface.co that provides peace_cont_bert's model effect (), which can be used instantly with this BenjaminOcampo peace_cont_bert model. huggingface.co supports a free trial of the peace_cont_bert model, and also provides paid use of the peace_cont_bert. Support call peace_cont_bert model through api, including Node.js, Python, http.
peace_cont_bert huggingface.co is an online trial and call api platform, which integrates peace_cont_bert's modeling effects, including api services, and provides a free online trial of peace_cont_bert, you can try peace_cont_bert online for free by clicking the link below.
BenjaminOcampo peace_cont_bert online free url in huggingface.co:
peace_cont_bert is an open source model from GitHub that offers a free installation service, and any user can find peace_cont_bert on GitHub to install. At the same time, huggingface.co provides the effect of peace_cont_bert install, users can directly use peace_cont_bert installed effect in huggingface.co for debugging and trial. It also supports api for free installation.