File size: 3,752 Bytes
5f821e2
 
 
29a3aad
5f821e2
29a3aad
 
 
 
 
 
 
 
 
 
5f821e2
29a3aad
5f821e2
 
29a3aad
 
 
 
5f821e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29a3aad
 
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
license: apache-2.0
language:
- en
tags:
- conversational
- mental-health
- therapy
- genz
- dia
- unsloth
- fine-tuned
- qwen
- chatbot
- hf-inference
datasets:
- anupamaditya/dia-therapy-dataset
pipeline_tag: text-generation
model-index:
- name: dia-convo-v1.2c
  results: []
base_model:
- Qwen/Qwen2.5-7B-Instruct
---

# 🧠 Dia-Convo-v1.2c

`petrioteer/dia-convo-v1.2c` is a conversational mental-health-focused LLM designed for Gen Z, built on top of **Qwen2.5-7B-Instruct** and fine-tuned using [dia-therapy-dataset](https://huggingface.co/datasets/anupamaditya/dia-therapy-dataset). This model powers **Dia-Therapist**, an empathetic AI that offers mental health support while being context-aware, brief, and emotionally intelligent.

---

## πŸ’¬ Intended Use

This model is tuned to offer:
- Thoughtful responses to mental health queries
- Conversational tone suited for Gen Z
- Non-medical, non-clinical guidance
- Short, contextually sensitive replies

**It does not replace professional therapy.**

---

## πŸ“š Training Dataset

- [anupamaditya/dia-therapy-dataset](https://huggingface.co/datasets/anupamaditya/dia-therapy-dataset)
- Contains conversational instructions paired with realistic mental-health-related inputs from Gen Z users.

---

## πŸ§ͺ Example Inference (πŸ€— Transformers)

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_name = "petrioteer/dia-convo-v1.2c"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    device_map="auto",
    torch_dtype=torch.float16
)

prompt = """
### Instruction:
Your name is Dia, a mental health therapist Assistant Bot. Provide guidance on mental health topics only and avoid others. Don\'t give medical advice. Keep responses short and relevant.

### Input:
I'm feeling overwhelmed with my classes. I can't seem to focus.

### Response:
"""

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=100,
    temperature=0.3,
    top_p=0.85,
    top_k=40,
    do_sample=True,
    eos_token_id=tokenizer.eos_token_id,
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

---

## ⚑ Fast Inference (🧬 Unsloth)

```python
from unsloth import FastLanguageModel
from transformers import AutoTokenizer

model_name = "petrioteer/dia-convo-v1.2c"

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name=model_name,
    max_seq_length=2048,
    load_in_4bit=True,
    device_map="auto",
)

FastLanguageModel.for_inference(model)

prompt = """
### Instruction:
Your name is Dia, a mental health therapist Assistant Bot. Provide guidance on mental health topics only and avoid others. Don\'t give medical advice. Keep responses short and relevant.

### Input:
I just feel numb and disconnected from everyone lately.

### Response:
"""

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=100,
    temperature=0.3,
    top_p=0.85,
    top_k=40,
    do_sample=True,
    repetition_penalty=1.2,
    no_repeat_ngram_size=4,
    eos_token_id=tokenizer.eos_token_id,
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

---

## πŸ“ Model Details

- πŸ”— Base model: Qwen2.5-7B-Instruct
- 🧠 Fine-tuned using dia-therapy-dataset on Gen Z mental health patterns
- πŸ› οΈ Quantized with 4-bit support (for faster loading)
- πŸ§ͺ Best used with Unsloth for optimized inference

---

## ❀️ Citation & Thanks

If you use Dia-Convo in research, demos, or builds, consider citing or linking back to this repo and dataset authors.

---

 
Built with ❀️ & care by **Itesh (aka petrioteer)** ✨