File size: 2,313 Bytes
43d3175
923b532
9dee15d
923b532
43d3175
a9f5b3c
 
 
 
 
 
 
 
 
923b532
 
 
 
 
 
a9f5b3c
 
 
 
43d3175
c273a1f
9dee15d
46b7b92
9dee15d
46b7b92
9dee15d
6ffb50b
9dee15d
 
 
46b7b92
9dee15d
c273a1f
 
9dee15d
 
 
c273a1f
 
9dee15d
c273a1f
 
 
 
923b532
c273a1f
 
 
923b532
c273a1f
9dee15d
923b532
c273a1f
 
 
923b532
c273a1f
 
9dee15d
 
923b532
c273a1f
9dee15d
6ffb50b
9dee15d
 
 
6ffb50b
9dee15d
6ffb50b
9dee15d
 
 
 
 
46b7b92
 
 
9dee15d
 
 
 
 
46b7b92
 
6ffb50b
a9f5b3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
language: en
license: mit
library_name: transformers
tags:
- llama
- llama-3
- causal-lm
- vllm
- conversational
- cognitive-therapy
- mental-health
- lora
- peft
inference:
  parameters:
    max_new_tokens: 256
    temperature: 0.7
    top_p: 0.9
    repetition_penalty: 1.1
datasets:
- Lumiiree/therapod-dpo
base_model:
- meta-llama/Llama-3.2-3B-Instruct
---

# 🧠 CBT-Copilot

**CBT-Copilot** is a fine-tuned version of [`meta-llama/Llama-3.2-3B-Instruct`](https://huggingface.co/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`](https://huggingface.co/datasets/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](https://github.com/vllm-project/vllm):

```bash
pip install vllm[serve]

python3 -m vllm.entrypoints.openai.api_server --model thillaic/CBT-Copilot
```

Then query it via the OpenAI-compatible API:

```python
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](https://huggingface.co/datasets/Lumiiree/therapod-dpo)
- Fine-tuning performed with Hugging Face `transformers`, `PEFT`, and `LoRA`

---

**🛠️ Model developed by [Thillai Chithambaram](https://huggingface.co/thillaic)**