Downloads · 30 days
6
13% of all-time downloads
mr-kush/sambodhan-multitask-xlmroberta
sambodhan-multitask-xlmroberta is a text classification model from mr-kush. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned XLM-RoBERTa for multi-task classification of citizen grievances in Nepali:
Downloads · 30 days
6
13% of all-time downloads
All-time downloads
48
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
Fine-tuned XLM-RoBERTa for multi-task classification of citizen grievances in Nepali:
This model is designed for grievance routing and prioritization, part of the Sambodhan AI grievance redressal system.
| Task | Weighted F1 |
|---|---|
| Department Classification | 0.853 |
| Urgency Classification | 0.684 |
| Overall | 0.768 |
from transformers import AutoTokenizer
from src.modeling_multitask import MultiTaskForSequenceClassification, MultiTaskConfig
import torch
# Hugging Face repo ID
repo = "mr-kush/sambodhan-multitask-xlmroberta"
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(repo)
config = MultiTaskConfig.from_pretrained(repo)
model = MultiTaskForSequenceClassification.from_pretrained(repo, config=config)
model.eval()
# Example input
text = "Water supply cut off in my area for 3 days"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
# Inference
with torch.no_grad():
out = model(**inputs)
# Extract predictions
dept_logits, urg_logits = out["logits"]
dept_pred = torch.argmax(dept_logits, dim=-1).item()
urg_pred = torch.argmax(urg_logits, dim=-1).item()
print("Department:", dept_pred, "Urgency:", urg_pred)