Downloads · 30 days
13
0% of all-time downloads
tanusrich/Mental_Health_Chatbot
Mental_Health_Chatbot is a text generation model from tanusrich. Use it when you need the model to write or continue text. It is set up for transformers.
Model Name: tanusrich/MentalHealthChatbot Model Type: LLaMA-based model fine-tuned for Mental Health Therapy assistance
Downloads · 30 days
13
0% of all-time downloads
All-time downloads
12.8K
Public
Parameters
6.7B
13.5 GB on disk
Likes
19
Public
Click a slice to open those files.
.safetensors13.5 GB · 100%
From the Hugging Face model README
Model Name: tanusrich/Mental_Health_Chatbot
Model Type: LLaMA-based model fine-tuned for Mental Health Therapy assistance
The Mental Health Therapy Chatbot is a conversational AI model designed to provide empathetic, non-judgmental support to individuals seeking mental health guidance. This model has been fine-tuned using a carefully curated dataset to offer responses that are considerate, supportive, and structured to simulate therapy-like conversations.
It is ideal for use in mental health support applications where users can receive thoughtful and compassionate replies, especially on topics related to anxiety, loneliness, and general emotional well-being.
This model is based on LLaMA-2-7b architecture. It is a causal language model (CausalLM), which generates responses based on the input prompt by predicting the next word in the sequence.
To use this model for generating mental health support responses, you can load it with the Hugging Face transformers library.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load the model and tokenizer
model_name = "tanusrich/Mental_Health_Chatbot"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Move the model to the appropriate device (CPU or GPU)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
# Generate a response
def generate_response(user_input):
inputs = tokenizer(user_input, return_tensors="pt").to(device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.7,
top_k=50,
top_p=0.9,
repetition_penalty=1.2,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(output[0], skip_special_tokens=True)
return response
# Example interaction
user_input = "I'm feeling lonely and anxious. What can I do?"
response = generate_response(user_input)
print("Chatbot: ", response)
This model was fine-tuned using the QLoRA (Quantized LoRA) method, leveraging LoRA (Low-Rank Adaptation) layers to allow efficient fine-tuning on resource-constrained hardware.
lora_r): 64lora_alpha): 16This model is designed to assist in non-clinical settings where users might seek empathetic conversation and mental health support. It is not intended to replace professional mental health services or clinical diagnosis.
Mental health is a sensitive area, and while this model attempts to provide thoughtful and supportive responses, it is essential to ensure that users understand it is not a replacement for professional help. Users should be encouraged to seek assistance from licensed professionals for serious mental health issues.
If you use this model, please cite the LLaMA-2 model and the fine-tuning process as follows:
@article{LLaMA2,
title={LLaMA 2: Open Foundation and Fine-Tuned Chat Models},
author={Meta AI},
year={2023}
}
@misc{tanusrich2024MentalHealthChatbot,
author = {Tanusri},
title = {Mental Health Therapy Chatbot},
year = {2024},
url = {https://huggingface.co/tanusrich/Mental_Health_Chatbot}
}