Kaneki24/llama3-1b-mental-health-chatbot
05
๐ง LLaMA3-1B Mental Health Chatbot
This model is a fine-tuned version of meta-llama/Llama-3.2-1B-Instruct using PEFT (Parameter-Efficient Fine-Tuning) for the specific task of providing empathetic and context-aware responses in the domain of mental health support.
๐ Model Details
๐ง Fine-Tuning
- Base model:
Llama-3.2-1B-Instructby Meta - Fine-tuning method: LoRA (Low-Rank Adaptation) via PEFT
- Dataset used:
counselchat_llama_dataset.jsonl(Kaggle),Reddit_conv - Trained for: Providing guidance, emotional support, and safe responses in mental health scenarios.
๐ก Intended Use
This model is designed to:
- Assist users with emotional wellness questions
- Respond with empathy and psychological safety
- Provide general mental health tips and guidance
โ ๏ธ Disclaimer: This model is not a substitute for professional medical or psychological help.
๐ป How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(base_model, "Kaneki24/llama3-1b-mental-health-chatbot")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B-Instruct")
prompt = "I'm feeling very anxious lately. Can you help?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
