File size: 6,114 Bytes
19ee05a
d37070d
 
19ee05a
 
9c8f1cc
19ee05a
 
d37070d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19ee05a
 
 
 
 
29b091b
19ee05a
 
 
 
 
 
 
 
29b091b
 
19ee05a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e44625
 
 
 
 
 
 
 
 
 
 
d37070d
 
 
 
 
 
 
 
 
 
 
 
 
 
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
---
language:
- en
license: mit
datasets:
- vibhorag101/phr_mental_therapy_dataset
- jerryjalapeno/nart-100k-synthetic
pipeline_tag: text-generation
model-index:
- name: llama-2-13b-chat-hf-phr_mental_therapy
  results:
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: AI2 Reasoning Challenge (25-Shot)
      type: ai2_arc
      config: ARC-Challenge
      split: test
      args:
        num_few_shot: 25
    metrics:
    - type: acc_norm
      value: 38.82
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=vibhorag101/llama-2-13b-chat-hf-phr_mental_therapy
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: HellaSwag (10-Shot)
      type: hellaswag
      split: validation
      args:
        num_few_shot: 10
    metrics:
    - type: acc_norm
      value: 72.76
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=vibhorag101/llama-2-13b-chat-hf-phr_mental_therapy
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MMLU (5-Shot)
      type: cais/mmlu
      config: all
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 23.12
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=vibhorag101/llama-2-13b-chat-hf-phr_mental_therapy
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: TruthfulQA (0-shot)
      type: truthful_qa
      config: multiple_choice
      split: validation
      args:
        num_few_shot: 0
    metrics:
    - type: mc2
      value: 46.92
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=vibhorag101/llama-2-13b-chat-hf-phr_mental_therapy
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: Winogrande (5-shot)
      type: winogrande
      config: winogrande_xl
      split: validation
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 65.59
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=vibhorag101/llama-2-13b-chat-hf-phr_mental_therapy
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: GSM8k (5-shot)
      type: gsm8k
      config: main
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 7.81
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=vibhorag101/llama-2-13b-chat-hf-phr_mental_therapy
      name: Open LLM Leaderboard
---
# Model Card

<!-- Provide a quick summary of what the model is/does. -->
- This model is a finetune of the **llama-2-13b-chat-hf** model on a therapy dataset.
- The model aims to provide basic therapy to the users and improve their mental health until they seek professional help.
- The model has been adjusted to encourage giving cheerful responses to the user. The system prompt has been mentioned below.

## Model Details
### Training Hardware
- RTX A5000 24GB
- 48 Core Intel Xeon
- 128GB Ram.
### Model Hyperparameters
- This [training script](https://github.com/phr-winter23/phr-mental-chat/blob/main/finetuneModel/finetuneScriptLLaMA-2.ipynb) was used to do the finetuning.
- The shareGPT format dataset was converted to llama-2 training format using this [script](https://github.com/phr-winter23/phr-mental-chat/blob/main/finetuneModel/llamaDataMaker.ipynb).
- num_train_epochs = 2
- per_device_train_batch_size = 2
- per_device_eval_batch_size = 2
- gradient_accumulation_steps = 1
- max_seq_length = 4096
- lora_r = 64
- lora_alpha = 16
- lora_dropout = 0.1
- use_4bit = True
- bnb_4bit_compute_dtype = "float16"
- bnb_4bit_quant_type = "nf4"
- use_nested_quant = False
- fp16 = False
- bf16 = True
- Data Sample: 1000 (80:20 split)

### Model System Prompt
You are a helpful and joyous mental therapy assistant. Always answer as helpfully and cheerfully as possible, while being safe.  Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content.Please ensure that your responses are socially unbiased and positive in nature.

If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.

#### Model Training Data

![image/png](https://cdn-uploads.huggingface.co/production/uploads/64eb1e4a55e4f0ecb9c4f406/x298HbUKHrom-RFmNgSbH.png)

### Model Benchmarks
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_vibhorag101__llama-2-13b-chat-hf-phr_mental_therapy)

| Metric                | Value                     |
|-----------------------|---------------------------|
| Avg.                  | 42.5   |
| ARC (25-shot)         | 38.82          |
| HellaSwag (10-shot)   | 72.76    |
| MMLU (5-shot)         | 23.12         |
| TruthfulQA (0-shot)   | 46.92   |
| Winogrande (5-shot)   | 65.59   |
| GSM8K (5-shot)        | 7.81        |
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_vibhorag101__llama-2-13b-chat-hf-phr_mental_therapy)

|             Metric              |Value|
|---------------------------------|----:|
|Avg.                             |42.50|
|AI2 Reasoning Challenge (25-Shot)|38.82|
|HellaSwag (10-Shot)              |72.76|
|MMLU (5-Shot)                    |23.12|
|TruthfulQA (0-shot)              |46.92|
|Winogrande (5-shot)              |65.59|
|GSM8k (5-shot)                   | 7.81|