myentity commited on
Commit
bcaad94
·
verified ·
1 Parent(s): 52a3679

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -158
README.md CHANGED
@@ -7,10 +7,8 @@ base_model:
7
  - google-bert/bert-base-uncased
8
  ---
9
 
10
- # Model Card for Model ID
11
-
12
  This is Bert-base-uncased model fine-tuned for topic classification of therapist remarks in psychotherapeutic contexts. The task is a multi-class classification with the following labels:
13
- ```
14
  id2label = {0: 'Time Up and Future Meetings',
15
  1: 'Complex Emotions Toward Him',
16
  2: 'Desires and Disappointments',
@@ -51,186 +49,69 @@ id2label = {0: 'Time Up and Future Meetings',
51
  ```
52
 
53
 
54
- ## Model Details
55
-
56
- ### Model Description
57
-
58
- <!-- Provide a longer summary of what this model is. -->
59
-
60
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
61
-
62
- - **Developed by:** [More Information Needed]
63
- - **Funded by [optional]:** [More Information Needed]
64
- - **Shared by [optional]:** [More Information Needed]
65
- - **Model type:** [More Information Needed]
66
- - **Language(s) (NLP):** [More Information Needed]
67
- - **License:** [More Information Needed]
68
- - **Finetuned from model [optional]:** [More Information Needed]
69
-
70
- ### Model Sources [optional]
71
-
72
- <!-- Provide the basic links for the model. -->
73
-
74
- - **Repository:** [More Information Needed]
75
- - **Paper [optional]:** [More Information Needed]
76
- - **Demo [optional]:** [More Information Needed]
77
-
78
- ## Uses
79
-
80
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
81
-
82
- ### Direct Use
83
-
84
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
85
-
86
- [More Information Needed]
87
-
88
- ### Downstream Use [optional]
89
-
90
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
91
-
92
- [More Information Needed]
93
-
94
- ### Out-of-Scope Use
95
-
96
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
97
-
98
- [More Information Needed]
99
-
100
- ## Bias, Risks, and Limitations
101
-
102
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
103
-
104
- [More Information Needed]
105
-
106
- ### Recommendations
107
-
108
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
109
-
110
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
111
-
112
- ## How to Get Started with the Model
113
-
114
- Use the code below to get started with the model.
115
-
116
- [More Information Needed]
117
-
118
- ## Training Details
119
-
120
- ### Training Data
121
-
122
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
123
-
124
- [More Information Needed]
125
-
126
- ### Training Procedure
127
-
128
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
129
-
130
- #### Preprocessing [optional]
131
-
132
- [More Information Needed]
133
-
134
-
135
- #### Training Hyperparameters
136
 
137
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
 
138
 
139
- #### Speeds, Sizes, Times [optional]
140
-
141
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
142
-
143
- [More Information Needed]
144
 
145
- ## Evaluation
146
 
147
- <!-- This section describes the evaluation protocols and provides the results. -->
 
 
 
 
 
 
 
 
 
 
148
 
149
- ### Testing Data, Factors & Metrics
150
 
151
- #### Testing Data
152
 
153
- <!-- This should link to a Dataset Card if possible. -->
154
 
155
- [More Information Needed]
 
156
 
157
- #### Factors
158
 
159
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
160
 
161
- [More Information Needed]
162
 
163
- #### Metrics
164
 
165
  <!-- These are the evaluation metrics being used, ideally with a description of why. -->
166
 
167
  [More Information Needed]
168
 
169
- ### Results
170
-
171
- [More Information Needed]
172
-
173
- #### Summary
174
-
175
-
176
 
177
- ## Model Examination [optional]
178
-
179
- <!-- Relevant interpretability work for the model goes here -->
180
-
181
- [More Information Needed]
182
 
183
- ## Environmental Impact
184
 
185
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
186
 
187
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
188
-
189
- - **Hardware Type:** [More Information Needed]
190
- - **Hours used:** [More Information Needed]
191
- - **Cloud Provider:** [More Information Needed]
192
- - **Compute Region:** [More Information Needed]
193
- - **Carbon Emitted:** [More Information Needed]
194
-
195
- ## Technical Specifications [optional]
196
-
197
- ### Model Architecture and Objective
198
-
199
- [More Information Needed]
200
 
201
- ### Compute Infrastructure
202
-
203
- [More Information Needed]
204
-
205
- #### Hardware
206
-
207
- [More Information Needed]
208
-
209
- #### Software
210
-
211
- [More Information Needed]
212
-
213
- ## Citation [optional]
214
-
215
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
216
 
217
  **BibTeX:**
218
 
219
- [More Information Needed]
220
-
221
- **APA:**
222
-
223
- [More Information Needed]
224
-
225
- ## Glossary [optional]
226
-
227
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
228
-
229
- [More Information Needed]
230
-
231
- ## More Information [optional]
232
-
233
- [More Information Needed]
234
 
235
  ## Model Card Authors [optional]
236
 
 
7
  - google-bert/bert-base-uncased
8
  ---
9
 
 
 
10
  This is Bert-base-uncased model fine-tuned for topic classification of therapist remarks in psychotherapeutic contexts. The task is a multi-class classification with the following labels:
11
+ ```python
12
  id2label = {0: 'Time Up and Future Meetings',
13
  1: 'Complex Emotions Toward Him',
14
  2: 'Desires and Disappointments',
 
49
  ```
50
 
51
 
52
+ ## Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ ```python
55
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
56
 
57
+ tokenizer = AutoTokenizer.from_pretrained("AIPsy/bert-base-therapist-topic-classification-eng")
58
+ model = AutoModelForSequenceClassification.from_pretrained("AIPsy/bert-base-therapist-topic-classification-eng")
 
 
 
59
 
60
+ text = "You know, I mean, it seems like you could just go to work and feel so much better."
61
 
62
+ encoding = tokenizer(
63
+ text,
64
+ truncation=True,
65
+ padding="max_length",
66
+ return_tensors="pt"
67
+ )
68
+ output = model(encoding['input_ids'], encoding['attention_mask']).logits
69
+ result = np.argmax(output.detach().numpy(), axis=-1)
70
+ print(id2label[result[0]])
71
+ 'Job Anxiety and Self-Reflection'
72
+ ```
73
 
74
+ ## Dataset
75
 
76
+ The source material was the recordings of psychotherapeutic sessions posted on YouTube in the public domain. After conducting speaker diarization and transcription of the recordings 15324 items (sentences) were obtained.
77
 
78
+ ## Links
79
 
80
+ - **Paper [optional]:** <https://arxiv.org/abs/2412.17449>
81
+ -
82
 
 
83
 
84
+ ## Recommendations
85
 
 
86
 
87
+ ## Metrics
88
 
89
  <!-- These are the evaluation metrics being used, ideally with a description of why. -->
90
 
91
  [More Information Needed]
92
 
 
 
 
 
 
 
 
93
 
 
 
 
 
 
94
 
95
+ ## Citation
96
 
97
+ **Papers:** Applying LLM and Topic Modelling in Psychotherapeutic Contexts <https://arxiv.org/abs/2412.17449>
98
 
99
+ **Developed by:** @myentity
100
+ **License:** MIT
101
+ **Finetuned from model:** google-bert/bert-base-uncased
 
 
 
 
 
 
 
 
 
 
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
  **BibTeX:**
105
 
106
+ @misc{vanin2024applyingllmtopicmodelling,
107
+ title={Applying LLM and Topic Modelling in Psychotherapeutic Contexts},
108
+ author={Alexander Vanin and Vadim Bolshev and Anastasia Panfilova},
109
+ year={2024},
110
+ eprint={2412.17449},
111
+ archivePrefix={arXiv},
112
+ primaryClass={cs.LG},
113
+ url={https://arxiv.org/abs/2412.17449},
114
+ }
 
 
 
 
 
 
115
 
116
  ## Model Card Authors [optional]
117