CoolFace
Modelpublic

Kaneki24/llama3-1b-mental-health-chatbot

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes5downloads
Model Card

๐Ÿง  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-Instruct by 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

python
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))