arnabdhar commited on
Commit
b02f94a
1 Parent(s): 4f0a323

Updated README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -6
README.md CHANGED
@@ -16,7 +16,26 @@ metrics:
16
  - accuracy
17
  model-index:
18
  - name: bert-tiny-ontonotes
19
- results: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  ---
21
 
22
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
@@ -24,7 +43,7 @@ should probably proofread and complete it, then remove this comment. -->
24
 
25
  # bert-tiny-ontonotes
26
 
27
- This model is a fine-tuned version of [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny) on the tner/ontonotes5 dataset.
28
  It achieves the following results on the evaluation set:
29
  - Loss: 0.1917
30
  - Recall: 0.7193
@@ -32,20 +51,82 @@ It achieves the following results on the evaluation set:
32
  - F1: 0.7000
33
  - Accuracy: 0.9476
34
 
35
- ## Model description
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- More information needed
38
 
39
  ## Intended uses & limitations
40
 
41
- More information needed
 
 
 
 
42
 
43
  ## Training and evaluation data
44
 
45
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  ## Training procedure
48
 
 
 
49
  ### Training hyperparameters
50
 
51
  The following hyperparameters were used during training:
 
16
  - accuracy
17
  model-index:
18
  - name: bert-tiny-ontonotes
19
+ results:
20
+ - task:
21
+ type: token-classification
22
+ metrics:
23
+ - type: accuracy
24
+ value: 0.9476
25
+ name: accuracy
26
+ - type: precision
27
+ value: 0.6817
28
+ name: precision
29
+ - type: accuracy
30
+ value: 0.7193
31
+ name: recall
32
+ - type: accuracy
33
+ value: 0.7
34
+ name: F1
35
+ datasets:
36
+ - tner/ontonotes5
37
+ library_name: transformers
38
+ pipeline_tag: token-classification
39
  ---
40
 
41
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
 
43
 
44
  # bert-tiny-ontonotes
45
 
46
+ This model is a fine-tuned version of [prajjwal1/bert-tiny](https://huggingface.co/prajjwal1/bert-tiny) on the [tner/ontonotes5](https://huggingface.co/datasets/tner/ontonotes5) dataset.
47
  It achieves the following results on the evaluation set:
48
  - Loss: 0.1917
49
  - Recall: 0.7193
 
51
  - F1: 0.7000
52
  - Accuracy: 0.9476
53
 
54
+ ## How to use the Model
55
+
56
+ ### Using pipeline
57
+
58
+ ```python
59
+ from transformers import pipeline
60
+ import torch
61
+
62
+ # Initiate the pipeline
63
+ device = 0 if torch.cuda.is_available() else 'cpu'
64
+ ner = pipeline("token-classification", "arnabdhar/bert-tiny-ontonotes", device=device)
65
+
66
+ # use the pipeline
67
+ input_text = "My name is Clara and I live in Berkeley, California."
68
+ results = ner(input_text)
69
+ ```
70
 
 
71
 
72
  ## Intended uses & limitations
73
 
74
+ This model is fine-tuned for **Named Entity Recognition** task and you can use the model as it is or can use this model as a base model for further fine tuning on your custom dataset.
75
+
76
+ The following entities were fine-tuned on:
77
+ CARDINAL, DATE, PERSON, NORP, GPE, LAW, PERCENT, ORDINAL, MONEY, WORK_OF_ART, FAC, TIME, QUANTITY, PRODUCT, LANGUAGE, ORG, LOC, EVENT
78
+
79
 
80
  ## Training and evaluation data
81
 
82
+ The dataset has 3 partitions, `train`, `validation` and `test`, all the 3 partitions were combined and then a 80:20 train-test split was made for finet uning process. The following `ID2LABEL` mapping was used.
83
+
84
+ ```json
85
+ {
86
+ "0": "O",
87
+ "1": "B-CARDINAL",
88
+ "2": "B-DATE",
89
+ "3": "I-DATE",
90
+ "4": "B-PERSON",
91
+ "5": "I-PERSON",
92
+ "6": "B-NORP",
93
+ "7": "B-GPE",
94
+ "8": "I-GPE",
95
+ "9": "B-LAW",
96
+ "10": "I-LAW",
97
+ "11": "B-ORG",
98
+ "12": "I-ORG",
99
+ "13": "B-PERCENT",
100
+ "14": "I-PERCENT",
101
+ "15": "B-ORDINAL",
102
+ "16": "B-MONEY",
103
+ "17": "I-MONEY",
104
+ "18": "B-WORK_OF_ART",
105
+ "19": "I-WORK_OF_ART",
106
+ "20": "B-FAC",
107
+ "21": "B-TIME",
108
+ "22": "I-CARDINAL",
109
+ "23": "B-LOC",
110
+ "24": "B-QUANTITY",
111
+ "25": "I-QUANTITY",
112
+ "26": "I-NORP",
113
+ "27": "I-LOC",
114
+ "28": "B-PRODUCT",
115
+ "29": "I-TIME",
116
+ "30": "B-EVENT",
117
+ "31": "I-EVENT",
118
+ "32": "I-FAC",
119
+ "33": "B-LANGUAGE",
120
+ "34": "I-PRODUCT",
121
+ "35": "I-ORDINAL",
122
+ "36": "I-LANGUAGE"
123
+ }
124
+ ```
125
 
126
  ## Training procedure
127
 
128
+ The model was finetuned on Google Colab with a __NVIDIA T4__ GPU with 15GB of VRAM. It took around 5 minutes to fine tune and evaluate the model with 6000 steps of total training steps. For more details, you can look into the [Weights & Biases](https://wandb.ai/2wb2ndur/NER-ontonotes/runs/d93imv8j/overview?workspace=user-2wb2ndur) log history.
129
+
130
  ### Training hyperparameters
131
 
132
  The following hyperparameters were used during training: