joshdevins commited on
Commit
d1d5174
1 Parent(s): 3d47d86

Initial commit

Browse files
README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ datasets:
5
+ - conll2003
6
+ ---
7
+
8
+ [DistilBERT base uncased](https://huggingface.co/distilbert-base-uncased), fine-tuned for NER using the [conll03 english dataset](https://huggingface.co/datasets/conll2003).
9
+
10
+ ## Versions
11
+
12
+ - Transformers version: 4.3.1
13
+ - Datasets version: 1.3.0
14
+
15
+ ## Training
16
+
17
+ ```
18
+ $ run_ner.py \
19
+ --model_name_or_path distilbert-base-uncased \
20
+ --label_all_tokens True \
21
+ --return_entity_level_metrics True \
22
+ --dataset_name conll2003 \
23
+ --output_dir /tmp/distilbert-base-uncased-finetuned-conll03-english \
24
+ --do_train \
25
+ --do_eval
26
+ ```
27
+
28
+ After training, we update the labels to match the NER specific labels from the
29
+ dataset [conll2003](https://raw.githubusercontent.com/huggingface/datasets/1.3.0/datasets/conll2003/dataset_infos.json)
config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilbert-base-uncased",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertForTokenClassification"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "finetuning_task": "ner",
11
+ "hidden_dim": 3072,
12
+ "id2label": {
13
+ "0": "O",
14
+ "1": "B-PER",
15
+ "2": "I-PER",
16
+ "3": "B-ORG",
17
+ "4": "I-ORG",
18
+ "5": "B-LOC",
19
+ "6": "I-LOC",
20
+ "7": "B-MISC",
21
+ "8": "I-MISC"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "label2id": {
25
+ "B-LOC": 5,
26
+ "B-MISC": 7,
27
+ "B-ORG": 3,
28
+ "B-PER": 1,
29
+ "I-LOC": 6,
30
+ "I-MISC": 8,
31
+ "I-ORG": 4,
32
+ "I-PER": 2,
33
+ "O": 0
34
+ },
35
+ "max_position_embeddings": 512,
36
+ "model_type": "distilbert",
37
+ "n_heads": 12,
38
+ "n_layers": 6,
39
+ "pad_token_id": 0,
40
+ "qa_dropout": 0.1,
41
+ "seq_classif_dropout": 0.2,
42
+ "sinusoidal_pos_embds": false,
43
+ "tie_weights_": true,
44
+ "transformers_version": "4.3.1",
45
+ "vocab_size": 30522
46
+ }
eval_results_ner.txt ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ eval_loss = 0.06388235837221146
2
+ eval_LOC_precision = 0.9601215343714394
3
+ eval_LOC_recall = 0.9656226126814362
4
+ eval_LOC_f1 = 0.962864216339745
5
+ eval_LOC_number = 2618
6
+ eval_MISC_precision = 0.848582995951417
7
+ eval_MISC_recall = 0.851340373679935
8
+ eval_MISC_f1 = 0.8499594484995945
9
+ eval_MISC_number = 1231
10
+ eval_ORG_precision = 0.8968140751307656
11
+ eval_ORG_recall = 0.9173151750972762
12
+ eval_ORG_f1 = 0.9069487857658092
13
+ eval_ORG_number = 2056
14
+ eval_PER_precision = 0.9727242852448242
15
+ eval_PER_recall = 0.975609756097561
16
+ eval_PER_f1 = 0.9741648839888103
17
+ eval_PER_number = 3034
18
+ eval_overall_precision = 0.9343243842911028
19
+ eval_overall_recall = 0.9421635529701309
20
+ eval_overall_f1 = 0.9382275942739376
21
+ eval_overall_accuracy = 0.9854321889843837
22
+ eval_runtime = 128.0613
23
+ eval_samples_per_second = 25.378
24
+ epoch = 3.0
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:806a4e6025a37a7a9646904397489f213e68c8822c421b34b4d687f8f3fd5a8f
3
+ size 265520427
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "name_or_path": "distilbert-base-uncased"}
train_results.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ epoch = 3.0
2
+ train_runtime = 7133.5904
3
+ train_samples_per_second = 0.738
trainer_state.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.0,
5
+ "global_step": 5268,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.28,
12
+ "learning_rate": 4.525436598329537e-05,
13
+ "loss": 0.2141,
14
+ "step": 500
15
+ },
16
+ {
17
+ "epoch": 0.57,
18
+ "learning_rate": 4.050873196659074e-05,
19
+ "loss": 0.094,
20
+ "step": 1000
21
+ },
22
+ {
23
+ "epoch": 0.85,
24
+ "learning_rate": 3.5763097949886106e-05,
25
+ "loss": 0.0717,
26
+ "step": 1500
27
+ },
28
+ {
29
+ "epoch": 1.14,
30
+ "learning_rate": 3.1017463933181475e-05,
31
+ "loss": 0.0561,
32
+ "step": 2000
33
+ },
34
+ {
35
+ "epoch": 1.42,
36
+ "learning_rate": 2.6271829916476843e-05,
37
+ "loss": 0.0359,
38
+ "step": 2500
39
+ },
40
+ {
41
+ "epoch": 1.71,
42
+ "learning_rate": 2.152619589977221e-05,
43
+ "loss": 0.0357,
44
+ "step": 3000
45
+ },
46
+ {
47
+ "epoch": 1.99,
48
+ "learning_rate": 1.678056188306758e-05,
49
+ "loss": 0.0347,
50
+ "step": 3500
51
+ },
52
+ {
53
+ "epoch": 2.28,
54
+ "learning_rate": 1.2034927866362947e-05,
55
+ "loss": 0.0151,
56
+ "step": 4000
57
+ },
58
+ {
59
+ "epoch": 2.56,
60
+ "learning_rate": 7.289293849658315e-06,
61
+ "loss": 0.0156,
62
+ "step": 4500
63
+ },
64
+ {
65
+ "epoch": 2.85,
66
+ "learning_rate": 2.5436598329536827e-06,
67
+ "loss": 0.014,
68
+ "step": 5000
69
+ },
70
+ {
71
+ "epoch": 3.0,
72
+ "step": 5268,
73
+ "total_flos": 696221070844428,
74
+ "train_runtime": 7133.5904,
75
+ "train_samples_per_second": 0.738
76
+ }
77
+ ],
78
+ "max_steps": 5268,
79
+ "num_train_epochs": 3,
80
+ "total_flos": 696221070844428,
81
+ "trial_name": null,
82
+ "trial_params": null
83
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8829495baa1a2259f501a4f578cbadd01af4203b57ffe21e6c39fe76825838e
3
+ size 2159
vocab.txt ADDED
The diff for this file is too large to render. See raw diff