MatchaLwc commited on
Commit
46f8ec0
·
verified ·
1 Parent(s): d351fae

Model save

Browse files
README.md CHANGED
@@ -26,7 +26,7 @@ print(output["generated_text"])
26
 
27
  ## Training procedure
28
 
29
- [<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/1105645918-bit/huggingface/runs/sj64d1o5)
30
 
31
 
32
  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).
 
26
 
27
  ## Training procedure
28
 
29
+ [<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/1105645918-bit/huggingface/runs/2trr7wkk)
30
 
31
 
32
  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).
all_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "total_flos": 0.0,
3
- "train_loss": 0.0355598833411932,
4
- "train_runtime": 3089.8163,
5
  "train_samples": 336,
6
- "train_samples_per_second": 0.544,
7
  "train_steps_per_second": 0.003
8
  }
 
1
  {
2
  "total_flos": 0.0,
3
+ "train_loss": 0.057270023971796036,
4
+ "train_runtime": 3066.7214,
5
  "train_samples": 336,
6
+ "train_samples_per_second": 0.548,
7
  "train_steps_per_second": 0.003
8
  }
config.json CHANGED
@@ -1,16 +1,16 @@
1
  {
2
- "_name_or_path": "/work/home/liuweichu/Qwen2.5-Math-7B",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 151643,
8
- "eos_token_id": 151643,
9
  "hidden_act": "silu",
10
  "hidden_size": 3584,
11
  "initializer_range": 0.02,
12
  "intermediate_size": 18944,
13
- "max_position_embeddings": 4096,
14
  "max_window_layers": 28,
15
  "model_type": "qwen2",
16
  "num_attention_heads": 28,
@@ -18,13 +18,12 @@
18
  "num_key_value_heads": 4,
19
  "rms_norm_eps": 1e-06,
20
  "rope_scaling": null,
21
- "rope_theta": 10000,
22
- "sliding_window": 4096,
23
  "tie_word_embeddings": false,
24
  "torch_dtype": "bfloat16",
25
  "transformers_version": "4.49.0",
26
  "use_cache": false,
27
- "use_mrope": false,
28
  "use_sliding_window": false,
29
  "vocab_size": 152064
30
  }
 
1
  {
2
+ "_name_or_path": "/work/home/liuweichu/Qwen2.5-7B-Instruct",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 151643,
8
+ "eos_token_id": 151645,
9
  "hidden_act": "silu",
10
  "hidden_size": 3584,
11
  "initializer_range": 0.02,
12
  "intermediate_size": 18944,
13
+ "max_position_embeddings": 32768,
14
  "max_window_layers": 28,
15
  "model_type": "qwen2",
16
  "num_attention_heads": 28,
 
18
  "num_key_value_heads": 4,
19
  "rms_norm_eps": 1e-06,
20
  "rope_scaling": null,
21
+ "rope_theta": 1000000.0,
22
+ "sliding_window": 131072,
23
  "tie_word_embeddings": false,
24
  "torch_dtype": "bfloat16",
25
  "transformers_version": "4.49.0",
26
  "use_cache": false,
 
27
  "use_sliding_window": false,
28
  "vocab_size": 152064
29
  }
generation_config.json CHANGED
@@ -1,6 +1,14 @@
1
  {
2
  "bos_token_id": 151643,
3
- "eos_token_id": 151643,
4
- "max_new_tokens": 2048,
 
 
 
 
 
 
 
 
5
  "transformers_version": "4.49.0"
6
  }
 
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.05,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
  "transformers_version": "4.49.0"
14
  }
model-00001-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6f010c93aeb6a90a25aa922385f63985ac85ec90d512fcd5cf291ac497dbef47
3
  size 4877660776
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d695ba33451eb7a1bf201982146c72f5315781c4edb0880d441f804363bafbdf
3
  size 4877660776
model-00002-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d9fb7055b43b9f115ab3bec564a91d13866a9b1f83ceea207ac222bcd8a81e6d
3
  size 4932751008
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:240bc2c3be7f25610723478c3fba8cfc7ffea89000dca5c83e33896010ac2bf6
3
  size 4932751008
model-00003-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f4b53cc05267704569932632f11059e8c854ce0e88a11d3bb700ecf8689028ee
3
  size 4330865200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c2d798bae01b93ef2439b1b1868076e8ce331883d5be9ea20543af984498df8
3
  size 4330865200
model-00004-of-00004.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:36db9149ef4720ed8f11de88e85145219577fb349a8c3dab8bcc95305b6f48cd
3
  size 1089994880
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b23d0800c8a6b0fc258da6ed43a1df4e253dcec06c0b9ff79c4c6bb56286b7d
3
  size 1089994880
special_tokens_map.json CHANGED
@@ -15,7 +15,7 @@
15
  "<|video_pad|>"
16
  ],
17
  "eos_token": {
18
- "content": "<|endoftext|>",
19
  "lstrip": false,
20
  "normalized": false,
21
  "rstrip": false,
 
15
  "<|video_pad|>"
16
  ],
17
  "eos_token": {
18
+ "content": "<|im_end|>",
19
  "lstrip": false,
20
  "normalized": false,
21
  "rstrip": false,
tokenizer_config.json CHANGED
@@ -195,9 +195,9 @@
195
  "<|video_pad|>"
196
  ],
197
  "bos_token": null,
198
- "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'Please reason step by step, and put your final answer within \\\\boxed{}.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nPlease reason step by step, and put your final answer within \\\\boxed{}.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
  "clean_up_tokenization_spaces": false,
200
- "eos_token": "<|endoftext|>",
201
  "errors": "replace",
202
  "extra_special_tokens": {},
203
  "model_max_length": 131072,
 
195
  "<|video_pad|>"
196
  ],
197
  "bos_token": null,
198
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
  "clean_up_tokenization_spaces": false,
200
+ "eos_token": "<|im_end|>",
201
  "errors": "replace",
202
  "extra_special_tokens": {},
203
  "model_max_length": 131072,
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "total_flos": 0.0,
3
- "train_loss": 0.0355598833411932,
4
- "train_runtime": 3089.8163,
5
  "train_samples": 336,
6
- "train_samples_per_second": 0.544,
7
  "train_steps_per_second": 0.003
8
  }
 
1
  {
2
  "total_flos": 0.0,
3
+ "train_loss": 0.057270023971796036,
4
+ "train_runtime": 3066.7214,
5
  "train_samples": 336,
6
+ "train_samples_per_second": 0.548,
7
  "train_steps_per_second": 0.003
8
  }
trainer_state.json CHANGED
@@ -10,53 +10,53 @@
10
  "log_history": [
11
  {
12
  "clip_ratio": 0.0,
13
- "completion_length": 760.5469055175781,
14
  "epoch": 0.38095238095238093,
15
- "grad_norm": 0.19067028164863586,
16
  "kl": 0.0,
17
  "learning_rate": 3e-06,
18
- "loss": 0.0244,
19
- "reward": 0.2343750111758709,
20
- "reward_std": 0.2009137775748968,
21
- "rewards/accuracy_reward": 0.19754465017467737,
22
- "rewards/format_reward": 0.036830359254963696,
23
  "step": 1
24
  },
25
  {
26
  "clip_ratio": 0.0,
27
- "completion_length": 759.1691207885742,
28
  "epoch": 2.380952380952381,
29
- "grad_norm": 0.47505804896354675,
30
- "kl": 0.004555165767669678,
31
  "learning_rate": 1.7604722665003958e-06,
32
- "loss": 0.0261,
33
- "reward": 0.2315848316065967,
34
- "reward_std": 0.25816529244184494,
35
- "rewards/accuracy_reward": 0.18470982974395156,
36
- "rewards/format_reward": 0.046875002240994945,
37
  "step": 5
38
  },
39
  {
40
  "clip_ratio": 0.0,
41
- "completion_length": 740.1288314819336,
42
  "epoch": 4.761904761904762,
43
- "grad_norm": 0.3742629885673523,
44
- "kl": 0.022109222412109376,
45
  "learning_rate": 0.0,
46
- "loss": 0.0453,
47
- "reward": 0.30781251527369025,
48
- "reward_std": 0.34542269371449946,
49
- "rewards/accuracy_reward": 0.18437500880099833,
50
- "rewards/format_reward": 0.12343750623986124,
51
  "step": 10
52
  },
53
  {
54
  "epoch": 4.761904761904762,
55
  "step": 10,
56
  "total_flos": 0.0,
57
- "train_loss": 0.0355598833411932,
58
- "train_runtime": 3089.8163,
59
- "train_samples_per_second": 0.544,
60
  "train_steps_per_second": 0.003
61
  }
62
  ],
 
10
  "log_history": [
11
  {
12
  "clip_ratio": 0.0,
13
+ "completion_length": 999.6105346679688,
14
  "epoch": 0.38095238095238093,
15
+ "grad_norm": 154.4364013671875,
16
  "kl": 0.0,
17
  "learning_rate": 3e-06,
18
+ "loss": -0.019,
19
+ "reward": 0.7500000298023224,
20
+ "reward_std": 0.3680399917066097,
21
+ "rewards/accuracy_reward": 0.031250001629814506,
22
+ "rewards/format_reward": 0.7187500298023224,
23
  "step": 1
24
  },
25
  {
26
  "clip_ratio": 0.0,
27
+ "completion_length": 1006.7606468200684,
28
  "epoch": 2.380952380952381,
29
+ "grad_norm": 8.609855651855469,
30
+ "kl": 1.3177490234375,
31
  "learning_rate": 1.7604722665003958e-06,
32
+ "loss": 0.0393,
33
+ "reward": 0.7695312835276127,
34
+ "reward_std": 0.3738137981854379,
35
+ "rewards/accuracy_reward": 0.04101562706637196,
36
+ "rewards/format_reward": 0.7285156585276127,
37
  "step": 5
38
  },
39
  {
40
  "clip_ratio": 0.0,
41
+ "completion_length": 1006.158299255371,
42
  "epoch": 4.761904761904762,
43
+ "grad_norm": 0.9559445381164551,
44
+ "kl": 2.4314453125,
45
  "learning_rate": 0.0,
46
+ "loss": 0.0869,
47
+ "reward": 0.7937500372529029,
48
+ "reward_std": 0.36111804023385047,
49
+ "rewards/accuracy_reward": 0.03906250209547579,
50
+ "rewards/format_reward": 0.7546875327825546,
51
  "step": 10
52
  },
53
  {
54
  "epoch": 4.761904761904762,
55
  "step": 10,
56
  "total_flos": 0.0,
57
+ "train_loss": 0.057270023971796036,
58
+ "train_runtime": 3066.7214,
59
+ "train_samples_per_second": 0.548,
60
  "train_steps_per_second": 0.003
61
  }
62
  ],
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:08f748b3c516d433cd88ac282eefed6ff303d83a3f16ccb32889ff32d0bccdec
3
  size 8120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2208791588500d187944b80bb13411e7e17df3477815ff62483411ddd5abe7a7
3
  size 8120