Hmehdi515 commited on
Commit
273aced
1 Parent(s): b4d1ba0

Hmehdi515/lora

Browse files
README.md ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/Phi-3-medium-4k-instruct
3
+ library_name: peft
4
+ license: mit
5
+ tags:
6
+ - trl
7
+ - sft
8
+ - generated_from_trainer
9
+ model-index:
10
+ - name: phi-3-medium-LoRA
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="200" height="32"/>](https://wandb.ai/hmehdi-endosoft/Phi3-medium-ft-python-code/runs/lshnwbbw)
18
+ # phi-3-medium-LoRA
19
+
20
+ This model is a fine-tuned version of [microsoft/Phi-3-medium-4k-instruct](https://huggingface.co/microsoft/Phi-3-medium-4k-instruct) on an unknown dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.7006
23
+
24
+ ## Model description
25
+
26
+ More information needed
27
+
28
+ ## Intended uses & limitations
29
+
30
+ More information needed
31
+
32
+ ## Training and evaluation data
33
+
34
+ More information needed
35
+
36
+ ## Training procedure
37
+
38
+ ### Training hyperparameters
39
+
40
+ The following hyperparameters were used during training:
41
+ - learning_rate: 0.0001
42
+ - train_batch_size: 2
43
+ - eval_batch_size: 2
44
+ - seed: 42
45
+ - gradient_accumulation_steps: 2
46
+ - total_train_batch_size: 4
47
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
48
+ - lr_scheduler_type: linear
49
+ - lr_scheduler_warmup_ratio: 0.1
50
+ - num_epochs: 10
51
+
52
+ ### Training results
53
+
54
+ | Training Loss | Epoch | Step | Validation Loss |
55
+ |:-------------:|:------:|:------:|:---------------:|
56
+ | 1.2073 | 0.1118 | 2500 | 0.7942 |
57
+ | 1.1026 | 0.2237 | 5000 | 0.7623 |
58
+ | 1.0828 | 0.3355 | 7500 | 0.7447 |
59
+ | 1.0777 | 0.4473 | 10000 | 0.7363 |
60
+ | 1.0761 | 0.5592 | 12500 | 0.7304 |
61
+ | 1.0603 | 0.6710 | 15000 | 0.7243 |
62
+ | 1.0689 | 0.7828 | 17500 | 0.7208 |
63
+ | 1.0685 | 0.8947 | 20000 | 0.7183 |
64
+ | 1.0543 | 1.0065 | 22500 | 0.7158 |
65
+ | 1.0412 | 1.1183 | 25000 | 0.7126 |
66
+ | 1.0488 | 1.2301 | 27500 | 0.7109 |
67
+ | 1.0496 | 1.3420 | 30000 | 0.7101 |
68
+ | 1.0442 | 1.4538 | 32500 | 0.7088 |
69
+ | 1.0533 | 1.5656 | 35000 | 0.7079 |
70
+ | 1.0461 | 1.6775 | 37500 | 0.7060 |
71
+ | 1.0387 | 1.7893 | 40000 | 0.7059 |
72
+ | 1.0214 | 1.9011 | 42500 | 0.7045 |
73
+ | 1.0396 | 2.0130 | 45000 | 0.7053 |
74
+ | 1.0423 | 2.1248 | 47500 | 0.7044 |
75
+ | 1.0384 | 2.2366 | 50000 | 0.7039 |
76
+ | 1.0091 | 2.3485 | 52500 | 0.7041 |
77
+ | 1.0277 | 2.4603 | 55000 | 0.7040 |
78
+ | 1.0194 | 2.5721 | 57500 | 0.7039 |
79
+ | 1.0365 | 2.6840 | 60000 | 0.7034 |
80
+ | 1.0378 | 2.7958 | 62500 | 0.7021 |
81
+ | 1.0315 | 2.9076 | 65000 | 0.7025 |
82
+ | 1.0308 | 3.0195 | 67500 | 0.7021 |
83
+ | 1.0054 | 3.1313 | 70000 | 0.7022 |
84
+ | 1.0275 | 3.2431 | 72500 | 0.7027 |
85
+ | 1.024 | 3.3550 | 75000 | 0.7030 |
86
+ | 1.0199 | 3.4668 | 77500 | 0.7018 |
87
+ | 1.028 | 3.5786 | 80000 | 0.7021 |
88
+ | 1.0292 | 3.6904 | 82500 | 0.7017 |
89
+ | 1.017 | 3.8023 | 85000 | 0.7014 |
90
+ | 1.0202 | 3.9141 | 87500 | 0.7012 |
91
+ | 1.01 | 4.0259 | 90000 | 0.7021 |
92
+ | 1.0117 | 4.1378 | 92500 | 0.7015 |
93
+ | 1.0078 | 4.2496 | 95000 | 0.7010 |
94
+ | 1.0181 | 4.3614 | 97500 | 0.7013 |
95
+ | 1.0158 | 4.4733 | 100000 | 0.7015 |
96
+ | 1.0185 | 4.5851 | 102500 | 0.7015 |
97
+ | 1.0145 | 4.6969 | 105000 | 0.7010 |
98
+ | 1.006 | 4.8088 | 107500 | 0.7010 |
99
+ | 1.0099 | 4.9206 | 110000 | 0.7008 |
100
+ | 1.0273 | 5.0324 | 112500 | 0.7010 |
101
+ | 1.0081 | 5.1443 | 115000 | 0.7012 |
102
+ | 1.0084 | 5.2561 | 117500 | 0.7011 |
103
+ | 1.0088 | 5.3679 | 120000 | 0.7012 |
104
+ | 1.0021 | 5.4798 | 122500 | 0.7009 |
105
+ | 1.0211 | 5.5916 | 125000 | 0.7009 |
106
+ | 1.023 | 5.7034 | 127500 | 0.7006 |
107
+ | 1.0143 | 5.8153 | 130000 | 0.7008 |
108
+ | 1.0082 | 5.9271 | 132500 | 0.7007 |
109
+ | 1.0142 | 6.0389 | 135000 | 0.7009 |
110
+ | 1.0221 | 6.1507 | 137500 | 0.7009 |
111
+ | 1.0245 | 6.2626 | 140000 | 0.7009 |
112
+ | 1.0134 | 6.3744 | 142500 | 0.7008 |
113
+ | 1.0098 | 6.4862 | 145000 | 0.7007 |
114
+ | 1.0123 | 6.5981 | 147500 | 0.7005 |
115
+ | 1.0016 | 6.7099 | 150000 | 0.7005 |
116
+ | 1.0123 | 6.8217 | 152500 | 0.7006 |
117
+ | 1.0085 | 6.9336 | 155000 | 0.7005 |
118
+ | 1.0138 | 7.0454 | 157500 | 0.7003 |
119
+ | 1.006 | 7.1572 | 160000 | 0.7006 |
120
+ | 1.0087 | 7.2691 | 162500 | 0.7005 |
121
+ | 1.0152 | 7.3809 | 165000 | 0.7008 |
122
+ | 1.0129 | 7.4927 | 167500 | 0.7008 |
123
+ | 0.992 | 7.6046 | 170000 | 0.7001 |
124
+ | 0.9972 | 7.7164 | 172500 | 0.7004 |
125
+ | 1.0168 | 7.8282 | 175000 | 0.7007 |
126
+ | 1.0053 | 7.9401 | 177500 | 0.7005 |
127
+ | 0.9945 | 8.0519 | 180000 | 0.7004 |
128
+ | 1.0186 | 8.1637 | 182500 | 0.7006 |
129
+ | 1.0209 | 8.2756 | 185000 | 0.7006 |
130
+ | 1.013 | 8.3874 | 187500 | 0.7006 |
131
+ | 1.0068 | 8.4992 | 190000 | 0.7006 |
132
+ | 0.9985 | 8.6110 | 192500 | 0.7005 |
133
+ | 1.0044 | 8.7229 | 195000 | 0.7005 |
134
+ | 1.0292 | 8.8347 | 197500 | 0.7005 |
135
+ | 1.0153 | 8.9465 | 200000 | 0.7004 |
136
+ | 1.0058 | 9.0584 | 202500 | 0.7005 |
137
+ | 0.9943 | 9.1702 | 205000 | 0.7005 |
138
+ | 1.015 | 9.2820 | 207500 | 0.7005 |
139
+ | 1.023 | 9.3939 | 210000 | 0.7006 |
140
+ | 1.0192 | 9.5057 | 212500 | 0.7005 |
141
+ | 1.0067 | 9.6175 | 215000 | 0.7005 |
142
+ | 1.0198 | 9.7294 | 217500 | 0.7006 |
143
+ | 0.988 | 9.8412 | 220000 | 0.7006 |
144
+ | 1.0098 | 9.9530 | 222500 | 0.7006 |
145
+
146
+
147
+ ### Framework versions
148
+
149
+ - PEFT 0.11.1
150
+ - Transformers 4.42.4
151
+ - Pytorch 2.3.1+cu121
152
+ - Datasets 2.20.0
153
+ - Tokenizers 0.19.1
adapter_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "microsoft/Phi-3-medium-4k-instruct",
5
+ "bias": "none",
6
+ "fan_in_fan_out": false,
7
+ "inference_mode": true,
8
+ "init_lora_weights": true,
9
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 64,
14
+ "lora_dropout": 0.05,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 128,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": [
23
+ "gate_proj",
24
+ "down_proj",
25
+ "v_proj",
26
+ "o_proj",
27
+ "up_proj",
28
+ "k_proj",
29
+ "q_proj"
30
+ ],
31
+ "task_type": "CAUSAL_LM",
32
+ "use_dora": false,
33
+ "use_rslora": false
34
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da216779a86005900a2012c80146c688917bc705db7c80fde7a804986811dc3c
3
+ size 340809136
added_tokens.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|assistant|>": 32001,
3
+ "<|endoftext|>": 32000,
4
+ "<|end|>": 32007,
5
+ "<|placeholder1|>": 32002,
6
+ "<|placeholder2|>": 32003,
7
+ "<|placeholder3|>": 32004,
8
+ "<|placeholder4|>": 32005,
9
+ "<|placeholder5|>": 32008,
10
+ "<|placeholder6|>": 32009,
11
+ "<|system|>": 32006,
12
+ "<|user|>": 32010
13
+ }
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": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<unk>",
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:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": true,
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": true,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "32000": {
31
+ "content": "<|endoftext|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "32001": {
39
+ "content": "<|assistant|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": true,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "32002": {
47
+ "content": "<|placeholder1|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": true,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "32003": {
55
+ "content": "<|placeholder2|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": true,
59
+ "single_word": false,
60
+ "special": true
61
+ },
62
+ "32004": {
63
+ "content": "<|placeholder3|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": true,
67
+ "single_word": false,
68
+ "special": true
69
+ },
70
+ "32005": {
71
+ "content": "<|placeholder4|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": true,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "32006": {
79
+ "content": "<|system|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": true,
83
+ "single_word": false,
84
+ "special": true
85
+ },
86
+ "32007": {
87
+ "content": "<|end|>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": true,
91
+ "single_word": false,
92
+ "special": true
93
+ },
94
+ "32008": {
95
+ "content": "<|placeholder5|>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": true,
99
+ "single_word": false,
100
+ "special": true
101
+ },
102
+ "32009": {
103
+ "content": "<|placeholder6|>",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": true,
107
+ "single_word": false,
108
+ "special": true
109
+ },
110
+ "32010": {
111
+ "content": "<|user|>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": true,
115
+ "single_word": false,
116
+ "special": true
117
+ }
118
+ },
119
+ "bos_token": "<s>",
120
+ "chat_template": "{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
121
+ "clean_up_tokenization_spaces": false,
122
+ "eos_token": "<|endoftext|>",
123
+ "legacy": false,
124
+ "model_max_length": 4096,
125
+ "pad_token": "<unk>",
126
+ "padding_side": "left",
127
+ "sp_model_kwargs": {},
128
+ "spaces_between_special_tokens": false,
129
+ "tokenizer_class": "LlamaTokenizer",
130
+ "unk_token": "<unk>",
131
+ "use_default_system_prompt": false
132
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea79016cf2225a4119b36066f398dacea82c84dea19d36cb2bfb2977d239d3aa
3
+ size 5368