Training complete
Browse files- README.md +93 -0
- config.json +50 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer_config.json +45 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
base_model: microsoft/biogpt
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- ncbi_disease
|
9 |
+
metrics:
|
10 |
+
- precision
|
11 |
+
- recall
|
12 |
+
- f1
|
13 |
+
- accuracy
|
14 |
+
model-index:
|
15 |
+
- name: bert-finetuned-ner
|
16 |
+
results:
|
17 |
+
- task:
|
18 |
+
name: Token Classification
|
19 |
+
type: token-classification
|
20 |
+
dataset:
|
21 |
+
name: ncbi_disease
|
22 |
+
type: ncbi_disease
|
23 |
+
config: ncbi_disease
|
24 |
+
split: validation
|
25 |
+
args: ncbi_disease
|
26 |
+
metrics:
|
27 |
+
- name: Precision
|
28 |
+
type: precision
|
29 |
+
value: 0.1203585147247119
|
30 |
+
- name: Recall
|
31 |
+
type: recall
|
32 |
+
value: 0.11944091486658195
|
33 |
+
- name: F1
|
34 |
+
type: f1
|
35 |
+
value: 0.11989795918367346
|
36 |
+
- name: Accuracy
|
37 |
+
type: accuracy
|
38 |
+
value: 0.9369870473375083
|
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-finetuned-ner
|
45 |
+
|
46 |
+
This model is a fine-tuned version of [microsoft/biogpt](https://huggingface.co/microsoft/biogpt) on the ncbi_disease dataset.
|
47 |
+
It achieves the following results on the evaluation set:
|
48 |
+
- Loss: 0.2199
|
49 |
+
- Precision: 0.1204
|
50 |
+
- Recall: 0.1194
|
51 |
+
- F1: 0.1199
|
52 |
+
- Accuracy: 0.9370
|
53 |
+
|
54 |
+
## Model description
|
55 |
+
|
56 |
+
More information needed
|
57 |
+
|
58 |
+
## Intended uses & limitations
|
59 |
+
|
60 |
+
More information needed
|
61 |
+
|
62 |
+
## Training and evaluation data
|
63 |
+
|
64 |
+
More information needed
|
65 |
+
|
66 |
+
## Training procedure
|
67 |
+
|
68 |
+
### Training hyperparameters
|
69 |
+
|
70 |
+
The following hyperparameters were used during training:
|
71 |
+
- learning_rate: 2e-05
|
72 |
+
- train_batch_size: 8
|
73 |
+
- eval_batch_size: 8
|
74 |
+
- seed: 42
|
75 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
76 |
+
- lr_scheduler_type: linear
|
77 |
+
- num_epochs: 3
|
78 |
+
|
79 |
+
### Training results
|
80 |
+
|
81 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
82 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
83 |
+
| 0.2177 | 1.0 | 679 | 0.2297 | 0.0752 | 0.0877 | 0.0809 | 0.9308 |
|
84 |
+
| 0.1956 | 2.0 | 1358 | 0.2114 | 0.0628 | 0.0597 | 0.0612 | 0.9372 |
|
85 |
+
| 0.1557 | 3.0 | 2037 | 0.2199 | 0.1204 | 0.1194 | 0.1199 | 0.9370 |
|
86 |
+
|
87 |
+
|
88 |
+
### Framework versions
|
89 |
+
|
90 |
+
- Transformers 4.51.2
|
91 |
+
- Pytorch 2.1.0+cu121
|
92 |
+
- Datasets 3.5.0
|
93 |
+
- Tokenizers 0.21.1
|
config.json
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"activation_dropout": 0.0,
|
3 |
+
"activation_function": "gelu_new",
|
4 |
+
"architectures": [
|
5 |
+
"GPT2ForTokenClassification"
|
6 |
+
],
|
7 |
+
"attention_probs_dropout_prob": 0.1,
|
8 |
+
"attn_pdrop": 0.1,
|
9 |
+
"bos_token_id": 0,
|
10 |
+
"embd_pdrop": 0.1,
|
11 |
+
"eos_token_id": 2,
|
12 |
+
"hidden_act": "gelu",
|
13 |
+
"hidden_dropout_prob": 0.1,
|
14 |
+
"id2label": {
|
15 |
+
"0": "O",
|
16 |
+
"1": "B-Disease",
|
17 |
+
"2": "I-Disease"
|
18 |
+
},
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 4096,
|
21 |
+
"label2id": {
|
22 |
+
"B-Disease": 1,
|
23 |
+
"I-Disease": 2,
|
24 |
+
"O": 0
|
25 |
+
},
|
26 |
+
"layer_norm_eps": 1e-12,
|
27 |
+
"layer_norm_epsilon": 1e-05,
|
28 |
+
"layerdrop": 0.0,
|
29 |
+
"model_type": "gpt2",
|
30 |
+
"n_embd": 1024,
|
31 |
+
"n_head": 16,
|
32 |
+
"n_inner": null,
|
33 |
+
"n_layer": 24,
|
34 |
+
"n_positions": 1024,
|
35 |
+
"pad_token_id": 1,
|
36 |
+
"reorder_and_upcast_attn": false,
|
37 |
+
"resid_pdrop": 0.1,
|
38 |
+
"scale_attn_by_inverse_layer_idx": false,
|
39 |
+
"scale_attn_weights": true,
|
40 |
+
"scale_embedding": true,
|
41 |
+
"summary_activation": null,
|
42 |
+
"summary_first_dropout": 0.1,
|
43 |
+
"summary_proj_to_labels": true,
|
44 |
+
"summary_type": "cls_index",
|
45 |
+
"summary_use_proj": true,
|
46 |
+
"torch_dtype": "float32",
|
47 |
+
"transformers_version": "4.51.2",
|
48 |
+
"use_cache": true,
|
49 |
+
"vocab_size": 42384
|
50 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f3322e39db3d2ecf0f96311ea11df519d3eb1b9be30d8fb2e14a63eb3d6a7ca0
|
3 |
+
size 1387087524
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"eos_token": "</s>",
|
4 |
+
"pad_token": "<pad>",
|
5 |
+
"sep_token": "</s>",
|
6 |
+
"unk_token": "<unk>"
|
7 |
+
}
|
tokenizer_config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
}
|
35 |
+
},
|
36 |
+
"bos_token": "<s>",
|
37 |
+
"clean_up_tokenization_spaces": false,
|
38 |
+
"eos_token": "</s>",
|
39 |
+
"extra_special_tokens": {},
|
40 |
+
"model_max_length": 1000000000000000019884624838656,
|
41 |
+
"pad_token": "<pad>",
|
42 |
+
"sep_token": "</s>",
|
43 |
+
"tokenizer_class": "BioGptTokenizer",
|
44 |
+
"unk_token": "<unk>"
|
45 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a753e205e80d48671c74ce43d74a23c7f63c9e4f7af57edd1f5d375c37298404
|
3 |
+
size 5304
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|