GuelGaMesh01
commited on
Commit
•
ded882c
1
Parent(s):
53c6859
Update README.md
Browse files
README.md
CHANGED
@@ -27,13 +27,6 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
27 |
- **License:** MIT License
|
28 |
- **Finetuned from model gemma-2b-it:** gemma-2b-it, which is a base model fine-tuned for mental health-related queries.
|
29 |
|
30 |
-
### Model Sources [optional]
|
31 |
-
|
32 |
-
<!-- Provide the basic links for the model. -->
|
33 |
-
|
34 |
-
- **Repository:** [More Information Needed]
|
35 |
-
- **Paper [optional]:** [More Information Needed]
|
36 |
-
- **Demo [optional]:** [More Information Needed]
|
37 |
|
38 |
## Use Cases
|
39 |
|
@@ -47,17 +40,13 @@ This model is fine-tuned for generating responses related to mental health couns
|
|
47 |
It can be used for providing suggestions, conversation starters, or follow-ups in mental health scenarios.
|
48 |
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
### Downstream Use [optional]
|
53 |
|
54 |
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
55 |
This model can be adapted for use in more specific counseling-related tasks,
|
56 |
or in applications where generating mental health-related dialogue is necessary.
|
57 |
|
58 |
|
59 |
-
[More Information Needed]
|
60 |
-
|
61 |
### Out-of-Scope Use
|
62 |
|
63 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
@@ -66,9 +55,6 @@ It should not be used for real-time crisis management or any situation
|
|
66 |
requiring direct human intervention. Use in highly critical or urgent care situations is out of scope.
|
67 |
|
68 |
|
69 |
-
|
70 |
-
[More Information Needed]
|
71 |
-
|
72 |
## Bias, Risks, and Limitations
|
73 |
|
74 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
@@ -88,16 +74,17 @@ Users should carefully evaluate generated responses in the context of their use
|
|
88 |
|
89 |
Use the code below to get started with the model.
|
90 |
|
|
|
91 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
92 |
|
93 |
-
tokenizer = AutoTokenizer.from_pretrained("GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa")
|
94 |
model = AutoModelForCausalLM.from_pretrained("GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa")
|
|
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
outputs = model.generate(**inputs, max_length=200)
|
99 |
-
|
100 |
-
print(response)
|
101 |
|
102 |
|
103 |
## Training Details
|
@@ -160,5 +147,6 @@ specifically a 10% test split of the original training dataset.
|
|
160 |
The following metrics were used during the training and evaluation process:
|
161 |
|
162 |
- **Training Loss**: The training loss was tracked during training to monitor how well the model was learning from the data. It decreased throughout the epochs.
|
|
|
163 |
- **Perplexity**: Perplexity was used as a metric to evaluate the model's ability to generate coherent and fluent text responses. The model was evaluated on a subset of the test data, and both non-finetuned and finetuned perplexities were compared.
|
164 |
|
|
|
27 |
- **License:** MIT License
|
28 |
- **Finetuned from model gemma-2b-it:** gemma-2b-it, which is a base model fine-tuned for mental health-related queries.
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
## Use Cases
|
32 |
|
|
|
40 |
It can be used for providing suggestions, conversation starters, or follow-ups in mental health scenarios.
|
41 |
|
42 |
|
43 |
+
### Downstream Use
|
|
|
|
|
44 |
|
45 |
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
46 |
This model can be adapted for use in more specific counseling-related tasks,
|
47 |
or in applications where generating mental health-related dialogue is necessary.
|
48 |
|
49 |
|
|
|
|
|
50 |
### Out-of-Scope Use
|
51 |
|
52 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
|
|
55 |
requiring direct human intervention. Use in highly critical or urgent care situations is out of scope.
|
56 |
|
57 |
|
|
|
|
|
|
|
58 |
## Bias, Risks, and Limitations
|
59 |
|
60 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
|
|
74 |
|
75 |
Use the code below to get started with the model.
|
76 |
|
77 |
+
```python
|
78 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
79 |
|
80 |
+
tokenizer = AutoTokenizer.from_pretrained("GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa")
|
81 |
model = AutoModelForCausalLM.from_pretrained("GuelGaMesh01/gemma-2b-it-finetuned-mental-health-qa")
|
82 |
+
```
|
83 |
|
84 |
+
### Example inference
|
85 |
+
```python
|
86 |
+
inputs = tokenizer("How can I manage anxiety better?", return_tensors="pt") outputs = model.generate(**inputs, max_length=200) response = tokenizer.decode(outputs[0], skip_special_tokens=True) print(response)
|
87 |
+
```
|
|
|
88 |
|
89 |
|
90 |
## Training Details
|
|
|
147 |
The following metrics were used during the training and evaluation process:
|
148 |
|
149 |
- **Training Loss**: The training loss was tracked during training to monitor how well the model was learning from the data. It decreased throughout the epochs.
|
150 |
+
- **Semantic Similarity**: Semantic similarity was employed as the primary metric to assess the model’s ability to generate contextually relevant and meaningful responses. Since the dataset involves conversational context, particularly in the sensitive area of mental health counseling, it was crucial to evaluate how well the model understands and retains the intent and meaning behind the input rather than merely focusing on fluency or token-level prediction.
|
151 |
- **Perplexity**: Perplexity was used as a metric to evaluate the model's ability to generate coherent and fluent text responses. The model was evaluated on a subset of the test data, and both non-finetuned and finetuned perplexities were compared.
|
152 |
|