Update README.md
Browse files
README.md
CHANGED
@@ -17,12 +17,23 @@ should probably proofread and complete it, then remove this comment. -->
|
|
17 |
# span-marker-robert-base
|
18 |
|
19 |
This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on [few-nerd](https://huggingface.co/datasets/DFKI-SLT/few-nerd) dataset using [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) an module for NER.
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
## Training and evaluation data
|
28 |
|
@@ -40,6 +51,15 @@ The following hyperparameters were used during training:
|
|
40 |
- lr_scheduler_warmup_ratio: 0.1
|
41 |
- num_epochs: 1
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
### Training results
|
44 |
|
45 |
| Training Loss | Epoch | Step | Validation Loss | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
@@ -63,4 +83,5 @@ The following hyperparameters were used during training:
|
|
63 |
- Transformers 4.30.2
|
64 |
- Pytorch 2.0.1+cu118
|
65 |
- Datasets 2.13.1
|
66 |
-
- Tokenizers 0.13.3
|
|
|
|
17 |
# span-marker-robert-base
|
18 |
|
19 |
This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on [few-nerd](https://huggingface.co/datasets/DFKI-SLT/few-nerd) dataset using [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) an module for NER.
|
20 |
+
|
21 |
+
# Usage
|
22 |
+
|
23 |
+
```python
|
24 |
+
test_query= [
|
25 |
+
"The 2022 FIFA World Cup was the 22nd FIFA World Cup, the quadrennial world championship for national football teams organized by FIFA.",
|
26 |
+
"Argentina were crowned the champions after winning the final against the title holder France 4-2 on penalties following a 3-3 draw after extra time.",
|
27 |
+
"It was Argentina's third title and their first since 1986, as well being the first nation from outside of Europe to win the tournament since 2002.",
|
28 |
+
"French player Kylian Mbappé became the first player to score a hat-trick in a World Cup final since Geoff Hurst in the 1966 final and won the Golden Boot as he scored the most goals (eight) during the tournament.",
|
29 |
+
"Argentine captain Lionel Messi was voted the tournament's best player, winning the Golden Ball. Teammates Emiliano Martínez and Enzo Fernández won the Golden Glove, awarded to the tournament's best goalkeeper, and the Young Player Award, awarded to the tournament's best young player."
|
30 |
+
]
|
31 |
+
entities_per_query = model.predict(test_query)
|
32 |
+
|
33 |
+
for entities in entities_per_query:
|
34 |
+
for entity in entities:
|
35 |
+
print(entity["span"], "=>", entity["label"])
|
36 |
+
```
|
37 |
|
38 |
## Training and evaluation data
|
39 |
|
|
|
51 |
- lr_scheduler_warmup_ratio: 0.1
|
52 |
- num_epochs: 1
|
53 |
|
54 |
+
### Evaluation
|
55 |
+
|
56 |
+
It achieves the following results on the evaluation set:
|
57 |
+
- Loss: 0.0214
|
58 |
+
- Overall Precision: 0.7642
|
59 |
+
- Overall Recall: 0.7947
|
60 |
+
- Overall F1: 0.7791
|
61 |
+
- Overall Accuracy: 0.9397
|
62 |
+
-
|
63 |
### Training results
|
64 |
|
65 |
| Training Loss | Epoch | Step | Validation Loss | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
|
|
83 |
- Transformers 4.30.2
|
84 |
- Pytorch 2.0.1+cu118
|
85 |
- Datasets 2.13.1
|
86 |
+
- Tokenizers 0.13.3
|
87 |
+
- span-marker 1.2.3
|