Lansechen commited on
Commit
7b67944
·
verified ·
1 Parent(s): 790af1a

Model save

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: allenai/OLMoE-1B-7B-0125-Instruct
3
+ library_name: transformers
4
+ model_name: OLMoE-1B-7B-0125-Instruct-Distill-bs17k-batch32-epoch1-8192
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for OLMoE-1B-7B-0125-Instruct-Distill-bs17k-batch32-epoch1-8192
13
+
14
+ This model is a fine-tuned version of [allenai/OLMoE-1B-7B-0125-Instruct](https://huggingface.co/allenai/OLMoE-1B-7B-0125-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="Lansechen/OLMoE-1B-7B-0125-Instruct-Distill-bs17k-batch32-epoch1-8192", 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/chenran1995-the-chinese-university-of-hong-kong/huggingface/runs/h5ipgyj1)
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.16.0.dev0
38
+ - Transformers: 4.49.0
39
+ - Pytorch: 2.5.1+cu121
40
+ - Datasets: 3.3.1
41
+ - Tokenizers: 0.21.0
42
+
43
+ ## Citations
44
+
45
+
46
+
47
+ Cite TRL as:
48
+
49
+ ```bibtex
50
+ @misc{vonwerra2022trl,
51
+ title = {{TRL: Transformer Reinforcement Learning}},
52
+ 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},
53
+ year = 2020,
54
+ journal = {GitHub repository},
55
+ publisher = {GitHub},
56
+ howpublished = {\url{https://github.com/huggingface/trl}}
57
+ }
58
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 71084393103360.0,
3
+ "train_loss": 1.2520353261162254,
4
+ "train_runtime": 7437.5066,
5
+ "train_samples": 16610,
6
+ "train_samples_per_second": 1.463,
7
+ "train_steps_per_second": 0.011
8
+ }
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "allenai/OLMoE-1B-7B-0125-Instruct",
3
+ "architectures": [
4
+ "OlmoeForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "clip_qkv": null,
9
+ "eos_token_id": 50279,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1024,
14
+ "max_position_embeddings": 4096,
15
+ "model_type": "olmoe",
16
+ "norm_topk_prob": false,
17
+ "num_attention_heads": 16,
18
+ "num_experts": 64,
19
+ "num_experts_per_tok": 8,
20
+ "num_hidden_layers": 16,
21
+ "num_key_value_heads": 16,
22
+ "output_router_logits": false,
23
+ "pad_token_id": 1,
24
+ "rms_norm_eps": 1e-05,
25
+ "rope_scaling": null,
26
+ "rope_theta": 10000.0,
27
+ "router_aux_loss_coef": 0.01,
28
+ "tie_word_embeddings": false,
29
+ "torch_dtype": "bfloat16",
30
+ "transformers_version": "4.49.0",
31
+ "use_cache": false,
32
+ "vocab_size": 50304
33
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": 50279,
4
+ "pad_token_id": 1,
5
+ "transformers_version": "4.49.0"
6
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d4e621d5d6997a455bafb6cbf97a0076848e33d45487ec5d629f35286e69ac1
3
+ size 4997744872
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8aad31d681e5ec1829269de2730a13dc65c8308f14c7faa7a4389b705626137e
3
+ size 4997235176
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52ffa301c644f3244371b32e10b484591d5a44f450ba34b438fa1fed29ac485a
3
+ size 3843741912
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "|||IP_ADDRESS|||",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "|||IP_ADDRESS|||",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "|||IP_ADDRESS|||"
17
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": false,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<|padding|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "50254": {
23
+ "content": " ",
24
+ "lstrip": false,
25
+ "normalized": true,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "50255": {
31
+ "content": " ",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "50256": {
39
+ "content": " ",
40
+ "lstrip": false,
41
+ "normalized": true,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "50257": {
47
+ "content": " ",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "50258": {
55
+ "content": " ",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "50259": {
63
+ "content": " ",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "50260": {
71
+ "content": " ",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": false
77
+ },
78
+ "50261": {
79
+ "content": " ",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "50262": {
87
+ "content": " ",
88
+ "lstrip": false,
89
+ "normalized": true,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "50263": {
95
+ "content": " ",
96
+ "lstrip": false,
97
+ "normalized": true,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": false
101
+ },
102
+ "50264": {
103
+ "content": " ",
104
+ "lstrip": false,
105
+ "normalized": true,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": false
109
+ },
110
+ "50265": {
111
+ "content": " ",
112
+ "lstrip": false,
113
+ "normalized": true,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": false
117
+ },
118
+ "50266": {
119
+ "content": " ",
120
+ "lstrip": false,
121
+ "normalized": true,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": false
125
+ },
126
+ "50267": {
127
+ "content": " ",
128
+ "lstrip": false,
129
+ "normalized": true,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": false
133
+ },
134
+ "50268": {
135
+ "content": " ",
136
+ "lstrip": false,
137
+ "normalized": true,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "50269": {
143
+ "content": " ",
144
+ "lstrip": false,
145
+ "normalized": true,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ },
150
+ "50270": {
151
+ "content": " ",
152
+ "lstrip": false,
153
+ "normalized": true,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": false
157
+ },
158
+ "50271": {
159
+ "content": " ",
160
+ "lstrip": false,
161
+ "normalized": true,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": false
165
+ },
166
+ "50272": {
167
+ "content": " ",
168
+ "lstrip": false,
169
+ "normalized": true,
170
+ "rstrip": false,
171
+ "single_word": false,
172
+ "special": false
173
+ },
174
+ "50273": {
175
+ "content": " ",
176
+ "lstrip": false,
177
+ "normalized": true,
178
+ "rstrip": false,
179
+ "single_word": false,
180
+ "special": false
181
+ },
182
+ "50274": {
183
+ "content": " ",
184
+ "lstrip": false,
185
+ "normalized": true,
186
+ "rstrip": false,
187
+ "single_word": false,
188
+ "special": false
189
+ },
190
+ "50275": {
191
+ "content": " ",
192
+ "lstrip": false,
193
+ "normalized": true,
194
+ "rstrip": false,
195
+ "single_word": false,
196
+ "special": false
197
+ },
198
+ "50276": {
199
+ "content": " ",
200
+ "lstrip": false,
201
+ "normalized": true,
202
+ "rstrip": false,
203
+ "single_word": false,
204
+ "special": false
205
+ },
206
+ "50277": {
207
+ "content": "|||EMAIL_ADDRESS|||",
208
+ "lstrip": false,
209
+ "normalized": true,
210
+ "rstrip": false,
211
+ "single_word": false,
212
+ "special": false
213
+ },
214
+ "50278": {
215
+ "content": "|||PHONE_NUMBER|||",
216
+ "lstrip": false,
217
+ "normalized": true,
218
+ "rstrip": false,
219
+ "single_word": false,
220
+ "special": false
221
+ },
222
+ "50279": {
223
+ "content": "|||IP_ADDRESS|||",
224
+ "lstrip": false,
225
+ "normalized": true,
226
+ "rstrip": false,
227
+ "single_word": false,
228
+ "special": true
229
+ },
230
+ "50280": {
231
+ "content": "<pad>",
232
+ "lstrip": false,
233
+ "normalized": false,
234
+ "rstrip": false,
235
+ "single_word": false,
236
+ "special": true
237
+ }
238
+ },
239
+ "bos_token": "|||IP_ADDRESS|||",
240
+ "chat_template": "{{ bos_token }}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|system|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'user' %}{{ '<|user|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'assistant' %}{% if not loop.last %}{{ '<|assistant|>\n' + message['content'] + eos_token + '\n' }}{% else %}{{ '<|assistant|>\n' + message['content'] + eos_token }}{% endif %}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|assistant|>\n' }}{% endif %}{% endfor %}",
241
+ "clean_up_tokenization_spaces": false,
242
+ "eos_token": "|||IP_ADDRESS|||",
243
+ "extra_special_tokens": {},
244
+ "model_max_length": 1000000000000000019884624838656,
245
+ "pad_token": "|||IP_ADDRESS|||",
246
+ "tokenizer_class": "GPTNeoXTokenizer",
247
+ "unk_token": null
248
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 71084393103360.0,
3
+ "train_loss": 1.2520353261162254,
4
+ "train_runtime": 7437.5066,
5
+ "train_samples": 16610,
6
+ "train_samples_per_second": 1.463,
7
+ "train_steps_per_second": 0.011
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 100,
6
+ "global_step": 85,
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.058823529411764705,
13
+ "grad_norm": 11.891107559204102,
14
+ "learning_rate": 1.1111111111111113e-05,
15
+ "loss": 3.299,
16
+ "mean_token_accuracy": 0.4547618865966797,
17
+ "step": 5
18
+ },
19
+ {
20
+ "epoch": 0.11764705882352941,
21
+ "grad_norm": 3.044015884399414,
22
+ "learning_rate": 1.999145758387301e-05,
23
+ "loss": 2.3198,
24
+ "mean_token_accuracy": 0.5092985607683659,
25
+ "step": 10
26
+ },
27
+ {
28
+ "epoch": 0.17647058823529413,
29
+ "grad_norm": 1.4847815036773682,
30
+ "learning_rate": 1.9694002659393306e-05,
31
+ "loss": 1.7828,
32
+ "mean_token_accuracy": 0.5745997056365013,
33
+ "step": 15
34
+ },
35
+ {
36
+ "epoch": 0.23529411764705882,
37
+ "grad_norm": 0.9522435069084167,
38
+ "learning_rate": 1.898390981891979e-05,
39
+ "loss": 1.4,
40
+ "mean_token_accuracy": 0.6392715856432915,
41
+ "step": 20
42
+ },
43
+ {
44
+ "epoch": 0.29411764705882354,
45
+ "grad_norm": 0.6069338321685791,
46
+ "learning_rate": 1.789140509396394e-05,
47
+ "loss": 1.1739,
48
+ "mean_token_accuracy": 0.6828911945223808,
49
+ "step": 25
50
+ },
51
+ {
52
+ "epoch": 0.35294117647058826,
53
+ "grad_norm": 0.5275129079818726,
54
+ "learning_rate": 1.646299237860941e-05,
55
+ "loss": 1.0771,
56
+ "mean_token_accuracy": 0.7027453184127808,
57
+ "step": 30
58
+ },
59
+ {
60
+ "epoch": 0.4117647058823529,
61
+ "grad_norm": 0.6234576106071472,
62
+ "learning_rate": 1.4759473930370738e-05,
63
+ "loss": 1.0115,
64
+ "mean_token_accuracy": 0.7170437932014465,
65
+ "step": 35
66
+ },
67
+ {
68
+ "epoch": 0.47058823529411764,
69
+ "grad_norm": 0.3768845498561859,
70
+ "learning_rate": 1.2853362242491054e-05,
71
+ "loss": 0.9793,
72
+ "mean_token_accuracy": 0.7235300198197365,
73
+ "step": 40
74
+ },
75
+ {
76
+ "epoch": 0.5294117647058824,
77
+ "grad_norm": 0.5602439045906067,
78
+ "learning_rate": 1.0825793454723325e-05,
79
+ "loss": 0.9547,
80
+ "mean_token_accuracy": 0.7290156945586205,
81
+ "step": 45
82
+ },
83
+ {
84
+ "epoch": 0.5882352941176471,
85
+ "grad_norm": 1.601157784461975,
86
+ "learning_rate": 8.763073687306523e-06,
87
+ "loss": 0.9258,
88
+ "mean_token_accuracy": 0.7356743782758712,
89
+ "step": 50
90
+ },
91
+ {
92
+ "epoch": 0.6470588235294118,
93
+ "grad_norm": 0.3758750259876251,
94
+ "learning_rate": 6.7530053079531664e-06,
95
+ "loss": 0.9166,
96
+ "mean_token_accuracy": 0.7379220128059387,
97
+ "step": 55
98
+ },
99
+ {
100
+ "epoch": 0.7058823529411765,
101
+ "grad_norm": 0.2922804057598114,
102
+ "learning_rate": 4.881149509103993e-06,
103
+ "loss": 0.9147,
104
+ "mean_token_accuracy": 0.7374181285500526,
105
+ "step": 60
106
+ },
107
+ {
108
+ "epoch": 0.7647058823529411,
109
+ "grad_norm": 0.322323203086853,
110
+ "learning_rate": 3.2271842837425917e-06,
111
+ "loss": 0.9176,
112
+ "mean_token_accuracy": 0.7366804420948029,
113
+ "step": 65
114
+ },
115
+ {
116
+ "epoch": 0.8235294117647058,
117
+ "grad_norm": 0.2906600832939148,
118
+ "learning_rate": 1.861512827298051e-06,
119
+ "loss": 0.9045,
120
+ "mean_token_accuracy": 0.7401018545031548,
121
+ "step": 70
122
+ },
123
+ {
124
+ "epoch": 0.8823529411764706,
125
+ "grad_norm": 0.33901330828666687,
126
+ "learning_rate": 8.42266733449425e-07,
127
+ "loss": 0.8977,
128
+ "mean_token_accuracy": 0.7416183516383171,
129
+ "step": 75
130
+ },
131
+ {
132
+ "epoch": 0.9411764705882353,
133
+ "grad_norm": 0.2457120567560196,
134
+ "learning_rate": 2.1283154672645522e-07,
135
+ "loss": 0.9017,
136
+ "mean_token_accuracy": 0.7403849691152573,
137
+ "step": 80
138
+ },
139
+ {
140
+ "epoch": 1.0,
141
+ "grad_norm": 0.3804878890514374,
142
+ "learning_rate": 0.0,
143
+ "loss": 0.9078,
144
+ "mean_token_accuracy": 0.7387076124548912,
145
+ "step": 85
146
+ },
147
+ {
148
+ "epoch": 1.0,
149
+ "step": 85,
150
+ "total_flos": 71084393103360.0,
151
+ "train_loss": 1.2520353261162254,
152
+ "train_runtime": 7437.5066,
153
+ "train_samples_per_second": 1.463,
154
+ "train_steps_per_second": 0.011
155
+ }
156
+ ],
157
+ "logging_steps": 5,
158
+ "max_steps": 85,
159
+ "num_input_tokens_seen": 0,
160
+ "num_train_epochs": 1,
161
+ "save_steps": 500,
162
+ "stateful_callbacks": {
163
+ "TrainerControl": {
164
+ "args": {
165
+ "should_epoch_stop": false,
166
+ "should_evaluate": false,
167
+ "should_log": false,
168
+ "should_save": false,
169
+ "should_training_stop": false
170
+ },
171
+ "attributes": {}
172
+ }
173
+ },
174
+ "total_flos": 71084393103360.0,
175
+ "train_batch_size": 4,
176
+ "trial_name": null,
177
+ "trial_params": null
178
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a59eef3c2c972e983e64a5dfba765b9ebfc1a8b833f5e07aca32185cf656653
3
+ size 7544