Downloads · 30 days
6
24% of all-time downloads
Suyash010/muril-cyberbullying-detection
muril-cyberbullying-detection is a text classification model from Suyash010. Use it when you need a label for a piece of text. The card lists the license as mit.
This model is a fine-tuned version of Google's MuRIL (Multilingual Representations for Indian Languages) BERT architecture, specifically adapted for multi-class Cyberbullying & Hate Speech Detection.
Downloads · 30 days
6
24% of all-time downloads
All-time downloads
25
Public
Parameters
238M
950 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors950 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of Google's MuRIL (Multilingual Representations for Indian Languages) BERT architecture, specifically adapted for multi-class Cyberbullying & Hate Speech Detection.
It categorizes social media text and online commentary across 6 categories:
age: Cyberbullying targeting an individual's age.ethnicity: Bullying or hate speech targeting ethnicity, race, or caste.gender: Misogyny, sexism, or gender-based harassment.religion: Hate speech or insults targeting religious beliefs.other_cyberbullying: General toxic harassment, insults, or threats.not_cyberbullying: Benign, safe, neutral, or positive text.Evaluated on the held-out multi-class test benchmark:
| Metric | Score |
|---|---|
| Overall Accuracy | 81.97% |
| Macro Precision | 83.21% |
| Macro Recall | 83.41% |
| Macro F1-Score | 83.29% |
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo_id = "suyashsahu00/muril-cyberbullying-detection"
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)
text = "Your message or tweet goes here"
# Tokenize input
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
# Run prediction
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)[0]
predicted_idx = torch.argmax(probs).item()
predicted_label = model.config.id2label[predicted_idx]
confidence = probs[predicted_idx].item()
print(f"Prediction: {predicted_label} ({confidence * 100:.2f}%)")
google/muril-base-casedid2label mappingsmodel.safetensors)