Upload folder using huggingface_hub
Browse files- README.md +137 -0
- config.json +26 -0
- generation_config.json +7 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +24 -0
- tokenizer.model +3 -0
- tokenizer_config.json +44 -0
README.md
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: mistralai/Mistral-7B-v0.1
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
model-index:
|
7 |
+
- name: mistral-7B-PsychiatryCaseNotes-epochs-1-lr-000002
|
8 |
+
results: []
|
9 |
+
---
|
10 |
+
|
11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
+
should probably proofread and complete it, then remove this comment. -->
|
13 |
+
|
14 |
+
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
15 |
+
<details><summary>See axolotl config</summary>
|
16 |
+
|
17 |
+
axolotl version: `0.4.0`
|
18 |
+
```yaml
|
19 |
+
base_model: mistralai/Mistral-7B-v0.1
|
20 |
+
model_type: MistralForCausalLM
|
21 |
+
tokenizer_type: LlamaTokenizer
|
22 |
+
is_mistral_derived_model: true
|
23 |
+
|
24 |
+
load_in_8bit: false
|
25 |
+
load_in_4bit: false
|
26 |
+
strict: false
|
27 |
+
|
28 |
+
datasets:
|
29 |
+
- path: utrgvseniorproject/PsychiatryCaseNotes
|
30 |
+
type: completion
|
31 |
+
dataset_prepared_path: /home/josegomez15/med-llm/last_run_prepared
|
32 |
+
val_set_size: 0.05
|
33 |
+
output_dir: ./mistral-7B-PsychiatryCaseNotes-epochs-1-lr-000002
|
34 |
+
|
35 |
+
sequence_len: 4096
|
36 |
+
sample_packing: false
|
37 |
+
pad_to_sequence_len: true
|
38 |
+
|
39 |
+
wandb_project: mistral-7B-PsychiatryCaseNotes
|
40 |
+
wandb_entity: utrgvmedai
|
41 |
+
wandb_watch:
|
42 |
+
wandb_name: mistral-7B-PsychiatryCaseNotes-epochs-1-lr-000002
|
43 |
+
wandb_log_model:
|
44 |
+
|
45 |
+
gradient_accumulation_steps: 1
|
46 |
+
micro_batch_size: 1
|
47 |
+
num_epochs: 1
|
48 |
+
optimizer: adamw_bnb_8bit
|
49 |
+
lr_scheduler: cosine
|
50 |
+
learning_rate: 0.000002
|
51 |
+
|
52 |
+
train_on_inputs: True # make sure you have this on True
|
53 |
+
group_by_length: false
|
54 |
+
bf16: auto
|
55 |
+
fp16:
|
56 |
+
tf32: false
|
57 |
+
|
58 |
+
gradient_checkpointing: true
|
59 |
+
early_stopping_patience:
|
60 |
+
resume_from_checkpoint:
|
61 |
+
local_rank:
|
62 |
+
logging_steps: 1
|
63 |
+
xformers_attention:
|
64 |
+
flash_attention: true
|
65 |
+
flash_attn_cross_entropy: false
|
66 |
+
flash_attn_rms_norm: true
|
67 |
+
flash_attn_fuse_qkv: false
|
68 |
+
flash_attn_fuse_mlp: true
|
69 |
+
|
70 |
+
warmup_steps: 100
|
71 |
+
evals_per_epoch: 4
|
72 |
+
eval_table_size:
|
73 |
+
eval_sample_packing:
|
74 |
+
saves_per_epoch: 1
|
75 |
+
debug:
|
76 |
+
deepspeed: /home/josegomez15/axolotl/deepspeed_configs/zero2.json
|
77 |
+
weight_decay: 0.1
|
78 |
+
fsdp:
|
79 |
+
fsdp_config:
|
80 |
+
special_tokens:
|
81 |
+
|
82 |
+
```
|
83 |
+
|
84 |
+
</details><br>
|
85 |
+
|
86 |
+
# mistral-7B-PsychiatryCaseNotes-epochs-1-lr-000002
|
87 |
+
|
88 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on the None dataset.
|
89 |
+
It achieves the following results on the evaluation set:
|
90 |
+
- Loss: 1.8674
|
91 |
+
|
92 |
+
## Model description
|
93 |
+
|
94 |
+
More information needed
|
95 |
+
|
96 |
+
## Intended uses & limitations
|
97 |
+
|
98 |
+
More information needed
|
99 |
+
|
100 |
+
## Training and evaluation data
|
101 |
+
|
102 |
+
More information needed
|
103 |
+
|
104 |
+
## Training procedure
|
105 |
+
|
106 |
+
### Training hyperparameters
|
107 |
+
|
108 |
+
The following hyperparameters were used during training:
|
109 |
+
- learning_rate: 2e-06
|
110 |
+
- train_batch_size: 1
|
111 |
+
- eval_batch_size: 1
|
112 |
+
- seed: 42
|
113 |
+
- distributed_type: multi-GPU
|
114 |
+
- num_devices: 8
|
115 |
+
- total_train_batch_size: 8
|
116 |
+
- total_eval_batch_size: 8
|
117 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
118 |
+
- lr_scheduler_type: cosine
|
119 |
+
- lr_scheduler_warmup_steps: 100
|
120 |
+
- num_epochs: 1
|
121 |
+
|
122 |
+
### Training results
|
123 |
+
|
124 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
125 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
126 |
+
| 5.0059 | 0.0 | 1 | 5.1706 |
|
127 |
+
| 2.4454 | 0.25 | 626 | 2.0384 |
|
128 |
+
| 2.5478 | 0.5 | 1252 | 2.0210 |
|
129 |
+
| 2.2436 | 0.75 | 1878 | 1.8674 |
|
130 |
+
|
131 |
+
|
132 |
+
### Framework versions
|
133 |
+
|
134 |
+
- Transformers 4.38.0
|
135 |
+
- Pytorch 2.0.1+cu117
|
136 |
+
- Datasets 2.17.0
|
137 |
+
- Tokenizers 0.15.0
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "mistralai/Mistral-7B-v0.1",
|
3 |
+
"architectures": [
|
4 |
+
"MistralForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 1,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 4096,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 14336,
|
13 |
+
"max_position_embeddings": 32768,
|
14 |
+
"model_type": "mistral",
|
15 |
+
"num_attention_heads": 32,
|
16 |
+
"num_hidden_layers": 32,
|
17 |
+
"num_key_value_heads": 8,
|
18 |
+
"rms_norm_eps": 1e-05,
|
19 |
+
"rope_theta": 10000.0,
|
20 |
+
"sliding_window": 4096,
|
21 |
+
"tie_word_embeddings": false,
|
22 |
+
"torch_dtype": "bfloat16",
|
23 |
+
"transformers_version": "4.38.0",
|
24 |
+
"use_cache": false,
|
25 |
+
"vocab_size": 32000
|
26 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 1,
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": 2,
|
6 |
+
"transformers_version": "4.38.0"
|
7 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2c1c83b42ce0983c8225be131f0938110daf1b1da418e4107609173a9ed31ef6
|
3 |
+
size 14483504421
|
special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "</s>",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": false,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": true,
|
5 |
+
"added_tokens_decoder": {
|
6 |
+
"0": {
|
7 |
+
"content": "<unk>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false,
|
12 |
+
"special": true
|
13 |
+
},
|
14 |
+
"1": {
|
15 |
+
"content": "<s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false,
|
20 |
+
"special": true
|
21 |
+
},
|
22 |
+
"2": {
|
23 |
+
"content": "</s>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false,
|
28 |
+
"special": true
|
29 |
+
}
|
30 |
+
},
|
31 |
+
"additional_special_tokens": [],
|
32 |
+
"bos_token": "<s>",
|
33 |
+
"clean_up_tokenization_spaces": false,
|
34 |
+
"eos_token": "</s>",
|
35 |
+
"legacy": true,
|
36 |
+
"model_max_length": 1000000000000000019884624838656,
|
37 |
+
"pad_token": "</s>",
|
38 |
+
"sp_model_kwargs": {},
|
39 |
+
"spaces_between_special_tokens": false,
|
40 |
+
"tokenizer_class": "LlamaTokenizer",
|
41 |
+
"unk_token": "<unk>",
|
42 |
+
"use_default_system_prompt": false,
|
43 |
+
"use_fast": true
|
44 |
+
}
|