sinanyuksel
commited on
Commit
•
2affe44
1
Parent(s):
c75e4a1
Update README.md
Browse files
README.md
CHANGED
@@ -1,235 +1,67 @@
|
|
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 |
-
## Direct Use
|
70 |
-
|
71 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
72 |
-
<!-- If the user enters content, print that. If not, but they enter a task in the list, use that. If neither, say "more info needed." -->
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
## Downstream Use [Optional]
|
78 |
-
|
79 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
80 |
-
<!-- If the user enters content, print that. If not, but they enter a task in the list, use that. If neither, say "more info needed." -->
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
## Out-of-Scope Use
|
86 |
-
|
87 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
88 |
-
<!-- If the user enters content, print that. If not, but they enter a task in the list, use that. If neither, say "more info needed." -->
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
# Bias, Risks, and Limitations
|
94 |
-
|
95 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
96 |
-
|
97 |
-
Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
|
98 |
-
|
99 |
-
|
100 |
-
## Recommendations
|
101 |
-
|
102 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
# Training Details
|
109 |
-
|
110 |
-
## Training Data
|
111 |
-
|
112 |
-
<!-- This should link to a Data 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. -->
|
113 |
-
|
114 |
-
More information on training data needed
|
115 |
-
|
116 |
-
|
117 |
-
## Training Procedure
|
118 |
-
|
119 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
120 |
-
|
121 |
-
### Preprocessing
|
122 |
-
|
123 |
-
More information needed
|
124 |
-
|
125 |
-
### Speeds, Sizes, Times
|
126 |
-
|
127 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
128 |
-
|
129 |
-
More information needed
|
130 |
-
|
131 |
-
# Evaluation
|
132 |
-
|
133 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
134 |
-
|
135 |
-
## Testing Data, Factors & Metrics
|
136 |
-
|
137 |
-
### Testing Data
|
138 |
-
|
139 |
-
<!-- This should link to a Data Card if possible. -->
|
140 |
-
|
141 |
-
More information needed
|
142 |
-
|
143 |
-
|
144 |
-
### Factors
|
145 |
-
|
146 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
147 |
-
|
148 |
-
More information needed
|
149 |
-
|
150 |
-
### Metrics
|
151 |
-
|
152 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
153 |
-
|
154 |
-
More information needed
|
155 |
-
|
156 |
-
## Results
|
157 |
-
|
158 |
-
More information needed
|
159 |
-
|
160 |
-
# Model Examination
|
161 |
-
|
162 |
-
More information needed
|
163 |
-
|
164 |
-
# Environmental Impact
|
165 |
-
|
166 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
167 |
-
|
168 |
-
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).
|
169 |
-
|
170 |
-
- **Hardware Type:** More information needed
|
171 |
-
- **Hours used:** More information needed
|
172 |
-
- **Cloud Provider:** More information needed
|
173 |
-
- **Compute Region:** More information needed
|
174 |
-
- **Carbon Emitted:** More information needed
|
175 |
-
|
176 |
-
# Technical Specifications [optional]
|
177 |
-
|
178 |
-
## Model Architecture and Objective
|
179 |
-
|
180 |
-
More information needed
|
181 |
-
|
182 |
-
## Compute Infrastructure
|
183 |
-
|
184 |
-
More information needed
|
185 |
-
|
186 |
-
### Hardware
|
187 |
-
|
188 |
-
More information needed
|
189 |
-
|
190 |
-
### Software
|
191 |
-
|
192 |
-
More information needed
|
193 |
-
|
194 |
-
# Citation
|
195 |
-
|
196 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
197 |
-
|
198 |
-
**BibTeX:**
|
199 |
-
|
200 |
-
More information needed
|
201 |
-
|
202 |
-
**APA:**
|
203 |
-
|
204 |
-
More information needed
|
205 |
-
|
206 |
-
# Glossary [optional]
|
207 |
-
|
208 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
209 |
-
|
210 |
-
More information needed
|
211 |
-
|
212 |
-
# More Information [optional]
|
213 |
-
|
214 |
-
More information needed
|
215 |
-
|
216 |
-
# Model Card Authors [optional]
|
217 |
-
|
218 |
-
<!-- This section provides another layer of transparency and accountability. Whose views is this model card representing? How many voices were included in its construction? Etc. -->
|
219 |
-
|
220 |
-
a, s, y
|
221 |
-
|
222 |
-
# Model Card Contact
|
223 |
-
|
224 |
-
More information needed
|
225 |
-
|
226 |
-
# How to Get Started with the Model
|
227 |
-
|
228 |
-
Use the code below to get started with the model.
|
229 |
-
|
230 |
-
<details>
|
231 |
-
<summary> Click to expand </summary>
|
232 |
-
|
233 |
-
More information needed
|
234 |
-
|
235 |
-
</details>
|
|
|
1 |
+
language:
|
2 |
+
- tr
|
3 |
+
thumbnail: https://avatars3.githubusercontent.com/u/32437151?s=460&u=4ec59abc8d21d5feea3dab323d23a5860e6996a4&v=4
|
4 |
+
tags:
|
5 |
+
- text-classification
|
6 |
+
- emotion
|
7 |
+
- pytorch
|
8 |
+
datasets:
|
9 |
+
- emotion (Translated to Turkish)
|
10 |
+
metrics:
|
11 |
+
- Accuracy, F1 Score
|
12 |
+
---
|
13 |
+
# distilbert-base-turkish-cased-emotion
|
14 |
+
|
15 |
+
## Model description:
|
16 |
+
[Distilbert-base-turkish-cased](https://huggingface.co/dbmdz/distilbert-base-turkish-cased) finetuned on the emotion dataset (Translated to Turkish via Google Translate API) using HuggingFace Trainer with below Hyperparameters
|
17 |
+
```
|
18 |
+
learning rate 2e-5,
|
19 |
+
batch size 64,
|
20 |
+
num_train_epochs=8,
|
21 |
+
```
|
22 |
+
|
23 |
+
## Model Performance Comparision on Emotion Dataset from Twitter:
|
24 |
+
|
25 |
+
| Model | Accuracy | F1 Score | Test Sample per Second |
|
26 |
+
| --- | --- | --- | --- |
|
27 |
+
| [Distilbert-base-turkish-cased-emotion](https://huggingface.co/zafercavdar/distilbert-base-turkish-cased-emotion) | 83.25 | 83.17 | 232.197 |
|
28 |
+
|
29 |
+
## How to Use the model:
|
30 |
+
```python
|
31 |
+
from transformers import pipeline
|
32 |
+
classifier = pipeline("text-classification",
|
33 |
+
model='zafercavdar/distilbert-base-turkish-cased-emotion',
|
34 |
+
return_all_scores=True)
|
35 |
+
prediction = classifier("Bu kütüphaneyi seviyorum, en iyi yanı kolay kullanımı.", )
|
36 |
+
print(prediction)
|
37 |
+
|
38 |
+
"""
|
39 |
+
Output:
|
40 |
+
[
|
41 |
+
[
|
42 |
+
{'label': 'sadness', 'score': 0.0026786490343511105},
|
43 |
+
{'label': 'joy', 'score': 0.6600754261016846},
|
44 |
+
{'label': 'love', 'score': 0.3203163146972656},
|
45 |
+
{'label': 'anger', 'score': 0.004358913749456406},
|
46 |
+
{'label': 'fear', 'score': 0.002354539930820465},
|
47 |
+
{'label': 'surprise', 'score': 0.010216088965535164}
|
48 |
+
]
|
49 |
+
]
|
50 |
+
|
51 |
+
"""
|
52 |
+
```
|
53 |
+
|
54 |
+
## Dataset:
|
55 |
+
[Twitter-Sentiment-Analysis](https://huggingface.co/nlp/viewer/?dataset=emotion).
|
56 |
+
|
57 |
+
## Eval results
|
58 |
+
```json
|
59 |
+
{
|
60 |
+
'eval_accuracy': 0.8325,
|
61 |
+
'eval_f1': 0.8317301441160213,
|
62 |
+
'eval_loss': 0.5021793842315674,
|
63 |
+
'eval_runtime': 8.6167,
|
64 |
+
'eval_samples_per_second': 232.108,
|
65 |
+
'eval_steps_per_second': 3.714
|
66 |
+
}
|
67 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|