Downloads · 30 days
118
10% of all-time downloads
Davephoenix/bert-bullying-detector
bert-bullying-detector is a text classification model from Davephoenix. Use it when you need a label for a piece of text. It is set up for transformers.
A BERT-based binary classifier that detects whether a given English text contains bullying content or not. It is fine-tuned for use in moderation tools, education platforms, and social media analysis.
Downloads · 30 days
118
10% of all-time downloads
All-time downloads
1.2K
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
A BERT-based binary classifier that detects whether a given English text contains bullying content or not. It is fine-tuned for use in moderation tools, education platforms, and social media analysis.
This model is based on bert-base-uncased and fine-tuned for binary text classification. The goal is to distinguish between bullying and non-bullying text, providing a tool to support online safety and moderation.
The model may exhibit limitations in:
Users (both direct and downstream) should:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
import torch.nn.functional as F
model_name = "Davephoenix/bert-bullying-detector"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
def classify_text(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
probs = F.softmax(outputs.logits, dim=1)
pred = torch.argmax(probs, dim=1).item()
return pred, probs[0][pred].item()
label_map = {0: "Not Bullying", 1: "Bullying"}
text = "You are so dumb and nobody likes you."
pred, confidence = classify_text(text)
print(f"Prediction: {label_map[pred]} (Confidence: {confidence:.2f})")
bert-base-uncased tokenizercheckpoint-34371The model performs well for binary classification of bullying vs. non-bullying on general English text. Performance may degrade on ambiguous or culturally nuanced examples.
[More Information Needed]
Carbon emissions estimated via ML CO2 calculator:
transformers 4.39.3datasets 2.19.1BibTeX:
@misc{bert-bullying-detector,
title={BERT Bullying Detector},
author={Davephoenix},
year={2025},
note={Fine-tuned BERT for binary text classification (bullying detection)},
howpublished={\url{https://huggingface.co/Davephoenix/bert-bullying-detector}}
}
APA:
Davephoenix. (2025). BERT Bullying Detector [Computer software]. Hugging Face. https://huggingface.co/Davephoenix/bert-bullying-detector
To request the training notebook or API wrapper, please contact the model author.
Let me know if you'd like this pushed directly to the Hub or edited from the UI.