Hmehdi515/mora
Browse files- README.md +153 -0
- adapter_config.json +35 -0
- adapter_model.safetensors +3 -0
- added_tokens.json +13 -0
- special_tokens_map.json +24 -0
- tokenizer.model +3 -0
- tokenizer_config.json +132 -0
- training_args.bin +3 -0
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-MoRA
|
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/rlpgnpbr)
|
18 |
+
# phi-3-medium-MoRA
|
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: 1.7627
|
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.0968 | 0.1118 | 2500 | 0.7399 |
|
57 |
+
| 1.0638 | 0.2237 | 5000 | 0.7234 |
|
58 |
+
| 1.0536 | 0.3355 | 7500 | 0.7156 |
|
59 |
+
| 1.0581 | 0.4473 | 10000 | 0.7128 |
|
60 |
+
| 1.0618 | 0.5592 | 12500 | 0.7125 |
|
61 |
+
| 1.0533 | 0.6710 | 15000 | 0.7131 |
|
62 |
+
| 1.0664 | 0.7828 | 17500 | 0.7133 |
|
63 |
+
| 1.0719 | 0.8947 | 20000 | 0.7160 |
|
64 |
+
| 1.0628 | 1.0065 | 22500 | 0.7210 |
|
65 |
+
| 0.9341 | 1.1183 | 25000 | 0.7241 |
|
66 |
+
| 0.9468 | 1.2301 | 27500 | 0.7235 |
|
67 |
+
| 0.9553 | 1.3420 | 30000 | 0.7271 |
|
68 |
+
| 0.9557 | 1.4538 | 32500 | 0.7242 |
|
69 |
+
| 0.9669 | 1.5656 | 35000 | 0.7244 |
|
70 |
+
| 0.9627 | 1.6775 | 37500 | 0.7220 |
|
71 |
+
| 0.963 | 1.7893 | 40000 | 0.7215 |
|
72 |
+
| 0.9493 | 1.9011 | 42500 | 0.7207 |
|
73 |
+
| 0.8938 | 2.0130 | 45000 | 0.7668 |
|
74 |
+
| 0.7061 | 2.1248 | 47500 | 0.7739 |
|
75 |
+
| 0.7105 | 2.2366 | 50000 | 0.7693 |
|
76 |
+
| 0.7046 | 2.3485 | 52500 | 0.7716 |
|
77 |
+
| 0.7241 | 2.4603 | 55000 | 0.7713 |
|
78 |
+
| 0.7273 | 2.5721 | 57500 | 0.7669 |
|
79 |
+
| 0.7443 | 2.6840 | 60000 | 0.7685 |
|
80 |
+
| 0.7457 | 2.7958 | 62500 | 0.7664 |
|
81 |
+
| 0.7436 | 2.9076 | 65000 | 0.7659 |
|
82 |
+
| 0.7525 | 3.0195 | 67500 | 0.8617 |
|
83 |
+
| 0.465 | 3.1313 | 70000 | 0.8682 |
|
84 |
+
| 0.4823 | 3.2431 | 72500 | 0.8798 |
|
85 |
+
| 0.4865 | 3.3550 | 75000 | 0.8763 |
|
86 |
+
| 0.4977 | 3.4668 | 77500 | 0.8613 |
|
87 |
+
| 0.5088 | 3.5786 | 80000 | 0.8627 |
|
88 |
+
| 0.5136 | 3.6904 | 82500 | 0.8681 |
|
89 |
+
| 0.5128 | 3.8023 | 85000 | 0.8486 |
|
90 |
+
| 0.525 | 3.9141 | 87500 | 0.8585 |
|
91 |
+
| 0.3967 | 4.0259 | 90000 | 0.9826 |
|
92 |
+
| 0.3016 | 4.1378 | 92500 | 0.9951 |
|
93 |
+
| 0.3167 | 4.2496 | 95000 | 1.0293 |
|
94 |
+
| 0.3179 | 4.3614 | 97500 | 0.9904 |
|
95 |
+
| 0.3292 | 4.4733 | 100000 | 0.9947 |
|
96 |
+
| 0.3346 | 4.5851 | 102500 | 0.9932 |
|
97 |
+
| 0.3405 | 4.6969 | 105000 | 0.9715 |
|
98 |
+
| 0.344 | 4.8088 | 107500 | 0.9974 |
|
99 |
+
| 0.3497 | 4.9206 | 110000 | 0.9929 |
|
100 |
+
| 0.3226 | 5.0324 | 112500 | 1.1483 |
|
101 |
+
| 0.2071 | 5.1443 | 115000 | 1.1669 |
|
102 |
+
| 0.2131 | 5.2561 | 117500 | 1.1275 |
|
103 |
+
| 0.2204 | 5.3679 | 120000 | 1.1513 |
|
104 |
+
| 0.222 | 5.4798 | 122500 | 1.1549 |
|
105 |
+
| 0.2287 | 5.5916 | 125000 | 1.1552 |
|
106 |
+
| 0.2315 | 5.7034 | 127500 | 1.1370 |
|
107 |
+
| 0.2359 | 5.8153 | 130000 | 1.1318 |
|
108 |
+
| 0.2362 | 5.9271 | 132500 | 1.1461 |
|
109 |
+
| 0.1611 | 6.0389 | 135000 | 1.2983 |
|
110 |
+
| 0.1527 | 6.1507 | 137500 | 1.3192 |
|
111 |
+
| 0.1593 | 6.2626 | 140000 | 1.3295 |
|
112 |
+
| 0.16 | 6.3744 | 142500 | 1.3048 |
|
113 |
+
| 0.1647 | 6.4862 | 145000 | 1.3161 |
|
114 |
+
| 0.1659 | 6.5981 | 147500 | 1.2908 |
|
115 |
+
| 0.1666 | 6.7099 | 150000 | 1.3202 |
|
116 |
+
| 0.1692 | 6.8217 | 152500 | 1.3039 |
|
117 |
+
| 0.1711 | 6.9336 | 155000 | 1.2895 |
|
118 |
+
| 0.1433 | 7.0454 | 157500 | 1.4769 |
|
119 |
+
| 0.122 | 7.1572 | 160000 | 1.4877 |
|
120 |
+
| 0.1225 | 7.2691 | 162500 | 1.4722 |
|
121 |
+
| 0.1261 | 7.3809 | 165000 | 1.4794 |
|
122 |
+
| 0.1262 | 7.4927 | 167500 | 1.4749 |
|
123 |
+
| 0.1274 | 7.6046 | 170000 | 1.4719 |
|
124 |
+
| 0.1287 | 7.7164 | 172500 | 1.4495 |
|
125 |
+
| 0.1298 | 7.8282 | 175000 | 1.4753 |
|
126 |
+
| 0.1304 | 7.9401 | 177500 | 1.4705 |
|
127 |
+
| 0.1 | 8.0519 | 180000 | 1.6185 |
|
128 |
+
| 0.1038 | 8.1637 | 182500 | 1.6353 |
|
129 |
+
| 0.1053 | 8.2756 | 185000 | 1.6272 |
|
130 |
+
| 0.1054 | 8.3874 | 187500 | 1.6138 |
|
131 |
+
| 0.1057 | 8.4992 | 190000 | 1.6226 |
|
132 |
+
| 0.1061 | 8.6110 | 192500 | 1.6407 |
|
133 |
+
| 0.1068 | 8.7229 | 195000 | 1.6334 |
|
134 |
+
| 0.1082 | 8.8347 | 197500 | 1.6358 |
|
135 |
+
| 0.1063 | 8.9465 | 200000 | 1.6325 |
|
136 |
+
| 0.0936 | 9.0584 | 202500 | 1.7572 |
|
137 |
+
| 0.091 | 9.1702 | 205000 | 1.7476 |
|
138 |
+
| 0.0932 | 9.2820 | 207500 | 1.7529 |
|
139 |
+
| 0.0932 | 9.3939 | 210000 | 1.7541 |
|
140 |
+
| 0.0935 | 9.5057 | 212500 | 1.7595 |
|
141 |
+
| 0.0931 | 9.6175 | 215000 | 1.7609 |
|
142 |
+
| 0.0937 | 9.7294 | 217500 | 1.7647 |
|
143 |
+
| 0.0922 | 9.8412 | 220000 | 1.7643 |
|
144 |
+
| 0.0925 | 9.9530 | 222500 | 1.7627 |
|
145 |
+
|
146 |
+
|
147 |
+
### Framework versions
|
148 |
+
|
149 |
+
- PEFT 0.9.0
|
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,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"loftq_config": {},
|
12 |
+
"lora_alpha": 64,
|
13 |
+
"lora_dropout": 0.05,
|
14 |
+
"megatron_config": null,
|
15 |
+
"megatron_core": "megatron.core",
|
16 |
+
"modules_to_save": null,
|
17 |
+
"mora_type": 6,
|
18 |
+
"peft_type": "LORA",
|
19 |
+
"r": 128,
|
20 |
+
"rank_pattern": {},
|
21 |
+
"revision": null,
|
22 |
+
"target_modules": [
|
23 |
+
"down_proj",
|
24 |
+
"q_proj",
|
25 |
+
"o_proj",
|
26 |
+
"v_proj",
|
27 |
+
"up_proj",
|
28 |
+
"gate_proj",
|
29 |
+
"k_proj"
|
30 |
+
],
|
31 |
+
"task_type": "CAUSAL_LM",
|
32 |
+
"use_dora": false,
|
33 |
+
"use_mora": true,
|
34 |
+
"use_rslora": false
|
35 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f4751be4cb569f86b0c63db862fea63818d73a17e837c9421b4df7666a61f2e9
|
3 |
+
size 1361107496
|
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:23d531327f855d9618dca127ca29e3e4b74851a7e35579dcea087311d1af85d8
|
3 |
+
size 5368
|