πŸ“š 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-10k dataset
  • 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


πŸ“Œ 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
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for help2opensource/Qwen3-4B-Instruct-2507_mental_health

Adapter
(68)
this model

Dataset used to train help2opensource/Qwen3-4B-Instruct-2507_mental_health