Instructions to use thillaic/CBT-Copilot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thillaic/CBT-Copilot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thillaic/CBT-Copilot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thillaic/CBT-Copilot") model = AutoModelForCausalLM.from_pretrained("thillaic/CBT-Copilot", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use thillaic/CBT-Copilot with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thillaic/CBT-Copilot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thillaic/CBT-Copilot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thillaic/CBT-Copilot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thillaic/CBT-Copilot
- SGLang
How to use thillaic/CBT-Copilot 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 "thillaic/CBT-Copilot" \ --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": "thillaic/CBT-Copilot", "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 "thillaic/CBT-Copilot" \ --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": "thillaic/CBT-Copilot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thillaic/CBT-Copilot with Docker Model Runner:
docker model run hf.co/thillaic/CBT-Copilot
🧠 CBT-Copilot
CBT-Copilot is a fine-tuned version of meta-llama/Llama-3.2-3B-Instruct, designed to simulate compassionate and supportive dialogues in the style of Cognitive Behavioral Therapy (CBT).
Fine-tuned using LoRA on the Lumiiree/therapod-dpo dataset and merged into a standalone model, it supports deployment through transformers, vLLM, and other inference frameworks.
🚀 How to Use (with vLLM)
Serve this model using vLLM:
pip install vllm[serve]
python3 -m vllm.entrypoints.openai.api_server --model thillaic/CBT-Copilot
Then query it via the OpenAI-compatible API:
import openai
openai.api_key = "EMPTY"
openai.api_base = "http://localhost:8000/v1"
response = openai.ChatCompletion.create(
model="CBT-Copilot",
messages=[
{"role": "system", "content": "You are a compassionate CBT therapist."},
{"role": "user", "content": "I've been feeling really anxious lately. What can I do?"}
]
)
print(response["choices"][0]["message"]["content"])
🧠 Intended Use
This model is intended for:
- Mental health chatbot research
- Journaling and self-reflection tools
- Prototyping conversational CBT agents
⚠️ Disclaimer: This model is not a replacement for licensed mental health professionals. It should only be used for educational, research, or prototyping purposes.
📜 License
Licensed under the MIT License.
🙏 Acknowledgements
- Based on Meta’s LLaMA 3.2B Instruct model
- Trained on Lumiiree/therapod-dpo
- Fine-tuning performed with Hugging Face
transformers,PEFT, andLoRA
🛠️ Model developed by Thillai Chithambaram
- Downloads last month
- 10
Task type is invalid.