Yermalovich commited on
Commit
ae65102
·
verified ·
1 Parent(s): 7529bf9

TrainingLLM_Med_Bio_ClinicalBERT

Browse files
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  library_name: transformers
3
- license: apache-2.0
4
- base_model: distilgpt2
5
  tags:
6
  - generated_from_trainer
7
  model-index:
@@ -14,9 +14,9 @@ should probably proofread and complete it, then remove this comment. -->
14
 
15
  # results
16
 
17
- This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on the None dataset.
18
  It achieves the following results on the evaluation set:
19
- - Loss: 3.0883
20
 
21
  ## Model description
22
 
@@ -36,22 +36,25 @@ More information needed
36
 
37
  The following hyperparameters were used during training:
38
  - learning_rate: 5e-05
39
- - train_batch_size: 8
40
- - eval_batch_size: 8
41
  - seed: 42
 
 
42
  - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
43
  - lr_scheduler_type: linear
44
  - lr_scheduler_warmup_steps: 500
45
- - num_epochs: 3
46
  - mixed_precision_training: Native AMP
47
 
48
  ### Training results
49
 
50
  | Training Loss | Epoch | Step | Validation Loss |
51
  |:-------------:|:-----:|:----:|:---------------:|
52
- | 3.2759 | 1.0 | 1641 | 3.1820 |
53
- | 3.1864 | 2.0 | 3282 | 3.1148 |
54
- | 3.0893 | 3.0 | 4923 | 3.0883 |
 
55
 
56
 
57
  ### Framework versions
 
1
  ---
2
  library_name: transformers
3
+ license: mit
4
+ base_model: emilyalsentzer/Bio_ClinicalBERT
5
  tags:
6
  - generated_from_trainer
7
  model-index:
 
14
 
15
  # results
16
 
17
+ This model is a fine-tuned version of [emilyalsentzer/Bio_ClinicalBERT](https://huggingface.co/emilyalsentzer/Bio_ClinicalBERT) on the None dataset.
18
  It achieves the following results on the evaluation set:
19
+ - Loss: 3.0625
20
 
21
  ## Model description
22
 
 
36
 
37
  The following hyperparameters were used during training:
38
  - learning_rate: 5e-05
39
+ - train_batch_size: 4
40
+ - eval_batch_size: 2
41
  - seed: 42
42
+ - gradient_accumulation_steps: 2
43
+ - total_train_batch_size: 8
44
  - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
45
  - lr_scheduler_type: linear
46
  - lr_scheduler_warmup_steps: 500
47
+ - num_epochs: 4
48
  - mixed_precision_training: Native AMP
49
 
50
  ### Training results
51
 
52
  | Training Loss | Epoch | Step | Validation Loss |
53
  |:-------------:|:-----:|:----:|:---------------:|
54
+ | 3.0693 | 1.0 | 1641 | 3.1932 |
55
+ | 3.0998 | 2.0 | 3282 | 3.0964 |
56
+ | 2.873 | 3.0 | 4923 | 3.0659 |
57
+ | 2.9483 | 4.0 | 6564 | 3.0625 |
58
 
59
 
60
  ### Framework versions
config.json CHANGED
@@ -1,46 +1,25 @@
1
  {
2
- "_name_or_path": "distilgpt2",
3
- "_num_labels": 1,
4
- "activation_function": "gelu_new",
5
  "architectures": [
6
- "GPT2LMHeadModel"
7
  ],
8
- "attn_pdrop": 0.1,
9
- "bos_token_id": 50256,
10
- "embd_pdrop": 0.1,
11
- "eos_token_id": 50256,
12
- "id2label": {
13
- "0": "LABEL_0"
14
- },
15
  "initializer_range": 0.02,
16
- "label2id": {
17
- "LABEL_0": 0
18
- },
19
- "layer_norm_epsilon": 1e-05,
20
- "model_type": "gpt2",
21
- "n_ctx": 1024,
22
- "n_embd": 768,
23
- "n_head": 12,
24
- "n_inner": null,
25
- "n_layer": 6,
26
- "n_positions": 1024,
27
- "reorder_and_upcast_attn": false,
28
- "resid_pdrop": 0.1,
29
- "scale_attn_by_inverse_layer_idx": false,
30
- "scale_attn_weights": true,
31
- "summary_activation": null,
32
- "summary_first_dropout": 0.1,
33
- "summary_proj_to_labels": true,
34
- "summary_type": "cls_index",
35
- "summary_use_proj": true,
36
- "task_specific_params": {
37
- "text-generation": {
38
- "do_sample": true,
39
- "max_length": 50
40
- }
41
- },
42
  "torch_dtype": "float32",
43
  "transformers_version": "4.47.1",
 
44
  "use_cache": true,
45
- "vocab_size": 50258
46
  }
 
1
  {
2
+ "_name_or_path": "emilyalsentzer/Bio_ClinicalBERT",
 
 
3
  "architectures": [
4
+ "BertLMHeadModel"
5
  ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
 
 
11
  "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  "torch_dtype": "float32",
21
  "transformers_version": "4.47.1",
22
+ "type_vocab_size": 2,
23
  "use_cache": true,
24
+ "vocab_size": 28996
25
  }
generation_config.json CHANGED
@@ -1,6 +1,5 @@
1
  {
2
  "_from_model_config": true,
3
- "bos_token_id": 50256,
4
- "eos_token_id": 50256,
5
  "transformers_version": "4.47.1"
6
  }
 
1
  {
2
  "_from_model_config": true,
3
+ "pad_token_id": 0,
 
4
  "transformers_version": "4.47.1"
5
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2a416cd0fef105b92102f39d898583f583bb47cb9692e6df8a3966b90a918932
3
- size 327661000
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0c15860df49a2871296c983ad3e0a2fc5754ab3af663270210e1ea7e3191b77
3
+ size 433386912
special_tokens_map.json CHANGED
@@ -1,12 +1,7 @@
1
  {
2
- "bos_token": "<|endoftext|>",
3
- "eos_token": "<|endoftext|>",
4
- "pad_token": {
5
- "content": "[PAD]",
6
- "lstrip": false,
7
- "normalized": false,
8
- "rstrip": false,
9
- "single_word": false
10
- },
11
- "unk_token": "<|endoftext|>"
12
  }
 
1
  {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
 
 
 
 
 
7
  }
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -1,16 +1,39 @@
1
  {
2
- "add_prefix_space": false,
3
  "added_tokens_decoder": {
4
- "50256": {
5
- "content": "<|endoftext|>",
6
  "lstrip": false,
7
- "normalized": true,
8
  "rstrip": false,
9
  "single_word": false,
10
  "special": true
11
  },
12
- "50257": {
13
- "content": "[PAD]",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  "lstrip": false,
15
  "normalized": false,
16
  "rstrip": false,
@@ -18,12 +41,18 @@
18
  "special": true
19
  }
20
  },
21
- "bos_token": "<|endoftext|>",
22
- "clean_up_tokenization_spaces": false,
23
- "eos_token": "<|endoftext|>",
 
24
  "extra_special_tokens": {},
25
- "model_max_length": 1024,
 
 
26
  "pad_token": "[PAD]",
27
- "tokenizer_class": "GPT2Tokenizer",
28
- "unk_token": "<|endoftext|>"
 
 
 
29
  }
 
1
  {
 
2
  "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
  "lstrip": false,
6
+ "normalized": false,
7
  "rstrip": false,
8
  "single_word": false,
9
  "special": true
10
  },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
  "lstrip": false,
38
  "normalized": false,
39
  "rstrip": false,
 
41
  "special": true
42
  }
43
  },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
  "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
  "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
  }
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:008532a3fcc6ec144c03b9408fe09714f6893f4c3ba3fc7eea609e88abe62698
3
  size 5304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9569e859494b24c98154d1fcbae84ea70a279bbb8431b5ee0022d43d6b1d159
3
  size 5304
vocab.txt ADDED
The diff for this file is too large to render. See raw diff