File size: 2,488 Bytes
b57c49e
 
 
 
 
 
 
 
 
 
 
 
 
0b6510f
 
 
 
 
 
b57c49e
 
 
 
 
4e4e8b6
b57c49e
 
9d2387f
 
 
b57c49e
 
 
 
 
 
976c2f1
 
 
 
 
 
 
 
9d2387f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b57c49e
 
 
976c2f1
 
b57c49e
 
 
 
 
 
 
 
 
 
 
45f4ee1
b57c49e
 
 
 
 
 
976c2f1
45f4ee1
976c2f1
 
 
 
 
 
 
45f4ee1
 
b57c49e
 
 
 
 
0b6510f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
97
98
99
---
license: mit
base_model: numind/entity-recognition-general-sota-v1
tags:
- generated_from_trainer
metrics:
- precision
- recall
- f1
- accuracy
model-index:
- name: entity-recognition-general-sota-v1-finetuned-ner-X
  results: []
datasets:
- Babelscape/multinerd
language:
- en
library_name: transformers
pipeline_tag: token-classification
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

## Model description
# entity-recognition-general-sota-v1-finetuned-ner-X

This model is a fine-tuned version of [numind/entity-recognition-general-sota-v1](https://huggingface.co/numind/entity-recognition-general-sota-v1) on an Babelscape/MultiNerd dataset.

It achieves the following results on the validation set:
- Loss: 0.0228
- Precision: 0.9472
- Recall: 0.9621
- F1: 0.9546
- Accuracy: 0.9915


## Training and evaluation data

The dataset if filtered on english language and sampled first 1M on train and 100k on validation.
further filtered with data containing atleast one tag from labels2ids mentioned below.
Train data - 110723 items
Validation data - 13126 items

Trained on below listed tags from the MultiNERD dataset.

labels2ids_B = {
    "O": 0,
    "B-PER": 1,
    "I-PER": 2,
    "B-ORG": 3,
    "I-ORG": 4,
    "B-LOC": 5,
    "I-LOC": 6,
    "B-ANIM": 7,
    "I-ANIM": 8,
    "B-DIS": 9,
    "I-DIS": 10
  }

## Training procedure

HF Trainer module

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 35
- eval_batch_size: 35
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 1

### Training & Test set evaluation results

| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1     | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
| 0.0214        | 1.0   | 3164 | 0.0228          | 0.9472    | 0.9621 | 0.9546 | 0.9915   |


Test set Evaluation results:
{
'eval_loss': 0.017866812646389008,
 'eval_precision': 0.9557654500384648,
 'eval_recall': 0.9739558381603589,
 'eval_accuracy': 0.9931328078645237,
 'eval_runtime': 109.6919,
 'eval_samples_per_second': 269.045,
 'eval_steps_per_second': 33.631
 }

### Framework versions

- Transformers 4.35.2
- Pytorch 2.1.0+cu118
- Datasets 2.15.0
- Tokenizers 0.15.0