Dagobert42
commited on
Commit
•
70a3228
1
Parent(s):
6a20fb0
Push xlnet/xlnet-base-cased trained on biored-original_splits.pt
Browse files- README.md +82 -0
- config.json +61 -0
- model.safetensors +3 -0
- special_tokens_map.json +19 -0
- tokenizer.json +0 -0
- tokenizer_config.json +94 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: mit
|
5 |
+
base_model: xlnet-base-cased
|
6 |
+
tags:
|
7 |
+
- low-resource NER
|
8 |
+
- token_classification
|
9 |
+
- biomedicine
|
10 |
+
- medical NER
|
11 |
+
- generated_from_trainer
|
12 |
+
datasets:
|
13 |
+
- medicine
|
14 |
+
metrics:
|
15 |
+
- accuracy
|
16 |
+
- precision
|
17 |
+
- recall
|
18 |
+
- f1
|
19 |
+
model-index:
|
20 |
+
- name: Dagobert42/xlnet-base-cased-biored-finetuned
|
21 |
+
results: []
|
22 |
+
---
|
23 |
+
|
24 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
25 |
+
should probably proofread and complete it, then remove this comment. -->
|
26 |
+
|
27 |
+
# Dagobert42/xlnet-base-cased-biored-finetuned
|
28 |
+
|
29 |
+
This model is a fine-tuned version of [xlnet-base-cased](https://huggingface.co/xlnet-base-cased) on the bigbio/biored dataset.
|
30 |
+
It achieves the following results on the evaluation set:
|
31 |
+
- Loss: 0.7341
|
32 |
+
- Accuracy: 0.7714
|
33 |
+
- Precision: 0.5341
|
34 |
+
- Recall: 0.4169
|
35 |
+
- F1: 0.4594
|
36 |
+
- Weighted F1: 0.7495
|
37 |
+
|
38 |
+
## Model description
|
39 |
+
|
40 |
+
More information needed
|
41 |
+
|
42 |
+
## Intended uses & limitations
|
43 |
+
|
44 |
+
More information needed
|
45 |
+
|
46 |
+
## Training and evaluation data
|
47 |
+
|
48 |
+
More information needed
|
49 |
+
|
50 |
+
## Training procedure
|
51 |
+
|
52 |
+
### Training hyperparameters
|
53 |
+
|
54 |
+
The following hyperparameters were used during training:
|
55 |
+
- learning_rate: 2e-05
|
56 |
+
- train_batch_size: 8
|
57 |
+
- eval_batch_size: 8
|
58 |
+
- seed: 42
|
59 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
60 |
+
- lr_scheduler_type: linear
|
61 |
+
- num_epochs: 50
|
62 |
+
|
63 |
+
### Training results
|
64 |
+
|
65 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | Weighted F1 |
|
66 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|:-----------:|
|
67 |
+
| No log | 1.0 | 25 | 0.8831 | 0.7377 | 0.4536 | 0.2481 | 0.2822 | 0.6719 |
|
68 |
+
| No log | 2.0 | 50 | 0.8309 | 0.7542 | 0.6035 | 0.3177 | 0.3598 | 0.6933 |
|
69 |
+
| No log | 3.0 | 75 | 0.7695 | 0.7624 | 0.568 | 0.3566 | 0.409 | 0.7189 |
|
70 |
+
| No log | 4.0 | 100 | 0.7562 | 0.7676 | 0.5536 | 0.3886 | 0.4398 | 0.7343 |
|
71 |
+
| No log | 5.0 | 125 | 0.7540 | 0.7673 | 0.5711 | 0.4013 | 0.4474 | 0.7368 |
|
72 |
+
| No log | 6.0 | 150 | 0.7425 | 0.7754 | 0.5867 | 0.4398 | 0.4873 | 0.7514 |
|
73 |
+
| No log | 7.0 | 175 | 0.7806 | 0.7788 | 0.606 | 0.4235 | 0.473 | 0.7475 |
|
74 |
+
| No log | 8.0 | 200 | 0.7638 | 0.7785 | 0.558 | 0.4547 | 0.4871 | 0.7549 |
|
75 |
+
|
76 |
+
|
77 |
+
### Framework versions
|
78 |
+
|
79 |
+
- Transformers 4.35.2
|
80 |
+
- Pytorch 2.0.1+cu117
|
81 |
+
- Datasets 2.12.0
|
82 |
+
- Tokenizers 0.15.0
|
config.json
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "xlnet/xlnet-base-cased",
|
3 |
+
"architectures": [
|
4 |
+
"XLNetForTokenClassification"
|
5 |
+
],
|
6 |
+
"attn_type": "bi",
|
7 |
+
"bi_data": false,
|
8 |
+
"bos_token_id": 1,
|
9 |
+
"clamp_len": -1,
|
10 |
+
"d_head": 64,
|
11 |
+
"d_inner": 3072,
|
12 |
+
"d_model": 768,
|
13 |
+
"dropout": 0.1,
|
14 |
+
"end_n_top": 5,
|
15 |
+
"eos_token_id": 2,
|
16 |
+
"ff_activation": "gelu",
|
17 |
+
"id2label": {
|
18 |
+
"0": "null",
|
19 |
+
"1": "GeneOrGeneProduct",
|
20 |
+
"2": "DiseaseOrPhenotypicFeature",
|
21 |
+
"3": "ChemicalEntity",
|
22 |
+
"4": "OrganismTaxon",
|
23 |
+
"5": "SequenceVariant",
|
24 |
+
"6": "CellLine"
|
25 |
+
},
|
26 |
+
"initializer_range": 0.02,
|
27 |
+
"label2id": {
|
28 |
+
"CellLine": 6,
|
29 |
+
"ChemicalEntity": 3,
|
30 |
+
"DiseaseOrPhenotypicFeature": 2,
|
31 |
+
"GeneOrGeneProduct": 1,
|
32 |
+
"OrganismTaxon": 4,
|
33 |
+
"SequenceVariant": 5,
|
34 |
+
"null": 0
|
35 |
+
},
|
36 |
+
"layer_norm_eps": 1e-12,
|
37 |
+
"mem_len": null,
|
38 |
+
"model_type": "xlnet",
|
39 |
+
"n_head": 12,
|
40 |
+
"n_layer": 12,
|
41 |
+
"pad_token_id": 5,
|
42 |
+
"reuse_len": null,
|
43 |
+
"same_length": false,
|
44 |
+
"start_n_top": 5,
|
45 |
+
"summary_activation": "tanh",
|
46 |
+
"summary_last_dropout": 0.1,
|
47 |
+
"summary_type": "last",
|
48 |
+
"summary_use_proj": true,
|
49 |
+
"task_specific_params": {
|
50 |
+
"text-generation": {
|
51 |
+
"do_sample": true,
|
52 |
+
"max_length": 250
|
53 |
+
}
|
54 |
+
},
|
55 |
+
"torch_dtype": "float32",
|
56 |
+
"transformers_version": "4.35.2",
|
57 |
+
"untie_r": true,
|
58 |
+
"use_mems_eval": true,
|
59 |
+
"use_mems_train": false,
|
60 |
+
"vocab_size": 32000
|
61 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:157747fe28e768f795e2930a1cedcc49a6dd691b4b57bbc76e05dd19c89d93da
|
3 |
+
size 466917412
|
special_tokens_map.json
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<eop>",
|
4 |
+
"<eod>"
|
5 |
+
],
|
6 |
+
"bos_token": "<s>",
|
7 |
+
"cls_token": "<cls>",
|
8 |
+
"eos_token": "</s>",
|
9 |
+
"mask_token": {
|
10 |
+
"content": "<mask>",
|
11 |
+
"lstrip": true,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "<pad>",
|
17 |
+
"sep_token": "<sep>",
|
18 |
+
"unk_token": "<unk>"
|
19 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": true,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<unk>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": false,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<cls>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": false,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"4": {
|
37 |
+
"content": "<sep>",
|
38 |
+
"lstrip": false,
|
39 |
+
"normalized": false,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
},
|
44 |
+
"5": {
|
45 |
+
"content": "<pad>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false,
|
50 |
+
"special": true
|
51 |
+
},
|
52 |
+
"6": {
|
53 |
+
"content": "<mask>",
|
54 |
+
"lstrip": true,
|
55 |
+
"normalized": false,
|
56 |
+
"rstrip": false,
|
57 |
+
"single_word": false,
|
58 |
+
"special": true
|
59 |
+
},
|
60 |
+
"7": {
|
61 |
+
"content": "<eod>",
|
62 |
+
"lstrip": false,
|
63 |
+
"normalized": false,
|
64 |
+
"rstrip": false,
|
65 |
+
"single_word": false,
|
66 |
+
"special": true
|
67 |
+
},
|
68 |
+
"8": {
|
69 |
+
"content": "<eop>",
|
70 |
+
"lstrip": false,
|
71 |
+
"normalized": false,
|
72 |
+
"rstrip": false,
|
73 |
+
"single_word": false,
|
74 |
+
"special": true
|
75 |
+
}
|
76 |
+
},
|
77 |
+
"additional_special_tokens": [
|
78 |
+
"<eop>",
|
79 |
+
"<eod>"
|
80 |
+
],
|
81 |
+
"bos_token": "<s>",
|
82 |
+
"clean_up_tokenization_spaces": true,
|
83 |
+
"cls_token": "<cls>",
|
84 |
+
"do_lower_case": false,
|
85 |
+
"eos_token": "</s>",
|
86 |
+
"keep_accents": false,
|
87 |
+
"mask_token": "<mask>",
|
88 |
+
"model_max_length": 512,
|
89 |
+
"pad_token": "<pad>",
|
90 |
+
"remove_space": true,
|
91 |
+
"sep_token": "<sep>",
|
92 |
+
"tokenizer_class": "XLNetTokenizer",
|
93 |
+
"unk_token": "<unk>"
|
94 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3ebb75ac95de2a10a5d5febe1159f0879323beaf7efb6880f6257bd18d2623ee
|
3 |
+
size 4219
|