Text Generation
Transformers
Safetensors
English
chatbot
caregiver-support
autism-support
conversational
mental-health
support-chatbot
Instructions to use Tizzu668/rafiki-chatbot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tizzu668/rafiki-chatbot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tizzu668/rafiki-chatbot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Tizzu668/rafiki-chatbot", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Tizzu668/rafiki-chatbot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tizzu668/rafiki-chatbot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tizzu668/rafiki-chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tizzu668/rafiki-chatbot
- SGLang
How to use Tizzu668/rafiki-chatbot 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 "Tizzu668/rafiki-chatbot" \ --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": "Tizzu668/rafiki-chatbot", "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 "Tizzu668/rafiki-chatbot" \ --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": "Tizzu668/rafiki-chatbot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tizzu668/rafiki-chatbot with Docker Model Runner:
docker model run hf.co/Tizzu668/rafiki-chatbot
Rafiki Chatbot π€
π Overview
Rafiki Chatbot is a fine-tuned language model specifically designed to provide emotional support, practical advice, and compassionate responses to caregivers of autistic children. The name "Rafiki" means "friend" in Swahili, reflecting the chatbot's supportive and friendly nature.
π― Purpose
This model helps caregivers who are:
- Feeling overwhelmed or exhausted
- Seeking strategies for managing challenging behaviors
- Looking for emotional support and validation
- Needing practical advice for daily caregiving challenges
- Seeking understanding and community
ποΈ Model Details
- Base Model: microsoft/phi-3-mini-4k-instruct
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- Training Data: Custom caregiver support conversations
- Language: English
- Context Length: 4,000 tokens
π Training Data
The model was fine-tuned on a carefully curated dataset including:
- Caregiver support conversations
- Autism parenting strategies
- Emotional support dialogues
- Crisis management scenarios
- Daily routine optimization tips
π Usage
Using the Inference API
from transformers import pipeline
# Initialize the chatbot
chatbot = pipeline(
"text-generation",
model="Tizzu668/rafiki-chatbot",
device_map="auto"
)
# Example conversation
prompt = "### Question:\nI'm feeling overwhelmed with my autistic child's constant needs\n### Answer:\n"
response = chatbot(
prompt,
max_new_tokens=128,
temperature=0.7,
do_sample=True
)
print(response[0]['generated_text'])
