Downloads · 30 days
10
6% of all-time downloads
biraj-bhusal/rakshak-severity-v2
rakshak-severity-v2 is a text classification model from biraj-bhusal. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Severity classifier for Nepali social media content, fine-tuned from XLM-RoBERTa Large using LoRA/PEFT. Part of the RakshakAI content moderation system.
Downloads · 30 days
10
6% of all-time downloads
All-time downloads
162
Public
Parameters
560M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
From the Hugging Face model README
Severity classifier for Nepali social media content, fine-tuned from XLM-RoBERTa Large using LoRA/PEFT. Part of the RakshakAI content moderation system.
📄 Paper: RakshakAI: Multi-Label Toxicity Detection for Low-Resource Nepali Social Media Content
Given a piece of Nepali text along with detected toxicity labels from rakshak-xlmr-large-v2, this model predicts one of three severity classes:
| Class | Original Score | Meaning |
|---|---|---|
normal | 1–2 | Clean or mildly offensive |
moderate | 3 | Clearly harmful |
severe | 4–5 | Incites action or extreme violence |
Rather than predicting severity from text alone, the input is enriched by appending detected toxicity labels from the multi-label classifier to the original text — for example: yo jaat ko manchhe haru lai nepal bata nikala [DETECTED: hate_speech, casteism]
This allows the model to leverage category information when estimating severity, making predictions more accurate and context-aware.
| Class | Precision | Recall | F1 |
|---|---|---|---|
| Normal (1–2) | 0.94 | 0.87 | 0.90 |
| Moderate (3) | 0.25 | 0.27 | 0.26 |
| Severe (4–5) | 0.86 | 0.91 | 0.88 |
The model performs strongly on normal and severe classes but struggles with moderate severity due to class imbalance — only 9.3% of training samples carry a moderate label. This is a known limitation we plan to address with more data collection.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "biraj-bhusal/rakshak-severity-v2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
id2label = {0: "normal", 1: "moderate", 2: "severe"}
# Append detected labels from rakshak-xlmr-large-v2 to the text
text = "your nepali text here [DETECTED: hate_speech, casteism]"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
logits = model(**inputs).logits
prediction = torch.argmax(logits, dim=-1).item()
print(id2label[prediction])
@misc{bhusal2025rakshak,
author = {Bhusal, Biraj},
title = {RakshakAI: Multi-Label Toxicity Detection for Low-Resource Nepali Social Media Content},
year = {2025},
publisher = {Zenodo},
url = {https://zenodo.org/records/20850923}
}
This model is trained on toxic social media content. The author does not endorse any views expressed in the training data.
Developed by: Biraj Bhusal