Vineedhar commited on
Commit
9582066
1 Parent(s): c224e0b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -95
README.md CHANGED
@@ -28,21 +28,19 @@ This model is suitable for English. -->
28
 
29
 
30
 
31
- - **Developed by:** "[orYx Models]"
32
- - **Funded by [optional]:** "[More Information Needed]"
33
- - **Shared by [optional]:** "[Vineedhar, relkino, kalhosni]"
34
- - **Model type:** {{ model_type | default("[Text Classifier]"
35
- - **Language(s) (NLP):** "[English]"
36
- - **License:** {{ license ("[MIT]"
37
- - **Finetuned from model [optional]:** "[cardiffnlp/twitter-roberta-base-sentiment-latest]"
38
 
39
  ### Model Sources [optional]
40
 
41
  <!--This is HuggingFace modelID - cardiffnlp/twitter-roberta-base-2021-124m-->
42
 
43
- - **Repository:** {{ repo | default("[More Information Needed]", true)}}
44
- - **Paper [optional]:** {{ paper | default("[TimeLMs - https://arxiv.org/abs/2202.03829]", true)}}
45
- - **Demo [optional]:** {{ demo | default("[More Information Needed]", true)}}
46
 
47
  ## Uses
48
 
@@ -54,22 +52,12 @@ Use case: We can analyse the text from any executive, employee, client of an org
54
 
55
  ### Direct Use
56
 
57
- <!-- You can infer the model at, orYx Models page, Leadership Sentiment Analyzer - spcace.
58
- The Space id is - orYx-models/Leadership-sentiment-analyzer -->
59
 
60
- {{ direct_use | default("orYx-models/Leadership-sentiment-analyzer", true)}}
61
 
62
- ### Downstream Use [optional]
63
 
64
- <!-- This phase is under progress and will be shared once the model is deployed under larger ecosystem/.app -->
65
-
66
- {{ downstream_use | default("[More Information Needed]", true)}}
67
-
68
- ### Out-of-Scope Use
69
-
70
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
71
-
72
- {{ out_of_scope_use | default("[More Information Needed]", true)}}
73
 
74
  ## Bias, Risks, and Limitations
75
 
@@ -79,78 +67,118 @@ The Space id is - orYx-models/Leadership-sentiment-analyzer -->
79
 
80
  ### Recommendations
81
 
82
- <!-- ]You can futher finetune the model to get better results. -->
83
 
84
- {{ bias_recommendations | default("Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.", true)}}
85
 
86
- ## How to Get Started with the Model
87
 
88
- Use the code below to get started with the model.
89
-
90
- {{ get_started_code | default("[More Information Needed]", true)}}
91
 
92
  ## Training Details
93
 
 
 
 
94
  ### Training Data
95
 
96
- <!-- 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. -->
97
 
98
- {{ training_data | default("[More Information Needed]", true)}}
99
 
100
  ### Training Procedure
101
 
102
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
103
 
104
  #### Preprocessing [optional]
105
 
106
- {{ preprocessing | default("[More Information Needed]", true)}}
 
 
107
 
108
 
109
  #### Training Hyperparameters
110
 
111
- - **Training regime:** {{ training_regime | default("[More Information Needed]", true)}} <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  #### Speeds, Sizes, Times [optional]
114
 
115
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
 
 
 
 
 
 
 
116
 
117
- {{ speeds_sizes_times | default("[More Information Needed]", true)}}
118
 
119
- ## Evaluation
120
 
121
- <!-- This section describes the evaluation protocols and provides the results. -->
122
 
123
- ### Testing Data, Factors & Metrics
124
 
125
- #### Testing Data
 
 
 
126
 
127
- <!-- This should link to a Dataset Card if possible. -->
128
 
129
- {{ testing_data | default("[More Information Needed]", true)}}
130
 
131
- #### Factors
132
 
133
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
 
 
134
 
135
- {{ testing_factors | default("[More Information Needed]", true)}}
 
 
136
 
137
- #### Metrics
 
 
138
 
139
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
140
 
141
- {{ testing_metrics | default("[More Information Needed]", true)}}
 
 
142
 
143
- ### Results
 
 
144
 
145
- {{ results | default("[More Information Needed]", true)}}
146
 
147
  #### Summary
148
 
149
- {{ results_summary | default("", true) }}
 
 
 
 
 
 
150
 
151
- ## Model Examination [optional]
 
 
 
 
 
 
152
 
153
- <!-- Relevant interpretability work for the model goes here -->
154
 
155
  {{ model_examination | default("[More Information Needed]", true)}}
156
 
@@ -160,56 +188,45 @@ Use the code below to get started with the model.
160
 
161
  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).
162
 
163
- - **Hardware Type:** {{ hardware_type | default("[More Information Needed]", true)}}
164
- - **Hours used:** {{ hours_used | default("[More Information Needed]", true)}}
165
- - **Cloud Provider:** {{ cloud_provider | default("[More Information Needed]", true)}}
166
- - **Compute Region:** {{ cloud_region | default("[More Information Needed]", true)}}
167
- - **Carbon Emitted:** {{ co2_emitted | default("[More Information Needed]", true)}}
168
-
169
- ## Technical Specifications [optional]
170
-
171
- ### Model Architecture and Objective
172
 
173
- {{ model_specs | default("[More Information Needed]", true)}}
174
 
175
  ### Compute Infrastructure
176
 
177
- {{ compute_infrastructure | default("[More Information Needed]", true)}}
178
-
179
- #### Hardware
180
-
181
- {{ hardware_requirements | default("[More Information Needed]", true)}}
182
-
183
- #### Software
184
-
185
- {{ software | default("[More Information Needed]", true)}}
186
-
187
- ## Citation [optional]
188
-
189
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
190
-
191
- **BibTeX:**
192
-
193
- {{ citation_bibtex | default("[More Information Needed]", true)}}
194
-
195
- **APA:**
196
-
197
- {{ citation_apa | default("[More Information Needed]", true)}}
198
-
199
- ## Glossary [optional]
200
-
201
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
202
-
203
- {{ glossary | default("[More Information Needed]", true)}}
204
-
205
- ## More Information [optional]
206
 
207
- {{ more_information | default("[More Information Needed]", true)}}
208
 
209
  ## Model Card Authors [optional]
210
 
211
- {{ model_card_authors | default("[Vineedhar, relkino]", true)}}
212
 
213
  ## Model Card Contact
214
 
215
- {{ model_card_contact | default("[https://khalidalhosni.com/]", true)}}
 
28
 
29
 
30
 
31
+ - **Developed by:** orYx Models
32
+ - **Shared by [optional]:** Vineedhar, relkino, kalhosni
33
+ - **Model type:** Text Classifier
34
+ - **Language(s) (NLP):** English
35
+ - **License:** MIT
36
+ - **Finetuned from model [optional]:** cardiffnlp/twitter-roberta-base-sentiment-latest
 
37
 
38
  ### Model Sources [optional]
39
 
40
  <!--This is HuggingFace modelID - cardiffnlp/twitter-roberta-base-2021-124m-->
41
 
42
+ - **Repository:** More Information Needed
43
+ - **Paper [optional]:** TimeLMs - https://arxiv.org/abs/2202.03829
 
44
 
45
  ## Uses
46
 
 
52
 
53
  ### Direct Use
54
 
55
+ nlp = pipeline("sentiment-analysis", model = model, tokenizer = tokenizer)
 
56
 
57
+ nlp("The results don't match but the effort seems to be always high")
58
 
59
+ Out[7]: [{'label': 'Positive', 'score': 0.9996090531349182}]
60
 
 
 
 
 
 
 
 
 
 
61
 
62
  ## Bias, Risks, and Limitations
63
 
 
67
 
68
  ### Recommendations
69
 
 
70
 
 
71
 
 
72
 
 
 
 
73
 
74
  ## Training Details
75
 
76
+
77
+
78
+
79
  ### Training Data
80
 
81
+ X_train, X_val, y_train, y_val = train_test_split(X,y, test_size = 0.2, stratify = y)
82
 
 
83
 
84
  ### Training Procedure
85
 
86
+
87
 
88
  #### Preprocessing [optional]
89
 
90
+ 'input_ids': tensor
91
+ 'attention_mask': tensor
92
+ 'label': tensor(2)
93
 
94
 
95
  #### Training Hyperparameters
96
 
97
+ args = TrainingArguments(
98
+ output_dir="output",
99
+ do_train = True,
100
+ do_eval = True,
101
+ num_train_epochs = 1,
102
+ per_device_train_batch_size = 4,
103
+ per_device_eval_batch_size = 8,
104
+ warmup_steps = 50,
105
+ weight_decay = 0.01,
106
+ logging_strategy= "steps",
107
+ logging_dir= "logging",
108
+ logging_steps = 50,
109
+ eval_steps = 50,
110
+ save_strategy = "steps",
111
+ fp16 = True,
112
+ #load_best_model_at_end = True
113
+ )
114
 
115
  #### Speeds, Sizes, Times [optional]
116
 
117
+ TrainOutput(global_step=879,
118
+ training_loss=0.1825900522650848,
119
+ metrics={'train_runtime': 101.6309,
120
+ 'train_samples_per_second': 34.596,
121
+ 'train_steps_per_second': 8.649,
122
+ 'total_flos': 346915041274368.0,
123
+ 'train_loss': 0.1825900522650848,
124
+ 'epoch': 1.0})
125
 
126
+ ### Testing Data
127
 
128
+ 20%, 789 points off 4396 population of the Dataset.
129
 
 
130
 
131
+ #### Metrics
132
 
133
+ Accuracy
134
+ F1 Score
135
+ Precision
136
+ Recall
137
 
 
138
 
139
+ ## Evaluation Results
140
 
 
141
 
142
+ loss
143
+ train 0.049349
144
+ val 0.108378
145
 
146
+ Accuracy
147
+ train 0.988908
148
+ val 0.976136
149
 
150
+ F1
151
+ train 0.987063
152
+ val 0.972464
153
 
 
154
 
155
+ Precision
156
+ train 0.982160
157
+ val 0.965982
158
 
159
+ Recall
160
+ train 0.992357
161
+ val 0.979861
162
 
 
163
 
164
  #### Summary
165
 
166
+ Accuracy
167
+ train 98.8%
168
+ val 97.6%
169
+
170
+ F1
171
+ train 98.7%
172
+ val 97.2%
173
 
174
+ Precision
175
+ train 98.2%
176
+ val 96.5%
177
+
178
+ Recall
179
+ train 99.2%
180
+ val 97.9%
181
 
 
182
 
183
  {{ model_examination | default("[More Information Needed]", true)}}
184
 
 
188
 
189
  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).
190
 
191
+ - **Hardware Type:** T4 GPU
192
+ - **Hours used:** 2
193
+ - **Cloud Provider:** Google
194
+ - **Compute Region:** India
195
+ - **Carbon Emitted:** No Information Available
 
 
 
 
196
 
 
197
 
198
  ### Compute Infrastructure
199
 
200
+ Google Colab - T4 GPU
201
+
202
+ ### References
203
+ ```
204
+ @inproceedings{camacho-collados-etal-2022-tweetnlp,
205
+ title = "{T}weet{NLP}: Cutting-Edge Natural Language Processing for Social Media",
206
+ author = "Camacho-collados, Jose and
207
+ Rezaee, Kiamehr and
208
+ Riahi, Talayeh and
209
+ Ushio, Asahi and
210
+ Loureiro, Daniel and
211
+ Antypas, Dimosthenis and
212
+ Boisson, Joanne and
213
+ Espinosa Anke, Luis and
214
+ Liu, Fangyu and
215
+ Mart{\'\i}nez C{\'a}mara, Eugenio" and others,
216
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
217
+ month = dec,
218
+ year = "2022",
219
+ address = "Abu Dhabi, UAE",
220
+ publisher = "Association for Computational Linguistics",
221
+ url = "https://aclanthology.org/2022.emnlp-demos.5",
222
+ pages = "38--49"
223
+ }
 
 
 
 
 
224
 
 
225
 
226
  ## Model Card Authors [optional]
227
 
228
+ Vineedhar, relkino
229
 
230
  ## Model Card Contact
231
 
232
+ https://khalidalhosni.com/