Upload folder using huggingface_hub
Browse files- README.md +148 -0
- config.json +28 -0
- generation_config.json +10 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +24 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +41 -0
README.md
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: meta-llama/Llama-2-7b-hf
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
model-index:
|
6 |
+
- name: Llama2-7B-MeditronGuideLines-txt-epochs-1-lr-000002
|
7 |
+
results: []
|
8 |
+
---
|
9 |
+
|
10 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
11 |
+
should probably proofread and complete it, then remove this comment. -->
|
12 |
+
|
13 |
+
[<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)
|
14 |
+
<details><summary>See axolotl config</summary>
|
15 |
+
|
16 |
+
axolotl version: `0.4.0`
|
17 |
+
```yaml
|
18 |
+
base_model: meta-llama/Llama-2-7b-hf
|
19 |
+
model_type: LlamaForCausalLM
|
20 |
+
tokenizer_type: AutoTokenizer
|
21 |
+
is_llama_derived_model: true
|
22 |
+
|
23 |
+
load_in_8bit: false
|
24 |
+
load_in_4bit: false
|
25 |
+
strict: false
|
26 |
+
|
27 |
+
datasets:
|
28 |
+
- path: utrgvseniorproject/MeditronGuidelines
|
29 |
+
type: completion
|
30 |
+
dataset_prepared_path: /home/josegomez15/med-llm/Llama_Preprocess_MeditronGuideLines_txt
|
31 |
+
val_set_size: 0.05
|
32 |
+
output_dir: ./Llama2-7B-MeditronGuideLines-txt-epochs-1-lr-000002
|
33 |
+
|
34 |
+
sequence_len: 4096
|
35 |
+
sample_packing: true
|
36 |
+
pad_to_sequence_len: true
|
37 |
+
|
38 |
+
adapter:
|
39 |
+
lora_model_dir:
|
40 |
+
lora_r:
|
41 |
+
lora_alpha:
|
42 |
+
lora_dropout:
|
43 |
+
lora_target_linear:
|
44 |
+
lora_fan_in_fan_out:
|
45 |
+
|
46 |
+
wandb_project: Llama2-7B-MeditronGuideLines
|
47 |
+
wandb_entity: utrgvmedai
|
48 |
+
wandb_watch:
|
49 |
+
wandb_name: Llama2-7B-MeditronGuideLines-txt-epochs-1-lr-000002
|
50 |
+
wandb_log_model:
|
51 |
+
|
52 |
+
gradient_accumulation_steps: 1
|
53 |
+
micro_batch_size: 1
|
54 |
+
num_epochs: 1
|
55 |
+
#saves_per_epoch: 10
|
56 |
+
save_steps: 800
|
57 |
+
#save_total_limit: 4
|
58 |
+
optimizer: adamw_bnb_8bit
|
59 |
+
lr_scheduler: cosine
|
60 |
+
learning_rate: 0.000002
|
61 |
+
|
62 |
+
train_on_inputs: true
|
63 |
+
group_by_length: false
|
64 |
+
bf16: auto
|
65 |
+
fp16:
|
66 |
+
tf32: false
|
67 |
+
|
68 |
+
gradient_checkpointing: false
|
69 |
+
early_stopping_patience:
|
70 |
+
resume_from_checkpoint: true
|
71 |
+
|
72 |
+
local_rank:
|
73 |
+
logging_steps: 1
|
74 |
+
xformers_attention:
|
75 |
+
flash_attention: true
|
76 |
+
flash_attn_cross_entropy: false
|
77 |
+
flash_attn_rms_norm: true
|
78 |
+
flash_attn_fuse_qkv: false
|
79 |
+
flash_attn_fuse_mlp: true
|
80 |
+
|
81 |
+
warmup_steps: 2000
|
82 |
+
evals_per_epoch: 4
|
83 |
+
eval_table_size:
|
84 |
+
eval_sample_packing: False
|
85 |
+
debug:
|
86 |
+
deepspeed: /home/josegomez15/axolotl/deepspeed_configs/zero2.json
|
87 |
+
weight_decay: 0.1
|
88 |
+
fsdp:
|
89 |
+
fsdp_config:
|
90 |
+
special_tokens:
|
91 |
+
|
92 |
+
```
|
93 |
+
|
94 |
+
</details><br>
|
95 |
+
|
96 |
+
# Llama2-7B-MeditronGuideLines-txt-epochs-1-lr-000002
|
97 |
+
|
98 |
+
This model is a fine-tuned version of [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf) on the None dataset.
|
99 |
+
It achieves the following results on the evaluation set:
|
100 |
+
- Loss: 1.3911
|
101 |
+
|
102 |
+
## Model description
|
103 |
+
|
104 |
+
More information needed
|
105 |
+
|
106 |
+
## Intended uses & limitations
|
107 |
+
|
108 |
+
More information needed
|
109 |
+
|
110 |
+
## Training and evaluation data
|
111 |
+
|
112 |
+
More information needed
|
113 |
+
|
114 |
+
## Training procedure
|
115 |
+
|
116 |
+
### Training hyperparameters
|
117 |
+
|
118 |
+
The following hyperparameters were used during training:
|
119 |
+
- learning_rate: 2e-06
|
120 |
+
- train_batch_size: 1
|
121 |
+
- eval_batch_size: 1
|
122 |
+
- seed: 42
|
123 |
+
- distributed_type: multi-GPU
|
124 |
+
- num_devices: 8
|
125 |
+
- total_train_batch_size: 8
|
126 |
+
- total_eval_batch_size: 8
|
127 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
128 |
+
- lr_scheduler_type: cosine
|
129 |
+
- lr_scheduler_warmup_steps: 2000
|
130 |
+
- num_epochs: 1
|
131 |
+
|
132 |
+
### Training results
|
133 |
+
|
134 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
135 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
136 |
+
| 1.3307 | 0.0 | 1 | 1.5317 |
|
137 |
+
| 1.4702 | 0.25 | 1141 | 1.4162 |
|
138 |
+
| 1.3621 | 0.5 | 2282 | 1.4039 |
|
139 |
+
| 1.4502 | 0.75 | 3423 | 1.3953 |
|
140 |
+
| 1.4184 | 1.0 | 4564 | 1.3911 |
|
141 |
+
|
142 |
+
|
143 |
+
### Framework versions
|
144 |
+
|
145 |
+
- Transformers 4.38.0.dev0
|
146 |
+
- Pytorch 2.0.1+cu117
|
147 |
+
- Datasets 2.18.0
|
148 |
+
- Tokenizers 0.15.0
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "meta-llama/Llama-2-7b-hf",
|
3 |
+
"architectures": [
|
4 |
+
"LlamaForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_bias": false,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bos_token_id": 1,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "silu",
|
11 |
+
"hidden_size": 4096,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 11008,
|
14 |
+
"max_position_embeddings": 4096,
|
15 |
+
"model_type": "llama",
|
16 |
+
"num_attention_heads": 32,
|
17 |
+
"num_hidden_layers": 32,
|
18 |
+
"num_key_value_heads": 32,
|
19 |
+
"pretraining_tp": 1,
|
20 |
+
"rms_norm_eps": 1e-05,
|
21 |
+
"rope_scaling": null,
|
22 |
+
"rope_theta": 10000.0,
|
23 |
+
"tie_word_embeddings": false,
|
24 |
+
"torch_dtype": "bfloat16",
|
25 |
+
"transformers_version": "4.38.0.dev0",
|
26 |
+
"use_cache": false,
|
27 |
+
"vocab_size": 32000
|
28 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 1,
|
3 |
+
"do_sample": true,
|
4 |
+
"eos_token_id": 2,
|
5 |
+
"max_length": 4096,
|
6 |
+
"pad_token_id": 0,
|
7 |
+
"temperature": 0.6,
|
8 |
+
"top_p": 0.9,
|
9 |
+
"transformers_version": "4.38.0.dev0"
|
10 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfb4ae92068c05bedfb53ae592fa89229da728752a192d638933e36f86fd010f
|
3 |
+
size 13476871411
|
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.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
3 |
+
size 499723
|
tokenizer_config.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
}
|
29 |
+
},
|
30 |
+
"bos_token": "<s>",
|
31 |
+
"clean_up_tokenization_spaces": false,
|
32 |
+
"eos_token": "</s>",
|
33 |
+
"legacy": false,
|
34 |
+
"model_max_length": 1000000000000000019884624838656,
|
35 |
+
"pad_token": "</s>",
|
36 |
+
"padding_side": "right",
|
37 |
+
"sp_model_kwargs": {},
|
38 |
+
"tokenizer_class": "LlamaTokenizer",
|
39 |
+
"unk_token": "<unk>",
|
40 |
+
"use_default_system_prompt": false
|
41 |
+
}
|