imvladikon commited on
Commit
a760f3b
·
1 Parent(s): 84a1fea

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -73
README.md CHANGED
@@ -101,53 +101,12 @@ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model trained
101
  from span_marker import SpanMarkerModel
102
 
103
  # Download from the 🤗 Hub
104
- model = SpanMarkerModel.from_pretrained("span_marker_model_id")
105
  # Run inference
106
  entities = model.predict("יו\"ר ועדת ה נוער נתן סלובטיק אמר ש ה שחקנים של אנחנו לא משתלבים ב אירופה.")
 
107
  ```
108
 
109
- ### Downstream Use
110
- You can finetune this model on your own dataset.
111
-
112
- <details><summary>Click to expand</summary>
113
-
114
- ```python
115
- from span_marker import SpanMarkerModel, Trainer
116
-
117
- # Download from the 🤗 Hub
118
- model = SpanMarkerModel.from_pretrained("span_marker_model_id")
119
-
120
- # Specify a Dataset with "tokens" and "ner_tag" columns
121
- dataset = load_dataset("conll2003") # For example CoNLL2003
122
-
123
- # Initialize a Trainer using the pretrained model & dataset
124
- trainer = Trainer(
125
- model=model,
126
- train_dataset=dataset["train"],
127
- eval_dataset=dataset["validation"],
128
- )
129
- trainer.train()
130
- trainer.save_model("span_marker_model_id-finetuned")
131
- ```
132
- </details>
133
-
134
- <!--
135
- ### Out-of-Scope Use
136
-
137
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
138
- -->
139
-
140
- <!--
141
- ## Bias, Risks and Limitations
142
-
143
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
144
- -->
145
-
146
- <!--
147
- ### Recommendations
148
-
149
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
150
- -->
151
 
152
  ## Training Details
153
 
@@ -170,36 +129,26 @@ trainer.save_model("span_marker_model_id-finetuned")
170
  - num_epochs: 4
171
  - mixed_precision_training: Native AMP
172
 
173
- ### Training Results
174
- | Epoch | Step | Validation Loss | Validation Precision | Validation Recall | Validation F1 | Validation Accuracy |
175
- |:------:|:----:|:---------------:|:--------------------:|:-----------------:|:-------------:|:-------------------:|
176
- | 0.4070 | 1000 | 0.0352 | 0.0 | 0.0 | 0.0 | 0.8980 |
177
- | 0.8140 | 2000 | 0.0327 | 0.0 | 0.0 | 0.0 | 0.8980 |
178
- | 1.2210 | 3000 | 0.0224 | 0.0 | 0.0 | 0.0 | 0.8980 |
179
- | 1.6280 | 4000 | 0.0149 | 0.5874 | 0.2200 | 0.3201 | 0.9134 |
180
- | 2.0350 | 5000 | 0.0137 | 0.55 | 0.3895 | 0.4560 | 0.9248 |
181
- | 2.4420 | 6000 | 0.0113 | 0.6204 | 0.4313 | 0.5089 | 0.9298 |
182
- | 2.8490 | 7000 | 0.0121 | 0.5733 | 0.5075 | 0.5384 | 0.9310 |
183
- | 3.2560 | 8000 | 0.0115 | 0.5782 | 0.5236 | 0.5495 | 0.9334 |
184
- | 3.6630 | 9000 | 0.0108 | 0.6100 | 0.5354 | 0.5703 | 0.9359 |
185
- | 0.4070 | 1000 | 0.0103 | 0.6321 | 0.5880 | 0.6092 | 0.9381 |
186
- | 0.8140 | 2000 | 0.0088 | 0.6968 | 0.6288 | 0.6610 | 0.9471 |
187
- | 1.2210 | 3000 | 0.0091 | 0.6790 | 0.6695 | 0.6742 | 0.9484 |
188
- | 1.6280 | 4000 | 0.0086 | 0.6845 | 0.6845 | 0.6845 | 0.9480 |
189
- | 2.0350 | 5000 | 0.0089 | 0.6802 | 0.6845 | 0.6824 | 0.9492 |
190
- | 2.4420 | 6000 | 0.0084 | 0.6938 | 0.6953 | 0.6945 | 0.9539 |
191
- | 2.8490 | 7000 | 0.0088 | 0.6884 | 0.7039 | 0.6960 | 0.9512 |
192
- | 3.2560 | 8000 | 0.0086 | 0.6895 | 0.7124 | 0.7008 | 0.9514 |
193
- | 3.6630 | 9000 | 0.0082 | 0.6989 | 0.7049 | 0.7019 | 0.9526 |
194
- | 0.4070 | 1000 | 0.0080 | 0.7109 | 0.7124 | 0.7117 | 0.9535 |
195
- | 0.8140 | 2000 | 0.0074 | 0.7577 | 0.7114 | 0.7338 | 0.9567 |
196
- | 1.2210 | 3000 | 0.0083 | 0.7183 | 0.7414 | 0.7297 | 0.9554 |
197
- | 1.6280 | 4000 | 0.0088 | 0.6987 | 0.7339 | 0.7159 | 0.9510 |
198
- | 2.0350 | 5000 | 0.0086 | 0.7135 | 0.7296 | 0.7215 | 0.9541 |
199
- | 2.4420 | 6000 | 0.0086 | 0.7167 | 0.7382 | 0.7273 | 0.9559 |
200
- | 2.8490 | 7000 | 0.0088 | 0.7133 | 0.7554 | 0.7337 | 0.9541 |
201
- | 3.2560 | 8000 | 0.0085 | 0.7165 | 0.7511 | 0.7334 | 0.9551 |
202
- | 3.6630 | 9000 | 0.0083 | 0.7263 | 0.7489 | 0.7375 | 0.9561 |
203
 
204
  ### Framework Versions
205
  - Python: 3.10.12
 
101
  from span_marker import SpanMarkerModel
102
 
103
  # Download from the 🤗 Hub
104
+ model = SpanMarkerModel.from_pretrained("iahlt/span-marker-alephbert-small-nemo-mt-he")
105
  # Run inference
106
  entities = model.predict("יו\"ר ועדת ה נוער נתן סלובטיק אמר ש ה שחקנים של אנחנו לא משתלבים ב אירופה.")
107
+ entities
108
  ```
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
 
111
  ## Training Details
112
 
 
129
  - num_epochs: 4
130
  - mixed_precision_training: Native AMP
131
 
132
+
133
+ ### Evaluation results
134
+
135
+ | | 0 |
136
+ |:-----------------------|-----------:|
137
+ | eval_loss | 0.00487611 |
138
+ | eval_overall_precision | 0.822917 |
139
+ | eval_overall_recall | 0.791583 |
140
+ | eval_overall_f1 | 0.806946 |
141
+ | eval_overall_accuracy | 0.969029 |
142
+
143
+ ### Test results
144
+
145
+ | | 0 |
146
+ |:-----------------------|-----------:|
147
+ | test_loss | 0.00652107 |
148
+ | test_overall_precision | 0.747289 |
149
+ | test_overall_recall | 0.73927 |
150
+ | test_overall_f1 | 0.743258 |
151
+ | test_overall_accuracy | 0.960126 |
 
 
 
 
 
 
 
 
 
 
152
 
153
  ### Framework Versions
154
  - Python: 3.10.12