Downloads · 30 days
0
dsuram/mistral-mental-health-lora
mistral-mental-health-lora is a text classification model from dsuram. 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.
This model is a LoRA fine-tuned version of mistralai/Mistral-7B-Instruct-v0.1 designed to classify mental health-related statements into one of seven categories:
Downloads · 30 days
0
Access
Public
Updated Jul 7, 2025
Repo size
45.6 MB
Likes
0
Public
Click a slice to open those files.
.csv31.5 MB · 66%
From the Hugging Face model README
This model is a LoRA fine-tuned version of mistralai/Mistral-7B-Instruct-v0.1 designed to classify mental health-related statements into one of seven categories:
The dataset consists of real-world mental health prompts and was structured as:
Few-shot prompting was used during tokenization.
Evaluation was performed on two test splits:
| Split Size | Accuracy (Before) | F1 Score (Before) | Accuracy (After) | F1 Score (After) |
|---|---|---|---|---|
| 200 | 0.77 | 0.75 | 0.91 | 0.90 |
| 500 | 0.74 | 0.72 | 0.89 | 0.88 |
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("dsuram/mistral-mental-health-lora")
model = AutoModelForCausalLM.from_pretrained("dsuram/mistral-mental-health-lora")
prompt = """You are a mental health assistant. Classify the statements.
Input: I want to end my life.
Label:"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=5)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
peftbitsandbytesTrainerNote: This model is not a substitute for professional psychological or medical advice.