Downloads · 30 days
21
13% of all-time downloads
naazimsnh02/gemma3-4b-mental-health-counseling
gemma3-4b-mental-health-counseling is a text generation model from naazimsnh02. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
This is a fully merged model (base model + LoRA adapters) fine-tuned on the Mental Health Counseling Conversations dataset.
Downloads · 30 days
21
13% of all-time downloads
All-time downloads
167
Public
Parameters
4.3B
8.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.6 GB · 100%
From the Hugging Face model README
This is a fully merged model (base model + LoRA adapters) fine-tuned on the Mental Health Counseling Conversations dataset.
This model has been fine-tuned to provide empathetic and helpful responses to mental health-related queries. It's designed to offer supportive guidance while maintaining professional boundaries appropriate for AI-assisted mental health support.
The model was trained on the Mental Health Counseling Conversations dataset, which contains:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load the merged model - no base model needed!
model = AutoModelForCausalLM.from_pretrained(
"naazimsnh02/gemma3-4b-mental-health-counseling",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("naazimsnh02/gemma3-4b-mental-health-counseling")
from unsloth import FastModel
# Load the fine-tuned model
model, tokenizer = FastModel.from_pretrained(
model_name="naazimsnh02/gemma3-4b-mental-health-counseling",
max_seq_length=2048,
load_in_4bit=True, # Optional: for memory efficiency
)
from transformers import TextStreamer
messages = [{
"role": "user",
"content": [{"type": "text", "text": "I've been feeling anxious lately. What can I do?"}]
}]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_tensors="pt",
return_dict=True,
).to("cuda")
# Generate response
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
top_p=0.9,
top_k=50,
streamer=TextStreamer(tokenizer, skip_prompt=True),
)
The model was trained with the following objectives:
Note: Quantitative evaluation metrics for mental health counseling quality are complex and context-dependent. This model should be evaluated in controlled settings with professional oversight.
| Step | Training Loss | Validation Loss |
|---|---|---|
| 50 | 2.3783 | 2.3888 |
| 100 | 2.2907 | 2.3133 |
| 150 | 2.3140 | 2.2496 |
| 200 | 2.1281 | 2.2001 |
| 250 | 1.9283 | 2.1413 |
| 300 | 1.8913 | 2.0965 |
| 350 | 1.9248 | 2.0474 |
| 400 | 1.6663 | 2.0232 |
| 450 | 1.5335 | 2.0252 |
| 500 | 1.4193 | 2.0109 |
| 550 | 1.4861 | 1.9974 |
@misc{gemma3, title = {Gemma 3: Open Models Based on Gemini Technology}, author = {Google DeepMind}, year = {2025}, url = {https://huggingface.co/google/gemma-3-4b-it} }
## Acknowledgments
- **Base Model:** [Gemma 3 (4B)](https://huggingface.co/google/gemma-3-4b-it) by Google DeepMind
- **Training Framework:** [Unsloth](https://github.com/unslothai/unsloth) for efficient fine-tuning
- **Dataset:** [Mental Health Counseling Conversations](https://huggingface.co/datasets/Amod/mental_health_counseling_conversations)
- **Infrastructure:** [Modal](https://modal.com) for GPU compute
## License
This model inherits the [Gemma License](https://ai.google.dev/gemma/terms) from the base model. Please review the license terms before use.
## Contact
For questions or feedback about this model, please open an issue on the model repository or contact the author.
---
**Disclaimer:** This model is provided "as is" without warranty of any kind. The authors and contributors are not responsible for any consequences of using this model. Always seek professional help for mental health concerns.