Nataliia767567 commited on
Commit
76a71a7
·
verified ·
1 Parent(s): 09fdf8f

End of training

Browse files
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/Phi-3-mini-4k-instruct
3
+ library_name: transformers
4
+ model_name: checkpoint_dir
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for checkpoint_dir
13
+
14
+ This model is a fine-tuned version of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct).
15
+ It has been trained using [TRL](https://github.com/huggingface/trl).
16
+
17
+ ## Quick start
18
+
19
+ ```python
20
+ from transformers import pipeline
21
+
22
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
+ generator = pipeline("text-generation", model="Nataliia767567/checkpoint_dir", device="cuda")
24
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
+ print(output["generated_text"])
26
+ ```
27
+
28
+ ## Training procedure
29
+
30
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/natalipolyakovska-softserve/huggingface/runs/quti29p3)
31
+
32
+ This model was trained with SFT.
33
+
34
+ ### Framework versions
35
+
36
+ - TRL: 0.12.0
37
+ - Transformers: 4.47.1
38
+ - Pytorch: 2.2.2
39
+ - Datasets: 3.2.0
40
+ - Tokenizers: 0.21.0
41
+
42
+ ## Citations
43
+
44
+
45
+
46
+ Cite TRL as:
47
+
48
+ ```bibtex
49
+ @misc{vonwerra2022trl,
50
+ title = {{TRL: Transformer Reinforcement Learning}},
51
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
52
+ year = 2020,
53
+ journal = {GitHub repository},
54
+ publisher = {GitHub},
55
+ howpublished = {\url{https://github.com/huggingface/trl}}
56
+ }
57
+ ```
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-mini-4k-instruct",
5
+ "bias": "none",
6
+ "eva_config": null,
7
+ "exclude_modules": null,
8
+ "fan_in_fan_out": false,
9
+ "inference_mode": true,
10
+ "init_lora_weights": true,
11
+ "layer_replication": null,
12
+ "layers_pattern": null,
13
+ "layers_to_transform": null,
14
+ "loftq_config": {},
15
+ "lora_alpha": 32,
16
+ "lora_bias": false,
17
+ "lora_dropout": 0.05,
18
+ "megatron_config": null,
19
+ "megatron_core": "megatron.core",
20
+ "modules_to_save": null,
21
+ "peft_type": "LORA",
22
+ "r": 16,
23
+ "rank_pattern": {},
24
+ "revision": null,
25
+ "target_modules": [
26
+ "down_proj",
27
+ "o_proj",
28
+ "qkv_proj",
29
+ "gate_up_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:8fc0555ab7f5e0a79947dcb4064284ae36cd9b113b0f114189840fb5c5b2a358
3
+ size 100697728
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
+ }
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 1.519725494403072e+16,
4
+ "train_loss": 0.958257312485666,
5
+ "train_runtime": 404.051,
6
+ "train_samples_per_second": 3.267,
7
+ "train_steps_per_second": 0.817
8
+ }
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.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,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
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'] == 'system' %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}",
121
+ "clean_up_tokenization_spaces": false,
122
+ "eos_token": "<|endoftext|>",
123
+ "extra_special_tokens": {},
124
+ "legacy": false,
125
+ "model_max_length": 2048,
126
+ "pad_token": "<unk>",
127
+ "padding_side": "left",
128
+ "sp_model_kwargs": {},
129
+ "tokenizer_class": "LlamaTokenizer",
130
+ "unk_token": "<unk>",
131
+ "use_default_system_prompt": false
132
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 1.519725494403072e+16,
4
+ "train_loss": 0.958257312485666,
5
+ "train_runtime": 404.051,
6
+ "train_samples_per_second": 3.267,
7
+ "train_steps_per_second": 0.817
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 500,
6
+ "global_step": 330,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.06060606060606061,
13
+ "grad_norm": 0.36308756470680237,
14
+ "learning_rate": 1.5151515151515152e-06,
15
+ "loss": 1.3855,
16
+ "step": 20
17
+ },
18
+ {
19
+ "epoch": 0.12121212121212122,
20
+ "grad_norm": 0.3340895473957062,
21
+ "learning_rate": 3.0303030303030305e-06,
22
+ "loss": 1.3679,
23
+ "step": 40
24
+ },
25
+ {
26
+ "epoch": 0.18181818181818182,
27
+ "grad_norm": 0.3473477363586426,
28
+ "learning_rate": 4.5454545454545455e-06,
29
+ "loss": 1.3813,
30
+ "step": 60
31
+ },
32
+ {
33
+ "epoch": 0.24242424242424243,
34
+ "grad_norm": 0.35594913363456726,
35
+ "learning_rate": 4.965385884295467e-06,
36
+ "loss": 1.2987,
37
+ "step": 80
38
+ },
39
+ {
40
+ "epoch": 0.30303030303030304,
41
+ "grad_norm": 0.39734789729118347,
42
+ "learning_rate": 4.798150758954164e-06,
43
+ "loss": 1.237,
44
+ "step": 100
45
+ },
46
+ {
47
+ "epoch": 0.36363636363636365,
48
+ "grad_norm": 0.42136889696121216,
49
+ "learning_rate": 4.501353102310901e-06,
50
+ "loss": 1.1311,
51
+ "step": 120
52
+ },
53
+ {
54
+ "epoch": 0.42424242424242425,
55
+ "grad_norm": 0.557064414024353,
56
+ "learning_rate": 4.091725435297721e-06,
57
+ "loss": 1.0763,
58
+ "step": 140
59
+ },
60
+ {
61
+ "epoch": 0.48484848484848486,
62
+ "grad_norm": 0.5050609707832336,
63
+ "learning_rate": 3.5923612809233987e-06,
64
+ "loss": 0.9135,
65
+ "step": 160
66
+ },
67
+ {
68
+ "epoch": 0.5454545454545454,
69
+ "grad_norm": 0.43929287791252136,
70
+ "learning_rate": 3.0314132238824416e-06,
71
+ "loss": 0.7968,
72
+ "step": 180
73
+ },
74
+ {
75
+ "epoch": 0.6060606060606061,
76
+ "grad_norm": 0.39808526635169983,
77
+ "learning_rate": 2.440505756134732e-06,
78
+ "loss": 0.74,
79
+ "step": 200
80
+ },
81
+ {
82
+ "epoch": 0.6666666666666666,
83
+ "grad_norm": 0.45625489950180054,
84
+ "learning_rate": 1.852952387243698e-06,
85
+ "loss": 0.7124,
86
+ "step": 220
87
+ },
88
+ {
89
+ "epoch": 0.7272727272727273,
90
+ "grad_norm": 0.4360494017601013,
91
+ "learning_rate": 1.301877533199859e-06,
92
+ "loss": 0.6832,
93
+ "step": 240
94
+ },
95
+ {
96
+ "epoch": 0.7878787878787878,
97
+ "grad_norm": 0.38371819257736206,
98
+ "learning_rate": 8.183490657468687e-07,
99
+ "loss": 0.6885,
100
+ "step": 260
101
+ },
102
+ {
103
+ "epoch": 0.8484848484848485,
104
+ "grad_norm": 0.36575645208358765,
105
+ "learning_rate": 4.2962680322157335e-07,
106
+ "loss": 0.6905,
107
+ "step": 280
108
+ },
109
+ {
110
+ "epoch": 0.9090909090909091,
111
+ "grad_norm": 0.5191577672958374,
112
+ "learning_rate": 1.5762568750059604e-07,
113
+ "loss": 0.6939,
114
+ "step": 300
115
+ },
116
+ {
117
+ "epoch": 0.9696969696969697,
118
+ "grad_norm": 0.42232680320739746,
119
+ "learning_rate": 1.768028831677926e-08,
120
+ "loss": 0.6645,
121
+ "step": 320
122
+ },
123
+ {
124
+ "epoch": 1.0,
125
+ "step": 330,
126
+ "total_flos": 1.519725494403072e+16,
127
+ "train_loss": 0.958257312485666,
128
+ "train_runtime": 404.051,
129
+ "train_samples_per_second": 3.267,
130
+ "train_steps_per_second": 0.817
131
+ }
132
+ ],
133
+ "logging_steps": 20,
134
+ "max_steps": 330,
135
+ "num_input_tokens_seen": 0,
136
+ "num_train_epochs": 1,
137
+ "save_steps": 100,
138
+ "stateful_callbacks": {
139
+ "TrainerControl": {
140
+ "args": {
141
+ "should_epoch_stop": false,
142
+ "should_evaluate": false,
143
+ "should_log": false,
144
+ "should_save": true,
145
+ "should_training_stop": true
146
+ },
147
+ "attributes": {}
148
+ }
149
+ },
150
+ "total_flos": 1.519725494403072e+16,
151
+ "train_batch_size": 4,
152
+ "trial_name": null,
153
+ "trial_params": null
154
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24310e9e268e29b36db0c9e81ba1121db50fee4045b249ce0eccd252583b8300
3
+ size 5624