π Model Card: help2opensource/Qwen3-4B-Instruct-2507_mental_health
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 Details
- Model: LoRA-fine-tuned version of Qwen3-4B-Instruct-2507
- Task: Generate empathetic, human-like responses in mental health counseling scenarios
- Fine-tuning Method: LoRA (Low-Rank Adaptation) for efficient and memory-friendly fine-tuning
- Training Data: 10,000 real-world mental health conversation pairs from the
samhog/psychology-10kdataset - Base Model: Qwen3-4B-Instruct-2507
- Architecture: Causal Language Model (Causal LM)
- Training Duration: ~1 day (on 1 GPU, 1 epoch)
- Batch Size: 1 per device (with 8 gradient accumulation steps)
π Training Data
| 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.
π Use Cases
This model can be used for:
- AI therapy assistants (in research or educational settings)
- Crisis support bots (with clear disclaimers β not a substitute for professional care)
- Mental health education tools (e.g., student counseling, peer support apps)
- Empathetic chatbot development with human-like tone and emotional intelligence
β οΈ 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
π§ How to Use
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
π οΈ Technical Details
| 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.
π Ethical & Safety Guidelines
- No medical advice: This model does not provide diagnosis or treatment.
- No harm mitigation: It cannot offer crisis intervention or emergency help.
- No personal data: No user data was stored or processed during training.
- Bias mitigation: Training data was filtered for non-toxic, respectful, and supportive tone.
- Safety filters: Outputs are filtered for harmful, illegal, or inappropriate content.
π Safe for public use only when used with clear disclaimers.
π How to Access
- π Hugging Face Hub: https://huggingface.co/your-username/mental-health-ai
- π Model Files:
pytorch_model.bintokenizer_config.jsontokenizer.jsonconfig.jsonREADME.md(this file)
π Who Should Use This?
β
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
π Want to Extend This?
You can extend this model by:
- Adding RAG for real-time access to medical or psychological resources
- Fine-tuning on specific conditions (e.g., anxiety, depression)
- Adding cognitive behavioral therapy (CBT) prompts
- Integrating emotion detection via NLP
- Downloads last month
- 49
Model tree for help2opensource/Qwen3-4B-Instruct-2507_mental_health
Base model
Qwen/Qwen3-4B-Instruct-2507