Downloads · 30 days
98
51% of all-time downloads
MhoOmm/SAGE_MENTAL_HEALTH_CLASSIFIER
SAGE_MENTAL_HEALTH_CLASSIFIER is a text classification model from MhoOmm. Use it when you need a label for a piece of text. The card lists the license as mit.
A transformer-based mental health text classification model fine-tuned on DeBERTa-v3-base for the KIIT Sage AI Mental Wellness Assistant.
Downloads · 30 days
98
51% of all-time downloads
All-time downloads
191
Public
Parameters
184M
738 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors738 MB · 99%
From the Hugging Face model README
A transformer-based mental health text classification model fine-tuned on DeBERTa-v3-base for the KIIT Sage AI Mental Wellness Assistant.
⚠️ Disclaimer: This model is not intended for medical diagnosis. It is designed to provide emotional context for conversational AI systems and should not replace professional mental health assessment.
Sage DeBERTa v1 classifies English text into one of five emotional categories:
The model serves as the emotion classification component of the KIIT Sage chatbot, enabling more empathetic and context-aware conversations.
| Property | Value |
|---|---|
| Base Model | microsoft/deberta-v3-base |
| Task | Text Classification |
| Language | English |
| Framework | Hugging Face Transformers |
| Max Sequence Length | 256 |
| Labels | 5 |
| Developer | Omm Tripathi |
| ID | Label |
|---|---|
| 0 | Anxiety |
| 1 | Normal |
| 2 | Depression |
| 3 | Suicidal |
| 4 | Stress |
The model was fine-tuned on the Mental Health Condition Classification dataset.
To make the model suitable for conversational mental health support, the following diagnostic categories were removed:
After filtering, the model was trained on the following five categories:
The following preprocessing steps were applied:
| Parameter | Value |
|---|---|
| Optimizer | AdamW |
| Learning Rate | 2e-5 |
| Batch Size | 16 |
| Epochs | 8 |
| Weight Decay | 0.01 |
| Max Length | 256 |
| Evaluation Strategy | Every Epoch |
| Early Stopping | Patience = 2 |
| Best Model Metric | Macro F1 |
Validation Performance
| Metric | Score |
|---|---|
| Accuracy | 83.40% |
| Precision (Macro) | 82.06% |
| Recall (Macro) | 82.48% |
| F1 Score (Macro) | 82.23% |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
model = AutoModelForSequenceClassification.from_pretrained(MODEL_PATH)
id2label = {
0: "Anxiety",
1: "Normal",
2: "Depression",
3: "Suicidal",
4: "Stress"
}
text = "I've been feeling overwhelmed lately and can't stop worrying."
inputs = tokenizer(
text,
return_tensors="pt",
truncation=True,
max_length=256
)
with torch.no_grad():
outputs = model(**inputs)
prediction = outputs.logits.argmax(dim=-1).item()
print(id2label[prediction])
Input:
I have been feeling anxious for weeks and can't stop overthinking everything.
Output:
Anxiety
This model is intended for:
This model should not be used for:
This model predicts emotional categories—not mental health diagnoses.
The Suicidal class is intended to help conversational systems recognize potentially high-risk messages and encourage appropriate support. Predictions should always be interpreted with human oversight.
Users expressing severe emotional distress should be encouraged to seek help from trusted individuals or qualified mental health professionals.
This model is released for research and educational purposes.
Please ensure that any deployment involving mental health support includes appropriate human oversight and safety mechanisms.