Instructions to use ali1001/mental-health-tinyllama-bot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ali1001/mental-health-tinyllama-bot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ali1001/mental-health-tinyllama-bot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ali1001/mental-health-tinyllama-bot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ali1001/mental-health-tinyllama-bot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ali1001/mental-health-tinyllama-bot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ali1001/mental-health-tinyllama-bot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ali1001/mental-health-tinyllama-bot
- SGLang
How to use ali1001/mental-health-tinyllama-bot with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ali1001/mental-health-tinyllama-bot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ali1001/mental-health-tinyllama-bot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ali1001/mental-health-tinyllama-bot" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ali1001/mental-health-tinyllama-bot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ali1001/mental-health-tinyllama-bot with Docker Model Runner:
docker model run hf.co/ali1001/mental-health-tinyllama-bot
Model Card: Mental Health Counselor Chatbot (TinyLlama-1.1B)
This model is a lightweight mental health chatbot built on TinyLlama-1.1B-Chat, fine-tuned using QLoRA on the Amod/mental_health_counseling_conversations dataset.
⚠️ Note: This model was fine-tuned on Google Colab (free T4 GPU) for only 1 epoch, intended as a test to evaluate the ability of
TinyLlamato respond to counseling prompts.
🧠 Performance can significantly improve with longer training, more data, and better hyperparameter tuning.
Model Details
Model Description
- Model Type: Causal Language Model (Instruction-Tuned)
- Base Model: TinyLlama/TinyLlama-1.1B-Chat
- Fine-tuned by: Ali Haider
- Dataset: Amod/mental_health_counseling_conversations
- Language: English
- License: Apache 2.0
⚠️ This is a prototype model. It was fine-tuned using only 1 epoch on a small sample dataset for demonstration and testing purposes.
Uses
Direct Use
For generating supportive and empathetic responses to mental health-related user inputs. Useful for:
- Mental health Q&A bots
- Conversational agents in wellness apps
Out-of-Scope Use
- Not a substitute for licensed therapy.
- Should not be used for clinical decisions or crisis support.
Bias, Risks & Limitations
- The model may produce biased or generic responses.
- Only trained on one small dataset, so coverage is limited.
- May hallucinate or offer vague advice if prompted outside of its domain.
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ali1001/mental-health-tinyllama-bot")
tokenizer = AutoTokenizer.from_pretrained("ali1001/mental-health-tinyllama-bot")
prompt = "I'm feeling very anxious lately and can't sleep. What should I do?"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=150)
print(tokenizer.decode(output[0], skip_special_tokens=True))