supreethrao
commited on
Commit
•
5fe64b1
1
Parent(s):
284b48d
Model save
Browse files- README.md +207 -0
- all_results.json +35 -0
- final_checkpoint/README.md +207 -0
- final_checkpoint/added_tokens.json +4 -0
- final_checkpoint/config.json +137 -0
- final_checkpoint/merges.txt +0 -0
- final_checkpoint/model.safetensors +3 -0
- final_checkpoint/special_tokens_map.json +51 -0
- final_checkpoint/tokenizer.json +0 -0
- final_checkpoint/tokenizer_config.json +75 -0
- final_checkpoint/training_args.bin +3 -0
- final_checkpoint/vocab.json +0 -0
- model.safetensors +1 -1
- runs/Nov27_09-44-18_trinity/events.out.tfevents.1701078284.trinity.345806.0 +2 -2
- runs/Nov27_09-44-18_trinity/events.out.tfevents.1701078794.trinity.345806.1 +3 -0
- test_results.json +35 -0
README.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: span-marker
|
3 |
+
tags:
|
4 |
+
- span-marker
|
5 |
+
- token-classification
|
6 |
+
- ner
|
7 |
+
- named-entity-recognition
|
8 |
+
- generated_from_span_marker_trainer
|
9 |
+
datasets:
|
10 |
+
- conll2003
|
11 |
+
metrics:
|
12 |
+
- precision
|
13 |
+
- recall
|
14 |
+
- f1
|
15 |
+
widget:
|
16 |
+
- text: New Zealand Prime Minister Jim Bolger, emerging from coalition talks with
|
17 |
+
the nationalist New Zealand First party on Friday afternoon, said National and
|
18 |
+
NZ First would meet again on Sunday.
|
19 |
+
- text: A police spokesman said two youths believed to be supporters of President
|
20 |
+
Nelson Mandela's African National Congress (ANC) had been killed when unknown
|
21 |
+
gunmen opened fire at the rural settlement of Izingolweni on KwaZulu-Natal province's
|
22 |
+
south coast on Thursday night.
|
23 |
+
- text: Japan's Economic Planning Agency has not changed its view that the economy
|
24 |
+
is gradually recovering, despite relatively weak gross domestic product figures
|
25 |
+
released on Tuesday, EPA Vice Minister Shimpei Nukaya told reporters on Friday.
|
26 |
+
- text: Cuttitta, who trainer George Coste said was certain to play on Saturday week,
|
27 |
+
was named in a 21-man squad lacking only two of the team beaten 54-21 by England
|
28 |
+
at Twickenham last month.
|
29 |
+
- text: Dong Jiong (China) beat Thomas Stuer-Lauridsen (Denmark) 15-10 15-6
|
30 |
+
pipeline_tag: token-classification
|
31 |
+
model-index:
|
32 |
+
- name: SpanMarker
|
33 |
+
results:
|
34 |
+
- task:
|
35 |
+
type: token-classification
|
36 |
+
name: Named Entity Recognition
|
37 |
+
dataset:
|
38 |
+
name: Unknown
|
39 |
+
type: conll2003
|
40 |
+
split: test
|
41 |
+
metrics:
|
42 |
+
- type: f1
|
43 |
+
value: 0.9209646189051223
|
44 |
+
name: F1
|
45 |
+
- type: precision
|
46 |
+
value: 0.9156457822891144
|
47 |
+
name: Precision
|
48 |
+
- type: recall
|
49 |
+
value: 0.9263456090651558
|
50 |
+
name: Recall
|
51 |
+
---
|
52 |
+
|
53 |
+
# SpanMarker
|
54 |
+
|
55 |
+
This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model trained on the [conll2003](https://huggingface.co/datasets/conll2003) dataset that can be used for Named Entity Recognition.
|
56 |
+
|
57 |
+
## Model Details
|
58 |
+
|
59 |
+
### Model Description
|
60 |
+
- **Model Type:** SpanMarker
|
61 |
+
<!-- - **Encoder:** [Unknown](https://huggingface.co/unknown) -->
|
62 |
+
- **Maximum Sequence Length:** 256 tokens
|
63 |
+
- **Maximum Entity Length:** 8 words
|
64 |
+
- **Training Dataset:** [conll2003](https://huggingface.co/datasets/conll2003)
|
65 |
+
<!-- - **Language:** Unknown -->
|
66 |
+
<!-- - **License:** Unknown -->
|
67 |
+
|
68 |
+
### Model Sources
|
69 |
+
|
70 |
+
- **Repository:** [SpanMarker on GitHub](https://github.com/tomaarsen/SpanMarkerNER)
|
71 |
+
- **Thesis:** [SpanMarker For Named Entity Recognition](https://raw.githubusercontent.com/tomaarsen/SpanMarkerNER/main/thesis.pdf)
|
72 |
+
|
73 |
+
### Model Labels
|
74 |
+
| Label | Examples |
|
75 |
+
|:------|:--------------------------------------------------------------|
|
76 |
+
| LOC | "BRUSSELS", "Britain", "Germany" |
|
77 |
+
| MISC | "British", "EU-wide", "German" |
|
78 |
+
| ORG | "European Union", "EU", "European Commission" |
|
79 |
+
| PER | "Nikolaus van der Pas", "Peter Blackburn", "Werner Zwingmann" |
|
80 |
+
|
81 |
+
## Evaluation
|
82 |
+
|
83 |
+
### Metrics
|
84 |
+
| Label | Precision | Recall | F1 |
|
85 |
+
|:--------|:----------|:-------|:-------|
|
86 |
+
| **all** | 0.9156 | 0.9263 | 0.9210 |
|
87 |
+
| LOC | 0.9327 | 0.9394 | 0.9361 |
|
88 |
+
| MISC | 0.7973 | 0.8462 | 0.8210 |
|
89 |
+
| ORG | 0.8987 | 0.9133 | 0.9059 |
|
90 |
+
| PER | 0.9706 | 0.9610 | 0.9658 |
|
91 |
+
|
92 |
+
## Uses
|
93 |
+
|
94 |
+
### Direct Use for Inference
|
95 |
+
|
96 |
+
```python
|
97 |
+
from span_marker import SpanMarkerModel
|
98 |
+
|
99 |
+
# Download from the 🤗 Hub
|
100 |
+
model = SpanMarkerModel.from_pretrained("supreethrao/instructNER_conll03_xl")
|
101 |
+
# Run inference
|
102 |
+
entities = model.predict("Dong Jiong (China) beat Thomas Stuer-Lauridsen (Denmark) 15-10 15-6")
|
103 |
+
```
|
104 |
+
|
105 |
+
### Downstream Use
|
106 |
+
You can finetune this model on your own dataset.
|
107 |
+
|
108 |
+
<details><summary>Click to expand</summary>
|
109 |
+
|
110 |
+
```python
|
111 |
+
from span_marker import SpanMarkerModel, Trainer
|
112 |
+
|
113 |
+
# Download from the 🤗 Hub
|
114 |
+
model = SpanMarkerModel.from_pretrained("supreethrao/instructNER_conll03_xl")
|
115 |
+
|
116 |
+
# Specify a Dataset with "tokens" and "ner_tag" columns
|
117 |
+
dataset = load_dataset("conll2003") # For example CoNLL2003
|
118 |
+
|
119 |
+
# Initialize a Trainer using the pretrained model & dataset
|
120 |
+
trainer = Trainer(
|
121 |
+
model=model,
|
122 |
+
train_dataset=dataset["train"],
|
123 |
+
eval_dataset=dataset["validation"],
|
124 |
+
)
|
125 |
+
trainer.train()
|
126 |
+
trainer.save_model("supreethrao/instructNER_conll03_xl-finetuned")
|
127 |
+
```
|
128 |
+
</details>
|
129 |
+
|
130 |
+
<!--
|
131 |
+
### Out-of-Scope Use
|
132 |
+
|
133 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
134 |
+
-->
|
135 |
+
|
136 |
+
<!--
|
137 |
+
## Bias, Risks and Limitations
|
138 |
+
|
139 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
140 |
+
-->
|
141 |
+
|
142 |
+
<!--
|
143 |
+
### Recommendations
|
144 |
+
|
145 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
146 |
+
-->
|
147 |
+
|
148 |
+
## Training Details
|
149 |
+
|
150 |
+
### Training Set Metrics
|
151 |
+
| Training set | Min | Median | Max |
|
152 |
+
|:----------------------|:----|:--------|:----|
|
153 |
+
| Sentence length | 1 | 14.5019 | 113 |
|
154 |
+
| Entities per sentence | 0 | 1.6736 | 20 |
|
155 |
+
|
156 |
+
### Training Hyperparameters
|
157 |
+
- learning_rate: 5e-05
|
158 |
+
- train_batch_size: 16
|
159 |
+
- eval_batch_size: 16
|
160 |
+
- seed: 42
|
161 |
+
- distributed_type: multi-GPU
|
162 |
+
- num_devices: 2
|
163 |
+
- total_train_batch_size: 32
|
164 |
+
- total_eval_batch_size: 32
|
165 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
166 |
+
- lr_scheduler_type: linear
|
167 |
+
- lr_scheduler_warmup_ratio: 0.1
|
168 |
+
- num_epochs: 3
|
169 |
+
- mixed_precision_training: Native AMP
|
170 |
+
|
171 |
+
### Framework Versions
|
172 |
+
- Python: 3.10.13
|
173 |
+
- SpanMarker: 1.5.0
|
174 |
+
- Transformers: 4.35.2
|
175 |
+
- PyTorch: 2.1.1
|
176 |
+
- Datasets: 2.15.0
|
177 |
+
- Tokenizers: 0.15.0
|
178 |
+
|
179 |
+
## Citation
|
180 |
+
|
181 |
+
### BibTeX
|
182 |
+
```
|
183 |
+
@software{Aarsen_SpanMarker,
|
184 |
+
author = {Aarsen, Tom},
|
185 |
+
license = {Apache-2.0},
|
186 |
+
title = {{SpanMarker for Named Entity Recognition}},
|
187 |
+
url = {https://github.com/tomaarsen/SpanMarkerNER}
|
188 |
+
}
|
189 |
+
```
|
190 |
+
|
191 |
+
<!--
|
192 |
+
## Glossary
|
193 |
+
|
194 |
+
*Clearly define terms in order to be accessible across audiences.*
|
195 |
+
-->
|
196 |
+
|
197 |
+
<!--
|
198 |
+
## Model Card Authors
|
199 |
+
|
200 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
201 |
+
-->
|
202 |
+
|
203 |
+
<!--
|
204 |
+
## Model Card Contact
|
205 |
+
|
206 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
207 |
+
-->
|
all_results.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"test_LOC": {
|
4 |
+
"f1": 0.9360812425328554,
|
5 |
+
"number": 1668,
|
6 |
+
"precision": 0.9327380952380953,
|
7 |
+
"recall": 0.9394484412470024
|
8 |
+
},
|
9 |
+
"test_MISC": {
|
10 |
+
"f1": 0.8210089841050449,
|
11 |
+
"number": 702,
|
12 |
+
"precision": 0.7973154362416107,
|
13 |
+
"recall": 0.8461538461538461
|
14 |
+
},
|
15 |
+
"test_ORG": {
|
16 |
+
"f1": 0.9059420722603764,
|
17 |
+
"number": 1661,
|
18 |
+
"precision": 0.898696682464455,
|
19 |
+
"recall": 0.9133052378085491
|
20 |
+
},
|
21 |
+
"test_PER": {
|
22 |
+
"f1": 0.9658172778123058,
|
23 |
+
"number": 1617,
|
24 |
+
"precision": 0.9706433479075578,
|
25 |
+
"recall": 0.961038961038961
|
26 |
+
},
|
27 |
+
"test_loss": 0.02015703357756138,
|
28 |
+
"test_overall_accuracy": 0.9824701195219123,
|
29 |
+
"test_overall_f1": 0.9209646189051223,
|
30 |
+
"test_overall_precision": 0.9156457822891144,
|
31 |
+
"test_overall_recall": 0.9263456090651558,
|
32 |
+
"test_runtime": 15.7711,
|
33 |
+
"test_samples_per_second": 236.572,
|
34 |
+
"test_steps_per_second": 7.419
|
35 |
+
}
|
final_checkpoint/README.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: span-marker
|
3 |
+
tags:
|
4 |
+
- span-marker
|
5 |
+
- token-classification
|
6 |
+
- ner
|
7 |
+
- named-entity-recognition
|
8 |
+
- generated_from_span_marker_trainer
|
9 |
+
datasets:
|
10 |
+
- conll2003
|
11 |
+
metrics:
|
12 |
+
- precision
|
13 |
+
- recall
|
14 |
+
- f1
|
15 |
+
widget:
|
16 |
+
- text: New Zealand Prime Minister Jim Bolger, emerging from coalition talks with
|
17 |
+
the nationalist New Zealand First party on Friday afternoon, said National and
|
18 |
+
NZ First would meet again on Sunday.
|
19 |
+
- text: A police spokesman said two youths believed to be supporters of President
|
20 |
+
Nelson Mandela's African National Congress (ANC) had been killed when unknown
|
21 |
+
gunmen opened fire at the rural settlement of Izingolweni on KwaZulu-Natal province's
|
22 |
+
south coast on Thursday night.
|
23 |
+
- text: Japan's Economic Planning Agency has not changed its view that the economy
|
24 |
+
is gradually recovering, despite relatively weak gross domestic product figures
|
25 |
+
released on Tuesday, EPA Vice Minister Shimpei Nukaya told reporters on Friday.
|
26 |
+
- text: Cuttitta, who trainer George Coste said was certain to play on Saturday week,
|
27 |
+
was named in a 21-man squad lacking only two of the team beaten 54-21 by England
|
28 |
+
at Twickenham last month.
|
29 |
+
- text: Dong Jiong (China) beat Thomas Stuer-Lauridsen (Denmark) 15-10 15-6
|
30 |
+
pipeline_tag: token-classification
|
31 |
+
model-index:
|
32 |
+
- name: SpanMarker
|
33 |
+
results:
|
34 |
+
- task:
|
35 |
+
type: token-classification
|
36 |
+
name: Named Entity Recognition
|
37 |
+
dataset:
|
38 |
+
name: Unknown
|
39 |
+
type: conll2003
|
40 |
+
split: test
|
41 |
+
metrics:
|
42 |
+
- type: f1
|
43 |
+
value: 0.9209646189051223
|
44 |
+
name: F1
|
45 |
+
- type: precision
|
46 |
+
value: 0.9156457822891144
|
47 |
+
name: Precision
|
48 |
+
- type: recall
|
49 |
+
value: 0.9263456090651558
|
50 |
+
name: Recall
|
51 |
+
---
|
52 |
+
|
53 |
+
# SpanMarker
|
54 |
+
|
55 |
+
This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model trained on the [conll2003](https://huggingface.co/datasets/conll2003) dataset that can be used for Named Entity Recognition.
|
56 |
+
|
57 |
+
## Model Details
|
58 |
+
|
59 |
+
### Model Description
|
60 |
+
- **Model Type:** SpanMarker
|
61 |
+
<!-- - **Encoder:** [Unknown](https://huggingface.co/unknown) -->
|
62 |
+
- **Maximum Sequence Length:** 256 tokens
|
63 |
+
- **Maximum Entity Length:** 8 words
|
64 |
+
- **Training Dataset:** [conll2003](https://huggingface.co/datasets/conll2003)
|
65 |
+
<!-- - **Language:** Unknown -->
|
66 |
+
<!-- - **License:** Unknown -->
|
67 |
+
|
68 |
+
### Model Sources
|
69 |
+
|
70 |
+
- **Repository:** [SpanMarker on GitHub](https://github.com/tomaarsen/SpanMarkerNER)
|
71 |
+
- **Thesis:** [SpanMarker For Named Entity Recognition](https://raw.githubusercontent.com/tomaarsen/SpanMarkerNER/main/thesis.pdf)
|
72 |
+
|
73 |
+
### Model Labels
|
74 |
+
| Label | Examples |
|
75 |
+
|:------|:--------------------------------------------------------------|
|
76 |
+
| LOC | "BRUSSELS", "Britain", "Germany" |
|
77 |
+
| MISC | "British", "EU-wide", "German" |
|
78 |
+
| ORG | "European Union", "EU", "European Commission" |
|
79 |
+
| PER | "Nikolaus van der Pas", "Peter Blackburn", "Werner Zwingmann" |
|
80 |
+
|
81 |
+
## Evaluation
|
82 |
+
|
83 |
+
### Metrics
|
84 |
+
| Label | Precision | Recall | F1 |
|
85 |
+
|:--------|:----------|:-------|:-------|
|
86 |
+
| **all** | 0.9156 | 0.9263 | 0.9210 |
|
87 |
+
| LOC | 0.9327 | 0.9394 | 0.9361 |
|
88 |
+
| MISC | 0.7973 | 0.8462 | 0.8210 |
|
89 |
+
| ORG | 0.8987 | 0.9133 | 0.9059 |
|
90 |
+
| PER | 0.9706 | 0.9610 | 0.9658 |
|
91 |
+
|
92 |
+
## Uses
|
93 |
+
|
94 |
+
### Direct Use for Inference
|
95 |
+
|
96 |
+
```python
|
97 |
+
from span_marker import SpanMarkerModel
|
98 |
+
|
99 |
+
# Download from the 🤗 Hub
|
100 |
+
model = SpanMarkerModel.from_pretrained("supreethrao/instructNER_conll03_xl")
|
101 |
+
# Run inference
|
102 |
+
entities = model.predict("Dong Jiong (China) beat Thomas Stuer-Lauridsen (Denmark) 15-10 15-6")
|
103 |
+
```
|
104 |
+
|
105 |
+
### Downstream Use
|
106 |
+
You can finetune this model on your own dataset.
|
107 |
+
|
108 |
+
<details><summary>Click to expand</summary>
|
109 |
+
|
110 |
+
```python
|
111 |
+
from span_marker import SpanMarkerModel, Trainer
|
112 |
+
|
113 |
+
# Download from the 🤗 Hub
|
114 |
+
model = SpanMarkerModel.from_pretrained("supreethrao/instructNER_conll03_xl")
|
115 |
+
|
116 |
+
# Specify a Dataset with "tokens" and "ner_tag" columns
|
117 |
+
dataset = load_dataset("conll2003") # For example CoNLL2003
|
118 |
+
|
119 |
+
# Initialize a Trainer using the pretrained model & dataset
|
120 |
+
trainer = Trainer(
|
121 |
+
model=model,
|
122 |
+
train_dataset=dataset["train"],
|
123 |
+
eval_dataset=dataset["validation"],
|
124 |
+
)
|
125 |
+
trainer.train()
|
126 |
+
trainer.save_model("supreethrao/instructNER_conll03_xl-finetuned")
|
127 |
+
```
|
128 |
+
</details>
|
129 |
+
|
130 |
+
<!--
|
131 |
+
### Out-of-Scope Use
|
132 |
+
|
133 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
134 |
+
-->
|
135 |
+
|
136 |
+
<!--
|
137 |
+
## Bias, Risks and Limitations
|
138 |
+
|
139 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
140 |
+
-->
|
141 |
+
|
142 |
+
<!--
|
143 |
+
### Recommendations
|
144 |
+
|
145 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
146 |
+
-->
|
147 |
+
|
148 |
+
## Training Details
|
149 |
+
|
150 |
+
### Training Set Metrics
|
151 |
+
| Training set | Min | Median | Max |
|
152 |
+
|:----------------------|:----|:--------|:----|
|
153 |
+
| Sentence length | 1 | 14.5019 | 113 |
|
154 |
+
| Entities per sentence | 0 | 1.6736 | 20 |
|
155 |
+
|
156 |
+
### Training Hyperparameters
|
157 |
+
- learning_rate: 5e-05
|
158 |
+
- train_batch_size: 16
|
159 |
+
- eval_batch_size: 16
|
160 |
+
- seed: 42
|
161 |
+
- distributed_type: multi-GPU
|
162 |
+
- num_devices: 2
|
163 |
+
- total_train_batch_size: 32
|
164 |
+
- total_eval_batch_size: 32
|
165 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
166 |
+
- lr_scheduler_type: linear
|
167 |
+
- lr_scheduler_warmup_ratio: 0.1
|
168 |
+
- num_epochs: 3
|
169 |
+
- mixed_precision_training: Native AMP
|
170 |
+
|
171 |
+
### Framework Versions
|
172 |
+
- Python: 3.10.13
|
173 |
+
- SpanMarker: 1.5.0
|
174 |
+
- Transformers: 4.35.2
|
175 |
+
- PyTorch: 2.1.1
|
176 |
+
- Datasets: 2.15.0
|
177 |
+
- Tokenizers: 0.15.0
|
178 |
+
|
179 |
+
## Citation
|
180 |
+
|
181 |
+
### BibTeX
|
182 |
+
```
|
183 |
+
@software{Aarsen_SpanMarker,
|
184 |
+
author = {Aarsen, Tom},
|
185 |
+
license = {Apache-2.0},
|
186 |
+
title = {{SpanMarker for Named Entity Recognition}},
|
187 |
+
url = {https://github.com/tomaarsen/SpanMarkerNER}
|
188 |
+
}
|
189 |
+
```
|
190 |
+
|
191 |
+
<!--
|
192 |
+
## Glossary
|
193 |
+
|
194 |
+
*Clearly define terms in order to be accessible across audiences.*
|
195 |
+
-->
|
196 |
+
|
197 |
+
<!--
|
198 |
+
## Model Card Authors
|
199 |
+
|
200 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
201 |
+
-->
|
202 |
+
|
203 |
+
<!--
|
204 |
+
## Model Card Contact
|
205 |
+
|
206 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
207 |
+
-->
|
final_checkpoint/added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<end>": 50266,
|
3 |
+
"<start>": 50265
|
4 |
+
}
|
final_checkpoint/config.json
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"SpanMarkerModel"
|
4 |
+
],
|
5 |
+
"encoder": {
|
6 |
+
"_name_or_path": "numind/generic-entity_recognition_NER-v1",
|
7 |
+
"add_cross_attention": false,
|
8 |
+
"architectures": [
|
9 |
+
"RobertaModel"
|
10 |
+
],
|
11 |
+
"attention_probs_dropout_prob": 0.1,
|
12 |
+
"bad_words_ids": null,
|
13 |
+
"begin_suppress_tokens": null,
|
14 |
+
"bos_token_id": 0,
|
15 |
+
"chunk_size_feed_forward": 0,
|
16 |
+
"classifier_dropout": null,
|
17 |
+
"cross_attention_hidden_size": null,
|
18 |
+
"decoder_start_token_id": null,
|
19 |
+
"diversity_penalty": 0.0,
|
20 |
+
"do_sample": false,
|
21 |
+
"early_stopping": false,
|
22 |
+
"encoder_no_repeat_ngram_size": 0,
|
23 |
+
"eos_token_id": 2,
|
24 |
+
"exponential_decay_length_penalty": null,
|
25 |
+
"finetuning_task": null,
|
26 |
+
"forced_bos_token_id": null,
|
27 |
+
"forced_eos_token_id": null,
|
28 |
+
"hidden_act": "gelu",
|
29 |
+
"hidden_dropout_prob": 0.1,
|
30 |
+
"hidden_size": 768,
|
31 |
+
"id2label": {
|
32 |
+
"0": "O",
|
33 |
+
"1": "B-PER",
|
34 |
+
"2": "I-PER",
|
35 |
+
"3": "B-ORG",
|
36 |
+
"4": "I-ORG",
|
37 |
+
"5": "B-LOC",
|
38 |
+
"6": "I-LOC",
|
39 |
+
"7": "B-MISC",
|
40 |
+
"8": "I-MISC"
|
41 |
+
},
|
42 |
+
"initializer_range": 0.02,
|
43 |
+
"intermediate_size": 3072,
|
44 |
+
"is_decoder": false,
|
45 |
+
"is_encoder_decoder": false,
|
46 |
+
"label2id": {
|
47 |
+
"B-LOC": 5,
|
48 |
+
"B-MISC": 7,
|
49 |
+
"B-ORG": 3,
|
50 |
+
"B-PER": 1,
|
51 |
+
"I-LOC": 6,
|
52 |
+
"I-MISC": 8,
|
53 |
+
"I-ORG": 4,
|
54 |
+
"I-PER": 2,
|
55 |
+
"O": 0
|
56 |
+
},
|
57 |
+
"layer_norm_eps": 1e-05,
|
58 |
+
"length_penalty": 1.0,
|
59 |
+
"max_length": 20,
|
60 |
+
"max_position_embeddings": 514,
|
61 |
+
"min_length": 0,
|
62 |
+
"model_type": "roberta",
|
63 |
+
"no_repeat_ngram_size": 0,
|
64 |
+
"num_attention_heads": 12,
|
65 |
+
"num_beam_groups": 1,
|
66 |
+
"num_beams": 1,
|
67 |
+
"num_hidden_layers": 12,
|
68 |
+
"num_return_sequences": 1,
|
69 |
+
"output_attentions": false,
|
70 |
+
"output_hidden_states": false,
|
71 |
+
"output_scores": false,
|
72 |
+
"pad_token_id": 1,
|
73 |
+
"position_embedding_type": "absolute",
|
74 |
+
"prefix": null,
|
75 |
+
"problem_type": null,
|
76 |
+
"pruned_heads": {},
|
77 |
+
"remove_invalid_values": false,
|
78 |
+
"repetition_penalty": 1.0,
|
79 |
+
"return_dict": true,
|
80 |
+
"return_dict_in_generate": false,
|
81 |
+
"sep_token_id": null,
|
82 |
+
"suppress_tokens": null,
|
83 |
+
"task_specific_params": null,
|
84 |
+
"temperature": 1.0,
|
85 |
+
"tf_legacy_loss": false,
|
86 |
+
"tie_encoder_decoder": false,
|
87 |
+
"tie_word_embeddings": true,
|
88 |
+
"tokenizer_class": null,
|
89 |
+
"top_k": 50,
|
90 |
+
"top_p": 1.0,
|
91 |
+
"torch_dtype": "float32",
|
92 |
+
"torchscript": false,
|
93 |
+
"transformers_version": "4.35.2",
|
94 |
+
"type_vocab_size": 1,
|
95 |
+
"typical_p": 1.0,
|
96 |
+
"use_bfloat16": false,
|
97 |
+
"use_cache": true,
|
98 |
+
"vocab_size": 50272
|
99 |
+
},
|
100 |
+
"entity_max_length": 8,
|
101 |
+
"id2label": {
|
102 |
+
"0": "O",
|
103 |
+
"1": "LOC",
|
104 |
+
"2": "MISC",
|
105 |
+
"3": "ORG",
|
106 |
+
"4": "PER"
|
107 |
+
},
|
108 |
+
"id2reduced_id": {
|
109 |
+
"0": 0,
|
110 |
+
"1": 4,
|
111 |
+
"2": 4,
|
112 |
+
"3": 3,
|
113 |
+
"4": 3,
|
114 |
+
"5": 1,
|
115 |
+
"6": 1,
|
116 |
+
"7": 2,
|
117 |
+
"8": 2
|
118 |
+
},
|
119 |
+
"label2id": {
|
120 |
+
"LOC": 1,
|
121 |
+
"MISC": 2,
|
122 |
+
"O": 0,
|
123 |
+
"ORG": 3,
|
124 |
+
"PER": 4
|
125 |
+
},
|
126 |
+
"marker_max_length": 128,
|
127 |
+
"max_next_context": null,
|
128 |
+
"max_prev_context": null,
|
129 |
+
"model_max_length": 256,
|
130 |
+
"model_max_length_default": 512,
|
131 |
+
"model_type": "span-marker",
|
132 |
+
"span_marker_version": "1.5.0",
|
133 |
+
"torch_dtype": "float32",
|
134 |
+
"trained_with_document_context": false,
|
135 |
+
"transformers_version": "4.35.2",
|
136 |
+
"vocab_size": 50272
|
137 |
+
}
|
final_checkpoint/merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
final_checkpoint/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49b36674a4a2212103babf7c89a480f28beda539fe2405b40e600e9d7ecdf78f
|
3 |
+
size 498658900
|
final_checkpoint/special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": true,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
final_checkpoint/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
final_checkpoint/tokenizer_config.json
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": true,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": true,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
},
|
44 |
+
"50265": {
|
45 |
+
"content": "<start>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false,
|
50 |
+
"special": true
|
51 |
+
},
|
52 |
+
"50266": {
|
53 |
+
"content": "<end>",
|
54 |
+
"lstrip": false,
|
55 |
+
"normalized": false,
|
56 |
+
"rstrip": false,
|
57 |
+
"single_word": false,
|
58 |
+
"special": true
|
59 |
+
}
|
60 |
+
},
|
61 |
+
"bos_token": "<s>",
|
62 |
+
"clean_up_tokenization_spaces": true,
|
63 |
+
"cls_token": "<s>",
|
64 |
+
"entity_max_length": 8,
|
65 |
+
"eos_token": "</s>",
|
66 |
+
"errors": "replace",
|
67 |
+
"marker_max_length": 128,
|
68 |
+
"mask_token": "<mask>",
|
69 |
+
"model_max_length": 256,
|
70 |
+
"pad_token": "<pad>",
|
71 |
+
"sep_token": "</s>",
|
72 |
+
"tokenizer_class": "RobertaTokenizer",
|
73 |
+
"trim_offsets": true,
|
74 |
+
"unk_token": "<unk>"
|
75 |
+
}
|
final_checkpoint/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6e59b483ca68e24f1af6db4be79ca4aa90ec0e5631888f05062697b0b3dc48b1
|
3 |
+
size 4600
|
final_checkpoint/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 498658900
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49b36674a4a2212103babf7c89a480f28beda539fe2405b40e600e9d7ecdf78f
|
3 |
size 498658900
|
runs/Nov27_09-44-18_trinity/events.out.tfevents.1701078284.trinity.345806.0
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4dff3ed0449f13d553a02e4935997ce29311a5e8bcb78641b80d40fd2bebe9d0
|
3 |
+
size 11664
|
runs/Nov27_09-44-18_trinity/events.out.tfevents.1701078794.trinity.345806.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5be057ef897b6aa91ef00edc804d80f62ee318a892ca1d7e71a0b189e485cb86
|
3 |
+
size 592
|
test_results.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"test_LOC": {
|
4 |
+
"f1": 0.9360812425328554,
|
5 |
+
"number": 1668,
|
6 |
+
"precision": 0.9327380952380953,
|
7 |
+
"recall": 0.9394484412470024
|
8 |
+
},
|
9 |
+
"test_MISC": {
|
10 |
+
"f1": 0.8210089841050449,
|
11 |
+
"number": 702,
|
12 |
+
"precision": 0.7973154362416107,
|
13 |
+
"recall": 0.8461538461538461
|
14 |
+
},
|
15 |
+
"test_ORG": {
|
16 |
+
"f1": 0.9059420722603764,
|
17 |
+
"number": 1661,
|
18 |
+
"precision": 0.898696682464455,
|
19 |
+
"recall": 0.9133052378085491
|
20 |
+
},
|
21 |
+
"test_PER": {
|
22 |
+
"f1": 0.9658172778123058,
|
23 |
+
"number": 1617,
|
24 |
+
"precision": 0.9706433479075578,
|
25 |
+
"recall": 0.961038961038961
|
26 |
+
},
|
27 |
+
"test_loss": 0.02015703357756138,
|
28 |
+
"test_overall_accuracy": 0.9824701195219123,
|
29 |
+
"test_overall_f1": 0.9209646189051223,
|
30 |
+
"test_overall_precision": 0.9156457822891144,
|
31 |
+
"test_overall_recall": 0.9263456090651558,
|
32 |
+
"test_runtime": 15.7711,
|
33 |
+
"test_samples_per_second": 236.572,
|
34 |
+
"test_steps_per_second": 7.419
|
35 |
+
}
|