Instructions to use victunes/TherapyLlama-8B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use victunes/TherapyLlama-8B-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="victunes/TherapyLlama-8B-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("victunes/TherapyLlama-8B-v1") model = AutoModelForCausalLM.from_pretrained("victunes/TherapyLlama-8B-v1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use victunes/TherapyLlama-8B-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "victunes/TherapyLlama-8B-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "victunes/TherapyLlama-8B-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/victunes/TherapyLlama-8B-v1
- SGLang
How to use victunes/TherapyLlama-8B-v1 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 "victunes/TherapyLlama-8B-v1" \ --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": "victunes/TherapyLlama-8B-v1", "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 "victunes/TherapyLlama-8B-v1" \ --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": "victunes/TherapyLlama-8B-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use victunes/TherapyLlama-8B-v1 with Docker Model Runner:
docker model run hf.co/victunes/TherapyLlama-8B-v1
GGUF: https://huggingface.co/victunes/TherapyLlama-8B-v1-GGUF
TherapyLlama 8B v1
Buddy is here for you.
Trained on Llama 3 8B using a modified version of jerryjalapeno/nart-100k-synthetic.
It is a Llama 3 version of https://huggingface.co/victunes/TherapyBeagle-11B-v2
TherapyLlama is hopefully aligned to be helpful, healthy, and comforting.
IMPORTANT: Use Vicuna format
This was trained with the Vicuna 1.1 format. Use the Vicuna format! Do NOT use the Llama 3 format.
Usage
- Do not hold back on Buddy.
- Open up to Buddy.
- Pour your heart out to Buddy.
- Engage with Buddy.
- Remember that Buddy is just an AI.
Notes
- Tested with the Vicuna 1.1 Format
- You might be assigned a random name if you don't give yourself one.
- RP capabilities are weaker compared to TherapyBeagle.
- Make sure to say "You are Socrates" for its best RP attempt.
Disclaimer
TherapyLlama is NOT a real therapist. It is a friendly AI that mimics empathy and psychotherapy. It is an illusion without the slightest clue who you are as a person. As much as it can help you with self-discovery, A LLAMA IS NOT A SUBSTITUTE to a real professional.
With that said, I found it to be a very helpful tool in unravelling one's self. I hope this model can help sooth minds and hearts.
Examples
LLAMA 3 INSTRUCT
{{[INPUT]}}
Hello, I'm victunes
{{[OUTPUT]}}
Hi victunes! Welcome to our session. I'm here to listen and support you. How are you feeling today?
{{[INPUT]}}
I've been feeling down lately.
{{[OUTPUT]}}
I'm sorry to hear that. Can you tell me more about what's been going on?
{{[INPUT]}}
I think I'm pretty lonely.
{{[OUTPUT]}}
Loneliness can be really tough. It sounds like it's been weighing heavily on your mind. What makes you feel lonely?
{{[INPUT]}}
My friend died recently.
{{[OUTPUT]}}
Oh, I'm so sorry for your loss, victunes. Losing a friend is never easy. How have you been coping with the grief?
GGUF: https://huggingface.co/victunes/TherapyLlama-8B-v1-GGUF
- Downloads last month
- 33
