Instructions to use nerd-swayam/LLama-Mental-Health-Assistence with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use nerd-swayam/LLama-Mental-Health-Assistence with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "nerd-swayam/LLama-Mental-Health-Assistence") - Transformers
How to use nerd-swayam/LLama-Mental-Health-Assistence with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="nerd-swayam/LLama-Mental-Health-Assistence")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nerd-swayam/LLama-Mental-Health-Assistence", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use nerd-swayam/LLama-Mental-Health-Assistence with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nerd-swayam/LLama-Mental-Health-Assistence to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for nerd-swayam/LLama-Mental-Health-Assistence to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for nerd-swayam/LLama-Mental-Health-Assistence to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="nerd-swayam/LLama-Mental-Health-Assistence", max_seq_length=2048, )
Model Card for Model ID
This model is a fine-tuned version of a large language model, specifically adapted for providing empathetic, non-judgmental conversational support for mental well-being.
Model Details
Model Description
- Model ID : [nerd-swayam/LLama-Mental-Health-Assistence]
- Base Model : meta-llama/Llama-3.1-8B-Instruct
- Model Type : Fine-tuned Large Language Model (LLM)
- Fine-Tuning Method : Quantized Low-Rank Adaptation (QLoRA)
- Developed By,[Swayam Kesarkar]
- Language : English
Primary Use Case: "Providing personalized, context-aware, and empathetic conversational support for individuals seeking help with common mental health issues like anxiety, stress, depression (non-crisis), and relationship problems."
Target Audience,Individuals seeking accessible emotional and behavioral support or self-help resources.
- Developed by: [nerd-swayam]
- Model type: [Chat bot conversational]
- Language(s) (NLP): [Emglish]
- License: [Apache2.0]
- Finetuned from model [optional]: [meta-llama/Llama-3.1-8B-Instruct]
How to Get Started with the Model
Use the code below to get started with the model.
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "nerd-swayam/LLama-Mental-Health-Assistence",
max_seq_length = 1024,
dtype = dtype,
)
FastLanguageModel.for_inference(model)
inputs = tokenizer(
[
alpaca_prompt.format(
"Everyone has friends except me. I feel so isolated.",
"",
)
], return_tensors = "pt").to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 128)
Training Details
Training Data
[https://huggingface.co/datasets/nerd-swayam/Mental_Health_Support_ChatBOT_Conversation]
Training Hyperparameters
- Training regime: [fp16 mixed precision]
Model Card Contact
- Gmail : [swayamkesarkar625@gmail.com]
- LinkedIn : [https://www.linkedin.com/in/swayam-kesarkar-b05261272/]
- GitHub : [https://github.com/LightYagami625]
Framework versions
- PEFT 0.18.0
- Downloads last month
- -