jimmychin commited on
Commit
a642db4
·
verified ·
1 Parent(s): fa241db

End of training

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen1.5-0.5B-Chat
3
+ library_name: transformers
4
+ model_name: Qwen1.5-0.5B-Chat-Gensyn-Swarm-barky_sedate_albatross
5
+ tags:
6
+ - generated_from_trainer
7
+ - rl-swarm
8
+ - grpo
9
+ - gensyn
10
+ - I am barky sedate albatross
11
+ - trl
12
+ licence: license
13
+ ---
14
+
15
+ # Model Card for Qwen1.5-0.5B-Chat-Gensyn-Swarm-barky_sedate_albatross
16
+
17
+ This model is a fine-tuned version of [Qwen/Qwen1.5-0.5B-Chat](https://huggingface.co/Qwen/Qwen1.5-0.5B-Chat).
18
+ It has been trained using [TRL](https://github.com/huggingface/trl).
19
+
20
+ ## Quick start
21
+
22
+ ```python
23
+ from transformers import pipeline
24
+
25
+ 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?"
26
+ generator = pipeline("text-generation", model="jimmychin/Qwen1.5-0.5B-Chat-Gensyn-Swarm-barky_sedate_albatross", device="cuda")
27
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
28
+ print(output["generated_text"])
29
+ ```
30
+
31
+ ## Training procedure
32
+
33
+
34
+
35
+
36
+ This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).
37
+
38
+ ### Framework versions
39
+
40
+ - TRL: 0.15.2
41
+ - Transformers: 4.51.3
42
+ - Pytorch: 2.6.0
43
+ - Datasets: 3.5.0
44
+ - Tokenizers: 0.21.1
45
+
46
+ ## Citations
47
+
48
+ Cite GRPO as:
49
+
50
+ ```bibtex
51
+ @article{zhihong2024deepseekmath,
52
+ title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
53
+ author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
54
+ year = 2024,
55
+ eprint = {arXiv:2402.03300},
56
+ }
57
+
58
+ ```
59
+
60
+ Cite TRL as:
61
+
62
+ ```bibtex
63
+ @misc{vonwerra2022trl,
64
+ title = {{TRL: Transformer Reinforcement Learning}},
65
+ 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},
66
+ year = 2020,
67
+ journal = {GitHub repository},
68
+ publisher = {GitHub},
69
+ howpublished = {\url{https://github.com/huggingface/trl}}
70
+ }
71
+ ```
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 0.0,
3
+ "train_loss": 3.0766487361688634e-05,
4
+ "train_runtime": 15532.1172,
5
+ "train_samples": 31,
6
+ "train_samples_per_second": 0.021,
7
+ "train_steps_per_second": 0.001
8
+ }
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "eos_token_id": 151645,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 1024,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 2816,
12
+ "max_position_embeddings": 32768,
13
+ "max_window_layers": 21,
14
+ "model_type": "qwen2",
15
+ "num_attention_heads": 16,
16
+ "num_hidden_layers": 24,
17
+ "num_key_value_heads": 16,
18
+ "rms_norm_eps": 1e-06,
19
+ "rope_scaling": null,
20
+ "rope_theta": 1000000.0,
21
+ "sliding_window": 32768,
22
+ "tie_word_embeddings": true,
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.51.3",
25
+ "use_cache": true,
26
+ "use_sliding_window": false,
27
+ "vocab_size": 151936
28
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "repetition_penalty": 1.1,
10
+ "top_p": 0.8,
11
+ "transformers_version": "4.51.3"
12
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91c0c764ca0d933b93819ff7bc0585a7efbb24e10508fb899d9467e6278c0cec
3
+ size 1855983640
special_tokens_map.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": {
14
+ "content": "<|endoftext|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ }
20
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7c852534ad33d333aa478034d64cd37cb14da033a24674c4b2518300f488efa
3
+ size 11418433
tokenizer_config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
35
+ "clean_up_tokenization_spaces": false,
36
+ "eos_token": "<|im_end|>",
37
+ "errors": "replace",
38
+ "extra_special_tokens": {},
39
+ "model_max_length": 32768,
40
+ "pad_token": "<|endoftext|>",
41
+ "split_special_tokens": false,
42
+ "tokenizer_class": "Qwen2Tokenizer",
43
+ "unk_token": null
44
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 0.0,
3
+ "train_loss": 3.0766487361688634e-05,
4
+ "train_runtime": 15532.1172,
5
+ "train_samples": 31,
6
+ "train_samples_per_second": 0.021,
7
+ "train_steps_per_second": 0.001
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 5.0,
6
+ "eval_steps": 500,
7
+ "global_step": 20,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "completion_length": 20.375,
14
+ "epoch": 0.5161290322580645,
15
+ "grad_norm": 11.062353134155273,
16
+ "kl": 0.0,
17
+ "learning_rate": 5e-07,
18
+ "loss": 0.0,
19
+ "reward": 0.04815642529865727,
20
+ "reward_std": 0.008239762046287069,
21
+ "rewards/concensus_correctness_reward_func": 0.0,
22
+ "rewards/consensus_reward_func": 0.0,
23
+ "rewards/cumulative_reward_2": 0.0,
24
+ "rewards/final_correctness_reward_func": 0.0,
25
+ "rewards/question_recreation_reward_func": 0.04815642529865727,
26
+ "rewards/soft_format_reward_func": 0.0,
27
+ "rewards/strict_format_reward_func": 0.0,
28
+ "rewards/xmlcount_reward_func": 0.0,
29
+ "step": 2
30
+ },
31
+ {
32
+ "completion_length": 47.96666666666667,
33
+ "epoch": 1.0,
34
+ "grad_norm": 33.4072151184082,
35
+ "kl": 0.0021562006848398598,
36
+ "learning_rate": 4.864543104251586e-07,
37
+ "loss": 0.0,
38
+ "reward": 0.13018689304590225,
39
+ "reward_std": 0.057520271216829615,
40
+ "rewards/concensus_correctness_reward_func": 0.0,
41
+ "rewards/consensus_reward_func": 0.0,
42
+ "rewards/cumulative_reward_2": 0.0,
43
+ "rewards/final_correctness_reward_func": 0.0,
44
+ "rewards/question_recreation_reward_func": 0.13018689304590225,
45
+ "rewards/soft_format_reward_func": 0.0,
46
+ "rewards/strict_format_reward_func": 0.0,
47
+ "rewards/xmlcount_reward_func": 0.0,
48
+ "step": 4
49
+ },
50
+ {
51
+ "completion_length": 45.09375,
52
+ "epoch": 1.5161290322580645,
53
+ "grad_norm": 8.136409759521484,
54
+ "kl": 0.012652793423512776,
55
+ "learning_rate": 4.472851273490984e-07,
56
+ "loss": 0.0,
57
+ "reward": 0.11348086304496974,
58
+ "reward_std": 0.03734262226498686,
59
+ "rewards/concensus_correctness_reward_func": 0.0,
60
+ "rewards/consensus_reward_func": 0.0,
61
+ "rewards/cumulative_reward_2": 0.0,
62
+ "rewards/final_correctness_reward_func": 0.0,
63
+ "rewards/question_recreation_reward_func": 0.11482461250852793,
64
+ "rewards/soft_format_reward_func": 0.0,
65
+ "rewards/strict_format_reward_func": 0.0,
66
+ "rewards/xmlcount_reward_func": -0.0013437500456348062,
67
+ "step": 6
68
+ },
69
+ {
70
+ "completion_length": 42.266666666666666,
71
+ "epoch": 2.0,
72
+ "grad_norm": 34.756309509277344,
73
+ "kl": 0.022623057938956966,
74
+ "learning_rate": 3.8673703953060673e-07,
75
+ "loss": 0.0,
76
+ "reward": 0.06224373144408067,
77
+ "reward_std": 0.02971583668064947,
78
+ "rewards/concensus_correctness_reward_func": 0.0,
79
+ "rewards/consensus_reward_func": 0.0,
80
+ "rewards/cumulative_reward_2": 0.0,
81
+ "rewards/final_correctness_reward_func": 0.0,
82
+ "rewards/question_recreation_reward_func": 0.06224373144408067,
83
+ "rewards/soft_format_reward_func": 0.0,
84
+ "rewards/strict_format_reward_func": 0.0,
85
+ "rewards/xmlcount_reward_func": 0.0,
86
+ "step": 8
87
+ },
88
+ {
89
+ "completion_length": 46.21875,
90
+ "epoch": 2.5161290322580645,
91
+ "grad_norm": 7.123109340667725,
92
+ "kl": 0.03502856167324353,
93
+ "learning_rate": 3.1137137178519977e-07,
94
+ "loss": 0.0,
95
+ "reward": 0.0759008351014927,
96
+ "reward_std": 0.02389856088848319,
97
+ "rewards/concensus_correctness_reward_func": 0.0,
98
+ "rewards/consensus_reward_func": 0.0,
99
+ "rewards/cumulative_reward_2": 0.0,
100
+ "rewards/final_correctness_reward_func": 0.0,
101
+ "rewards/question_recreation_reward_func": 0.0759008351014927,
102
+ "rewards/soft_format_reward_func": 0.0,
103
+ "rewards/strict_format_reward_func": 0.0,
104
+ "rewards/xmlcount_reward_func": 0.0,
105
+ "step": 10
106
+ },
107
+ {
108
+ "completion_length": 44.36666666666667,
109
+ "epoch": 3.0,
110
+ "grad_norm": 7.818780422210693,
111
+ "kl": 0.022568917196864883,
112
+ "learning_rate": 2.2935516363191693e-07,
113
+ "loss": 0.0,
114
+ "reward": 0.08929347985734543,
115
+ "reward_std": 0.017616315085130434,
116
+ "rewards/concensus_correctness_reward_func": 0.0,
117
+ "rewards/consensus_reward_func": 0.0,
118
+ "rewards/cumulative_reward_2": 0.0,
119
+ "rewards/final_correctness_reward_func": 0.0,
120
+ "rewards/question_recreation_reward_func": 0.08929347985734543,
121
+ "rewards/soft_format_reward_func": 0.0,
122
+ "rewards/strict_format_reward_func": 0.0,
123
+ "rewards/xmlcount_reward_func": 0.0,
124
+ "step": 12
125
+ },
126
+ {
127
+ "completion_length": 73.15625,
128
+ "epoch": 3.5161290322580645,
129
+ "grad_norm": 16.331836700439453,
130
+ "kl": 0.044795535439334344,
131
+ "learning_rate": 1.4957614383675767e-07,
132
+ "loss": 0.0,
133
+ "reward": 0.10291314494679682,
134
+ "reward_std": 0.03227931309083942,
135
+ "rewards/concensus_correctness_reward_func": 0.0,
136
+ "rewards/consensus_reward_func": 0.0,
137
+ "rewards/cumulative_reward_2": 0.0,
138
+ "rewards/final_correctness_reward_func": 0.0,
139
+ "rewards/question_recreation_reward_func": 0.10291314494679682,
140
+ "rewards/soft_format_reward_func": 0.0,
141
+ "rewards/strict_format_reward_func": 0.0,
142
+ "rewards/xmlcount_reward_func": 0.0,
143
+ "step": 14
144
+ },
145
+ {
146
+ "completion_length": 55.333333333333336,
147
+ "epoch": 4.0,
148
+ "grad_norm": 6.074650287628174,
149
+ "kl": 0.014543108890453975,
150
+ "learning_rate": 8.067960709356475e-08,
151
+ "loss": 0.0,
152
+ "reward": 0.0832365710909168,
153
+ "reward_std": 0.030701078412433466,
154
+ "rewards/concensus_correctness_reward_func": 0.0,
155
+ "rewards/consensus_reward_func": 0.0,
156
+ "rewards/cumulative_reward_2": 0.0,
157
+ "rewards/final_correctness_reward_func": 0.0,
158
+ "rewards/question_recreation_reward_func": 0.0832365710909168,
159
+ "rewards/soft_format_reward_func": 0.0,
160
+ "rewards/strict_format_reward_func": 0.0,
161
+ "rewards/xmlcount_reward_func": 0.0,
162
+ "step": 16
163
+ },
164
+ {
165
+ "completion_length": 51.125,
166
+ "epoch": 4.516129032258064,
167
+ "grad_norm": 10.109783172607422,
168
+ "kl": 0.024721574096474797,
169
+ "learning_rate": 3.013156219837776e-08,
170
+ "loss": 0.0,
171
+ "reward": 0.0759926013997756,
172
+ "reward_std": 0.026536535182458465,
173
+ "rewards/concensus_correctness_reward_func": 0.0,
174
+ "rewards/consensus_reward_func": 0.0,
175
+ "rewards/cumulative_reward_2": 0.0,
176
+ "rewards/final_correctness_reward_func": 0.0,
177
+ "rewards/question_recreation_reward_func": 0.0759926013997756,
178
+ "rewards/soft_format_reward_func": 0.0,
179
+ "rewards/strict_format_reward_func": 0.0,
180
+ "rewards/xmlcount_reward_func": 0.0,
181
+ "step": 18
182
+ },
183
+ {
184
+ "completion_length": 100.86666666666666,
185
+ "epoch": 5.0,
186
+ "grad_norm": 14.475935935974121,
187
+ "kl": 0.141564985178411,
188
+ "learning_rate": 3.4096741493194193e-09,
189
+ "loss": 0.0001,
190
+ "reward": 0.13194180838763714,
191
+ "reward_std": 0.04699777302642663,
192
+ "rewards/concensus_correctness_reward_func": 0.0,
193
+ "rewards/consensus_reward_func": 0.0,
194
+ "rewards/cumulative_reward_2": 0.0,
195
+ "rewards/final_correctness_reward_func": 0.0,
196
+ "rewards/question_recreation_reward_func": 0.13194180838763714,
197
+ "rewards/soft_format_reward_func": 0.0,
198
+ "rewards/strict_format_reward_func": 0.0,
199
+ "rewards/xmlcount_reward_func": 0.0,
200
+ "step": 20
201
+ },
202
+ {
203
+ "epoch": 5.0,
204
+ "step": 20,
205
+ "total_flos": 0.0,
206
+ "train_loss": 3.0766487361688634e-05,
207
+ "train_runtime": 15532.1172,
208
+ "train_samples_per_second": 0.021,
209
+ "train_steps_per_second": 0.001
210
+ }
211
+ ],
212
+ "logging_steps": 2,
213
+ "max_steps": 20,
214
+ "num_input_tokens_seen": 0,
215
+ "num_train_epochs": 7,
216
+ "save_steps": 25,
217
+ "stateful_callbacks": {
218
+ "TrainerControl": {
219
+ "args": {
220
+ "should_epoch_stop": false,
221
+ "should_evaluate": false,
222
+ "should_log": false,
223
+ "should_save": true,
224
+ "should_training_stop": true
225
+ },
226
+ "attributes": {}
227
+ }
228
+ },
229
+ "total_flos": 0.0,
230
+ "train_batch_size": 2,
231
+ "trial_name": null,
232
+ "trial_params": null
233
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60af420daa27dea7801dca555dbe68a13e85fa702d2aa8601127d14949d55ee9
3
+ size 5944
vocab.json ADDED
The diff for this file is too large to render. See raw diff