Instructions to use IMSyPP/hate_speech_en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IMSyPP/hate_speech_en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="IMSyPP/hate_speech_en")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("IMSyPP/hate_speech_en") model = AutoModelForSequenceClassification.from_pretrained("IMSyPP/hate_speech_en", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Update README.md
6dc7c7d -
Update README.md
6e83d0f -
Update README.md
b31b850 -
Update README.md
498e4a0 -
Update README.md
702e9ed
-
Update README.md
6d6f8f2
-
Update README.md
ffe5433
-
Update README.md
4f57871
-
changed config to work with automodel
cd48c0c -
Merge branch 'main' of https://huggingface.co/IMSyPP/hate_speech_en into main
d21d032 -
changed config to enable loading with automodel
cb28a19
-
Update README.md
c72f789
-
Merge branch 'main' of https://huggingface.co/IMSyPP/hate_speech_en into main
88e8da9 -
adding tokenizer
1e63fa6
-
Update README.md
f185e30 -
Update README.md
773010f -
Update README.md
49256cd -
Create README.md
5f1e0ee -
Create README.md
# English Hate Speech Classifier This is a monolingual hate speech classifier for social media content in English language. The model was trained on a dataset of 103,190 YouTube comments and tested on a separately gathered test set of 20,554 YouTube comments. It is based on the BERT base pre-trained language model. ## Tokenizer During training, the original tokenizer for BERT base language model was used. As such, it is recommended to use the same tokenizer during inference. ## Model output The model classifies the input sentence into four distinct classes: appropriate, inappropriate, offensive and hateful. The classes are encoded as follows: * 0 - appropriate * 1 - inappropriate * 2 - offensive * 3 - hateful4e4c162 -
Add model weights and configuration
ea668d5 -
initial commit
b057cbf