Downloads · 30 days
29
4% of all-time downloads
help2opensource/Qwen3-4B-Instruct-2507_mental_health
Qwen3-4B-Instruct-2507_mental_health is a text generation model from help2opensource. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A fine-tuned LLM trained to support empathetic, safe, and context-aware mental health conversations using LoRA (Low-Rank Adaptation) on a dataset of 10,000 psychology-based dialogues. - - Model: LoRA-fine-tuned versio…
Downloads · 30 days
29
4% of all-time downloads
All-time downloads
652
Public
Repo size
35.1 MB
Likes
0
Public
Click a slice to open those files.
.safetensors23.6 MB · 60%
From the Hugging Face model README
A fine-tuned LLM trained to support empathetic, safe, and context-aware mental health conversations using LoRA (Low-Rank Adaptation) on a dataset of 10,000 psychology-based dialogues.
samhog/psychology-10k dataset| Source | Description |
|---|---|
samhog/psychology-10k | 10,000 instruction-response pairs from real-life mental health counseling scenarios |
| Format | instruction, input, output (with user and therapist roles) |
| Focus | Emotional support, active listening, boundary setting, crisis awareness |
✅ All data was anonymized and ethically curated.
❌ No sensitive personal data (e.g., names, medical histories) was used.
This model can be used for:
⚠️ Important Limitations:
- Not a substitute for professional mental health care
- Cannot diagnose, treat, or recommend medical interventions
- Should only be used in non-critical, supportive environments
- May not handle complex or severe cases
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load the model and tokenizer
model = AutoModelForCausalLM.from_pretrained("help2opensource/Qwen3-4B-Instruct-2507_mental_health")
tokenizer = AutoTokenizer.from_pretrained("help2opensource/Qwen3-4B-Instruct-2507_mental_health")
# Example prompt
prompt = "I'm feeling really anxious lately. What should I do?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
inputs.input_ids,
max_length=256,
temperature=0.7,
top_p=0.9,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
📌 Works with transformers, vLLM, Ollama, and Hugging Face Inference API
| Feature | Value |
|---|---|
| LoRA Rank | 8 |
| LoRA Alpha | 32 |
| Target Modules | q_proj, v_proj, k_proj, o_proj |
| Dropout | 0.1 |
| Learning Rate | 2e-5 |
| Batch Size (effective) | 1 (with 8 gradient accumulation steps) |
| Max Sequence Length | 256 tokens |
| Training Epochs | 1 |
| Optimization | AdamW with weight decay (0.01) |
| Mixed Precision | ✅ (FP16) |
✅ LoRA enables fast, low-resource fine-tuning with minimal compute overhead.
🔒 Safe for public use only when used with clear disclaimers.
pytorch_model.bintokenizer_config.jsontokenizer.jsonconfig.jsonREADME.md (this file)✅ Students & researchers studying AI in mental health
✅ App developers building supportive chatbots
✅ Educators designing mental wellness tools
✅ Ethical AI practitioners concerned with safety and bias
You can extend this model by: