Update README.md
Browse files
README.md
CHANGED
|
@@ -1,96 +1,109 @@
|
|
| 1 |
-
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
license: apache-2.0
|
| 4 |
-
base_model: bert-base-uncased
|
| 5 |
-
tags:
|
| 6 |
-
- generated_from_trainer
|
| 7 |
-
datasets:
|
| 8 |
-
- conll2003
|
| 9 |
-
metrics:
|
| 10 |
-
- precision
|
| 11 |
-
- recall
|
| 12 |
-
- f1
|
| 13 |
-
- accuracy
|
| 14 |
-
model-index:
|
| 15 |
-
- name: bert-ner-conll2003
|
| 16 |
-
results:
|
| 17 |
-
- task:
|
| 18 |
-
name: Token Classification
|
| 19 |
-
type: token-classification
|
| 20 |
-
dataset:
|
| 21 |
-
name: conll2003
|
| 22 |
-
type: conll2003
|
| 23 |
-
config: conll2003
|
| 24 |
-
split: validation
|
| 25 |
-
args: conll2003
|
| 26 |
-
metrics:
|
| 27 |
-
- name: Precision
|
| 28 |
-
type: precision
|
| 29 |
-
value: 0.9414244508542268
|
| 30 |
-
- name: Recall
|
| 31 |
-
type: recall
|
| 32 |
-
value: 0.9493231905134802
|
| 33 |
-
- name: F1
|
| 34 |
-
type: f1
|
| 35 |
-
value: 0.9453573218960619
|
| 36 |
-
- name: Accuracy
|
| 37 |
-
type: accuracy
|
| 38 |
-
value: 0.9865601220074031
|
| 39 |
-
---
|
| 40 |
-
|
| 41 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 42 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 43 |
-
|
| 44 |
-
# bert-ner-conll2003
|
| 45 |
-
|
| 46 |
-
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the conll2003 dataset.
|
| 47 |
-
It achieves the following results on the evaluation set:
|
| 48 |
-
- Loss: 0.0631
|
| 49 |
-
- Precision: 0.9414
|
| 50 |
-
- Recall: 0.9493
|
| 51 |
-
- F1: 0.9454
|
| 52 |
-
- Accuracy: 0.9866
|
| 53 |
-
|
| 54 |
-
## Model description
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: bert-base-uncased
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
datasets:
|
| 8 |
+
- conll2003
|
| 9 |
+
metrics:
|
| 10 |
+
- precision
|
| 11 |
+
- recall
|
| 12 |
+
- f1
|
| 13 |
+
- accuracy
|
| 14 |
+
model-index:
|
| 15 |
+
- name: bert-ner-conll2003
|
| 16 |
+
results:
|
| 17 |
+
- task:
|
| 18 |
+
name: Token Classification
|
| 19 |
+
type: token-classification
|
| 20 |
+
dataset:
|
| 21 |
+
name: conll2003
|
| 22 |
+
type: conll2003
|
| 23 |
+
config: conll2003
|
| 24 |
+
split: validation
|
| 25 |
+
args: conll2003
|
| 26 |
+
metrics:
|
| 27 |
+
- name: Precision
|
| 28 |
+
type: precision
|
| 29 |
+
value: 0.9414244508542268
|
| 30 |
+
- name: Recall
|
| 31 |
+
type: recall
|
| 32 |
+
value: 0.9493231905134802
|
| 33 |
+
- name: F1
|
| 34 |
+
type: f1
|
| 35 |
+
value: 0.9453573218960619
|
| 36 |
+
- name: Accuracy
|
| 37 |
+
type: accuracy
|
| 38 |
+
value: 0.9865601220074031
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 42 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 43 |
+
|
| 44 |
+
# bert-ner-conll2003
|
| 45 |
+
|
| 46 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the conll2003 dataset.
|
| 47 |
+
It achieves the following results on the evaluation set:
|
| 48 |
+
- Loss: 0.0631
|
| 49 |
+
- Precision: 0.9414
|
| 50 |
+
- Recall: 0.9493
|
| 51 |
+
- F1: 0.9454
|
| 52 |
+
- Accuracy: 0.9866
|
| 53 |
+
|
| 54 |
+
## Model description
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 58 |
+
from transformers import pipeline
|
| 59 |
+
|
| 60 |
+
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
| 61 |
+
model = AutoModelForTokenClassification.from_pretrained("PassbyGrocer/bert-ner-conll2003")
|
| 62 |
+
|
| 63 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 64 |
+
example = "My name is Wolfgang and I live in Berlin."
|
| 65 |
+
|
| 66 |
+
ner_results = nlp(example)
|
| 67 |
+
print(ner_results)
|
| 68 |
+
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Intended uses & limitations
|
| 72 |
+
|
| 73 |
+
More information needed
|
| 74 |
+
|
| 75 |
+
## Training and evaluation data
|
| 76 |
+
|
| 77 |
+
More information needed
|
| 78 |
+
|
| 79 |
+
## Training procedure
|
| 80 |
+
|
| 81 |
+
### Training hyperparameters
|
| 82 |
+
|
| 83 |
+
The following hyperparameters were used during training:
|
| 84 |
+
- learning_rate: 2e-05
|
| 85 |
+
- train_batch_size: 16
|
| 86 |
+
- eval_batch_size: 16
|
| 87 |
+
- seed: 42
|
| 88 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 89 |
+
- lr_scheduler_type: linear
|
| 90 |
+
- num_epochs: 5
|
| 91 |
+
- mixed_precision_training: Native AMP
|
| 92 |
+
|
| 93 |
+
### Training results
|
| 94 |
+
|
| 95 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
| 96 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
| 97 |
+
| 0.0844 | 1.0 | 878 | 0.0693 | 0.9029 | 0.9201 | 0.9114 | 0.9806 |
|
| 98 |
+
| 0.0216 | 2.0 | 1756 | 0.0559 | 0.9340 | 0.9444 | 0.9391 | 0.9854 |
|
| 99 |
+
| 0.0206 | 3.0 | 2634 | 0.0569 | 0.9436 | 0.9447 | 0.9442 | 0.9863 |
|
| 100 |
+
| 0.0141 | 4.0 | 3512 | 0.0634 | 0.9369 | 0.9488 | 0.9428 | 0.9860 |
|
| 101 |
+
| 0.0176 | 5.0 | 4390 | 0.0631 | 0.9414 | 0.9493 | 0.9454 | 0.9866 |
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
### Framework versions
|
| 105 |
+
|
| 106 |
+
- Transformers 4.46.1
|
| 107 |
+
- Pytorch 1.13.1+cu116
|
| 108 |
+
- Datasets 3.1.0
|
| 109 |
+
- Tokenizers 0.20.1
|