SweetZiyi/MLMA_Lab8_Task2
Browse files- README.md +68 -0
- config.json +51 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- runs/Apr12_04-19-53_df600707e3d1/events.out.tfevents.1712895594.df600707e3d1.2367.5 +3 -0
- runs/Apr12_04-32-39_df600707e3d1/events.out.tfevents.1712896359.df600707e3d1.30806.0 +3 -0
- runs/Apr12_04-34-18_df600707e3d1/events.out.tfevents.1712896458.df600707e3d1.30806.1 +3 -0
- runs/Apr12_04-35-10_df600707e3d1/events.out.tfevents.1712896511.df600707e3d1.30806.2 +3 -0
- runs/Apr12_05-08-55_df600707e3d1/events.out.tfevents.1712898535.df600707e3d1.30806.3 +3 -0
- runs/Apr12_05-09-25_df600707e3d1/events.out.tfevents.1712898566.df600707e3d1.30806.4 +3 -0
- runs/Apr12_05-41-07_df600707e3d1/events.out.tfevents.1712900468.df600707e3d1.30806.5 +3 -0
- special_tokens_map.json +7 -0
- tokenizer_config.json +44 -0
- training_args.bin +3 -0
- vocab.json +0 -0
README.md
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: microsoft/biogpt
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- precision
|
8 |
+
- recall
|
9 |
+
- f1
|
10 |
+
- accuracy
|
11 |
+
model-index:
|
12 |
+
- name: test-trainer
|
13 |
+
results: []
|
14 |
+
---
|
15 |
+
|
16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
17 |
+
should probably proofread and complete it, then remove this comment. -->
|
18 |
+
|
19 |
+
# test-trainer
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [microsoft/biogpt](https://huggingface.co/microsoft/biogpt) on an unknown dataset.
|
22 |
+
It achieves the following results on the evaluation set:
|
23 |
+
- Loss: 0.2658
|
24 |
+
- Precision: 0.0656
|
25 |
+
- Recall: 0.0323
|
26 |
+
- F1: 0.0433
|
27 |
+
- Accuracy: 0.9309
|
28 |
+
|
29 |
+
## Model description
|
30 |
+
|
31 |
+
More information needed
|
32 |
+
|
33 |
+
## Intended uses & limitations
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Training and evaluation data
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Training procedure
|
42 |
+
|
43 |
+
### Training hyperparameters
|
44 |
+
|
45 |
+
The following hyperparameters were used during training:
|
46 |
+
- learning_rate: 5e-05
|
47 |
+
- train_batch_size: 8
|
48 |
+
- eval_batch_size: 8
|
49 |
+
- seed: 42
|
50 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
51 |
+
- lr_scheduler_type: linear
|
52 |
+
- num_epochs: 3.0
|
53 |
+
|
54 |
+
### Training results
|
55 |
+
|
56 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
57 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
58 |
+
| 0.3448 | 1.0 | 679 | 0.2682 | 0.0046 | 0.0013 | 0.0020 | 0.9289 |
|
59 |
+
| 0.267 | 2.0 | 1358 | 0.2548 | 0.0347 | 0.0142 | 0.0201 | 0.9309 |
|
60 |
+
| 0.2122 | 3.0 | 2037 | 0.2658 | 0.0656 | 0.0323 | 0.0433 | 0.9309 |
|
61 |
+
|
62 |
+
|
63 |
+
### Framework versions
|
64 |
+
|
65 |
+
- Transformers 4.38.2
|
66 |
+
- Pytorch 2.2.1+cu121
|
67 |
+
- Datasets 2.18.0
|
68 |
+
- Tokenizers 0.15.2
|
config.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/biogpt",
|
3 |
+
"activation_dropout": 0.0,
|
4 |
+
"activation_function": "gelu_new",
|
5 |
+
"architectures": [
|
6 |
+
"GPT2ForTokenClassification"
|
7 |
+
],
|
8 |
+
"attention_probs_dropout_prob": 0.1,
|
9 |
+
"attn_pdrop": 0.1,
|
10 |
+
"bos_token_id": 0,
|
11 |
+
"embd_pdrop": 0.1,
|
12 |
+
"eos_token_id": 2,
|
13 |
+
"hidden_act": "gelu",
|
14 |
+
"hidden_dropout_prob": 0.1,
|
15 |
+
"id2label": {
|
16 |
+
"0": "O",
|
17 |
+
"1": "B-Disease",
|
18 |
+
"2": "I-Disease"
|
19 |
+
},
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 4096,
|
22 |
+
"label2id": {
|
23 |
+
"B-Disease": 1,
|
24 |
+
"I-Disease": 2,
|
25 |
+
"O": 0
|
26 |
+
},
|
27 |
+
"layer_norm_eps": 1e-12,
|
28 |
+
"layer_norm_epsilon": 1e-05,
|
29 |
+
"layerdrop": 0.0,
|
30 |
+
"model_type": "gpt2",
|
31 |
+
"n_embd": 1024,
|
32 |
+
"n_head": 16,
|
33 |
+
"n_inner": null,
|
34 |
+
"n_layer": 24,
|
35 |
+
"n_positions": 1024,
|
36 |
+
"pad_token_id": 1,
|
37 |
+
"reorder_and_upcast_attn": false,
|
38 |
+
"resid_pdrop": 0.1,
|
39 |
+
"scale_attn_by_inverse_layer_idx": false,
|
40 |
+
"scale_attn_weights": true,
|
41 |
+
"scale_embedding": true,
|
42 |
+
"summary_activation": null,
|
43 |
+
"summary_first_dropout": 0.1,
|
44 |
+
"summary_proj_to_labels": true,
|
45 |
+
"summary_type": "cls_index",
|
46 |
+
"summary_use_proj": true,
|
47 |
+
"torch_dtype": "float32",
|
48 |
+
"transformers_version": "4.38.2",
|
49 |
+
"use_cache": true,
|
50 |
+
"vocab_size": 42384
|
51 |
+
}
|
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:3e1a11cc368ab17a00ee170e14c8ca913c53ac625ec1d2e36193f31b3e0290a4
|
3 |
+
size 1387087524
|
runs/Apr12_04-19-53_df600707e3d1/events.out.tfevents.1712895594.df600707e3d1.2367.5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d1686bbd3a6612c63e68f4bb8c9ba98829c3e3cf6289c63a920d0edf2fba5c7b
|
3 |
+
size 4684
|
runs/Apr12_04-32-39_df600707e3d1/events.out.tfevents.1712896359.df600707e3d1.30806.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:814f74869a65e598ee02dee1b53d1307d79f9ad5da188035cb410f733a02d26e
|
3 |
+
size 4686
|
runs/Apr12_04-34-18_df600707e3d1/events.out.tfevents.1712896458.df600707e3d1.30806.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:77502e91540a2d21401c00a5aea849acaac33616541e0268ed0e1dbd93484b01
|
3 |
+
size 4688
|
runs/Apr12_04-35-10_df600707e3d1/events.out.tfevents.1712896511.df600707e3d1.30806.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38b48edb906f5123a38a1b8c55648f9a7726fa7bb8e3d57a7361d5d5e4d44446
|
3 |
+
size 5271
|
runs/Apr12_05-08-55_df600707e3d1/events.out.tfevents.1712898535.df600707e3d1.30806.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8d6d95c232dc51b966a82d89d12eceed0a315bde2186d57ae3440e417f3a86a6
|
3 |
+
size 5060
|
runs/Apr12_05-09-25_df600707e3d1/events.out.tfevents.1712898566.df600707e3d1.30806.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ac722a4f1aea0143eacf3b57716bf5b1b50e912ec7a948e676158930b40686f
|
3 |
+
size 5542
|
runs/Apr12_05-41-07_df600707e3d1/events.out.tfevents.1712900468.df600707e3d1.30806.5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:291762e18d512fde911f79459698417e7c5247d8388172e247e5466df7f17481
|
3 |
+
size 7674
|
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,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
38 |
+
"eos_token": "</s>",
|
39 |
+
"model_max_length": 1024,
|
40 |
+
"pad_token": "<pad>",
|
41 |
+
"sep_token": "</s>",
|
42 |
+
"tokenizer_class": "BioGptTokenizer",
|
43 |
+
"unk_token": "<unk>"
|
44 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:10b5be5cd882f897814d72eeaa1fad273bedd0e6efbe898835772e8009f183a8
|
3 |
+
size 4856
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|