Downloads · 30 days
9
5% of all-time downloads
francesco-zatto/hateBERT-freeze-embeddings-sexism-detector
hateBERT-freeze-embeddings-sexism-detector is a text classification model from francesco-zatto. Use it when you need a label for a piece of text.
This model is a fine-tuned version of GroNLP/hateBERT, trained for multi-class sexism detection on the EXIST 2023 Task 2 dataset.
Downloads · 30 days
9
5% of all-time downloads
All-time downloads
172
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of GroNLP/hateBERT, trained for multi-class sexism detection on the EXIST 2023 Task 2 dataset.
freeze_embeddingsThis repository contains the Freeze Embeddings variant of our ablation study.
model.bert.embeddings.parameters()) was frozen during training. All subsequent transformer encoder layers and the classification head were fully fine-tuned. This allows the model to learn task-specific attention patterns while anchoring the fundamental word representations.Categorizes English tweets into one of four sexist intentions:
0. - (Non-sexist)
DIRECT (Directly sexist messages)JUDGEMENTAL (Messages condemning sexist behaviors)REPORTED (Messages reporting a sexist situation)Because HateBERT is built on bert-base-uncased, it automatically lowercases text. If you are keeping preprocessing consistent across your ablation study, ensure your inputs are cleaned accordingly:
@user) with the token @userhttpfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
repo_id = "francesco-zatto/hateBERT-freeze-embeddings-sexism-detector"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)
inputs = tokenizer("Your cleaned tweet text here", return_tensors="pt")
outputs = model(**inputs)