Instructions to use thantsan/mental_health_finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use thantsan/mental_health_finetuned with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/mistral-small-instruct-2409-bnb-4bit") model = PeftModel.from_pretrained(base_model, "thantsan/mental_health_finetuned") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use thantsan/mental_health_finetuned 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 thantsan/mental_health_finetuned 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 thantsan/mental_health_finetuned to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thantsan/mental_health_finetuned to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="thantsan/mental_health_finetuned", max_seq_length=2048, )
English Mental Health Chatbot - LoRA Adapter (Mistral-Small-Instruct-2409)
This repository contains a LoRA adapter fine-tuned on an English-language mental health dataset (sourced from Kaggle) using the Unsloth training library and Mistral-Small-Instruct-2409.
This adapter is designed to be used with the base model:
unsloth/Mistral-Small-Instruct-2409.
π§ How to Use
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load base model
base = AutoModelForCausalLM.from_pretrained(
"unsloth/Mistral-Small-Instruct-2409",
device_map="auto",
torch_dtype="auto"
)
# Load adapter
model = PeftModel.from_pretrained(base, "thantsan/mental_health_finetuned")
# Tokenizer
tokenizer = AutoTokenizer.from_pretrained("thantsan/mental_health_finetuned")
# Run inference
prompt = "How can I manage anxiety before an exam?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=150)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- -
Model tree for thantsan/mental_health_finetuned
Base model
mistralai/Mistral-Small-Instruct-2409 Finetuned
unsloth/Mistral-Small-Instruct-2409