nlp-sexism-detector
Collection
11 items • Updated
This model is a fine-tuned version of cardiffnlp/twitter-roberta-base-hate, trained for multi-class sexism detection on the EXIST 2023 Task 2 dataset.
freeze_all
This repository contains the Linear Probing variant of our ablation study.
model.roberta.parameters()) were frozen during training. Only the final classification head was trained. This approach protects the pre-trained weights from catastrophic forgetting and speeds up training.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)Inputs must be preprocessed to match the CardiffNLP base model formatting. Note that this model is case-sensitive, so do not aggressively lowercase your text if you want to preserve capitalization signals:
@user) with the token @userhttpfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
repo_id = "francesco-zatto/twitter-roberta-base-hate-freeze-all-weighted-L-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)
Base model
cardiffnlp/twitter-roberta-base-hate