vikhyatt commited on
Commit
ed63119
·
verified ·
1 Parent(s): 4c0fd8b

Upload fine-tuned model

Browse files
.gitattributes CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* 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
 
 
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
37
+ .ipynb_checkpoints/tokenizer-checkpoint.json filter=lfs diff=lfs merge=lfs -text
.ipynb_checkpoints/chat_template-checkpoint.jinja CHANGED
@@ -1,10 +1,12 @@
1
  {%- set enable_thinking = true %}
 
 
2
  {%- if tools %}
3
  {{- '<|im_start|>system\n' }}
4
  {%- if messages[0].role == 'system' %}
5
  {{- messages[0].content + '\n\n' }}
6
  {%- else %}
7
- {{- 'A conversation between User and Assistant. The assistant reasons step by step inside <think></think> and gives the final answer inside \\boxed{}.\n\n' }}
8
  {%- endif %}
9
  {{- "# 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>" }}
10
  {%- for tool in tools %}
@@ -16,11 +18,10 @@
16
  {%- if messages[0].role == 'system' %}
17
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
18
  {%- else %}
19
- {{- '<|im_start|>system\n' }}
20
- {{- 'A conversation between User and Assistant. The assistant reasons step by step inside <think></think> and gives the final answer inside \\boxed{}.' }}
21
- {{- '<|im_end|>\n' }}
22
  {%- endif %}
23
  {%- endif %}
 
24
  {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
25
  {%- for message in messages[::-1] %}
26
  {%- set index = (messages|length - 1) - loop.index0 %}
@@ -29,14 +30,17 @@
29
  {%- set ns.last_query_index = index %}
30
  {%- endif %}
31
  {%- endfor %}
 
32
  {%- for message in messages %}
33
  {%- if message.content is string %}
34
  {%- set content = message.content %}
35
  {%- else %}
36
  {%- set content = '' %}
37
  {%- endif %}
 
38
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
39
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
 
40
  {%- elif message.role == "assistant" %}
41
  {%- set reasoning_content = '' %}
42
  {%- if message.reasoning_content is string %}
@@ -47,6 +51,7 @@
47
  {%- set content = content.split('</think>')[-1].lstrip('\n') %}
48
  {%- endif %}
49
  {%- endif %}
 
50
  {%- if loop.index0 > ns.last_query_index %}
51
  {%- if loop.last or (not loop.last and reasoning_content) %}
52
  {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
@@ -56,6 +61,7 @@
56
  {%- else %}
57
  {{- '<|im_start|>' + message.role + '\n' + content }}
58
  {%- endif %}
 
59
  {%- if message.tool_calls %}
60
  {%- for tool_call in message.tool_calls %}
61
  {%- if (loop.first and content) or (not loop.first) %}
@@ -76,6 +82,7 @@
76
  {%- endfor %}
77
  {%- endif %}
78
  {{- '<|im_end|>\n' }}
 
79
  {%- elif message.role == "tool" %}
80
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
81
  {{- '<|im_start|>user' }}
@@ -88,6 +95,7 @@
88
  {%- endif %}
89
  {%- endif %}
90
  {%- endfor %}
 
91
  {%- if add_generation_prompt %}
92
  {{- '<|im_start|>assistant\n' }}
93
  {%- if enable_thinking is defined and enable_thinking is false %}
 
1
  {%- set enable_thinking = true %}
2
+ {%- set default_system_prompt = "Your task is to follow a systematic, thorough reasoning process before providing the final solution. This involves analyzing, summarizing, exploring, reassessing, and refining your thought process through multiple iterations.\n\nStructure your response into two sections: Thought and Solution. In the Thought section, present your reasoning using this format:\n<think>\n{thoughts}\n</think>\n\nIn the Solution section, provide the final, logical, and accurate answer, clearly derived from the exploration in the Thought section. Please reason step by step, and put your final answer within \\boxed{}. Keep the answers brief and do not think for very long steps and also do not make repetitions (maximum token budget is 4096 tokens)." %}
3
+
4
  {%- if tools %}
5
  {{- '<|im_start|>system\n' }}
6
  {%- if messages[0].role == 'system' %}
7
  {{- messages[0].content + '\n\n' }}
8
  {%- else %}
9
+ {{- default_system_prompt + '\n\n' }}
10
  {%- endif %}
11
  {{- "# 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>" }}
12
  {%- for tool in tools %}
 
18
  {%- if messages[0].role == 'system' %}
19
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
20
  {%- else %}
21
+ {{- '<|im_start|>system\n' + default_system_prompt + '<|im_end|>\n' }}
 
 
22
  {%- endif %}
23
  {%- endif %}
24
+
25
  {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
26
  {%- for message in messages[::-1] %}
27
  {%- set index = (messages|length - 1) - loop.index0 %}
 
30
  {%- set ns.last_query_index = index %}
31
  {%- endif %}
32
  {%- endfor %}
33
+
34
  {%- for message in messages %}
35
  {%- if message.content is string %}
36
  {%- set content = message.content %}
37
  {%- else %}
38
  {%- set content = '' %}
39
  {%- endif %}
40
+
41
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
42
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
43
+
44
  {%- elif message.role == "assistant" %}
45
  {%- set reasoning_content = '' %}
46
  {%- if message.reasoning_content is string %}
 
51
  {%- set content = content.split('</think>')[-1].lstrip('\n') %}
52
  {%- endif %}
53
  {%- endif %}
54
+
55
  {%- if loop.index0 > ns.last_query_index %}
56
  {%- if loop.last or (not loop.last and reasoning_content) %}
57
  {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
 
61
  {%- else %}
62
  {{- '<|im_start|>' + message.role + '\n' + content }}
63
  {%- endif %}
64
+
65
  {%- if message.tool_calls %}
66
  {%- for tool_call in message.tool_calls %}
67
  {%- if (loop.first and content) or (not loop.first) %}
 
82
  {%- endfor %}
83
  {%- endif %}
84
  {{- '<|im_end|>\n' }}
85
+
86
  {%- elif message.role == "tool" %}
87
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
88
  {{- '<|im_start|>user' }}
 
95
  {%- endif %}
96
  {%- endif %}
97
  {%- endfor %}
98
+
99
  {%- if add_generation_prompt %}
100
  {{- '<|im_start|>assistant\n' }}
101
  {%- if enable_thinking is defined and enable_thinking is false %}
.ipynb_checkpoints/config-checkpoint.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 151645,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 2048,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 6144,
15
+ "layer_types": [
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention",
24
+ "full_attention",
25
+ "full_attention",
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention",
42
+ "full_attention",
43
+ "full_attention"
44
+ ],
45
+ "max_position_embeddings": 40960,
46
+ "max_window_layers": 28,
47
+ "model_type": "qwen3",
48
+ "num_attention_heads": 16,
49
+ "num_hidden_layers": 28,
50
+ "num_key_value_heads": 8,
51
+ "pad_token_id": null,
52
+ "rms_norm_eps": 1e-06,
53
+ "rope_parameters": {
54
+ "rope_theta": 1000000,
55
+ "rope_type": "default"
56
+ },
57
+ "sliding_window": null,
58
+ "tie_word_embeddings": true,
59
+ "transformers_version": "5.9.0",
60
+ "use_cache": true,
61
+ "use_sliding_window": false,
62
+ "vocab_size": 151936
63
+ }
.ipynb_checkpoints/generation_config-checkpoint.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "temperature": 0.6,
10
+ "top_k": 20,
11
+ "top_p": 0.95,
12
+ "transformers_version": "5.9.0"
13
+ }
.ipynb_checkpoints/tokenizer-checkpoint.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
3
+ size 11422650
.ipynb_checkpoints/tokenizer_config-checkpoint.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": true,
24
+ "local_files_only": false,
25
+ "model_max_length": 131072,
26
+ "pad_token": "<|endoftext|>",
27
+ "padding_side": "left",
28
+ "split_special_tokens": false,
29
+ "tokenizer_class": "Qwen2Tokenizer",
30
+ "truncation_side": "left",
31
+ "unk_token": null
32
+ }
chat_template.jinja CHANGED
@@ -1,10 +1,12 @@
1
  {%- set enable_thinking = true %}
 
 
2
  {%- if tools %}
3
  {{- '<|im_start|>system\n' }}
4
  {%- if messages[0].role == 'system' %}
5
  {{- messages[0].content + '\n\n' }}
6
  {%- else %}
7
- {{- 'A conversation between User and Assistant. The assistant reasons step by step inside <think></think> and gives the final answer inside \\boxed{}.\n\n' }}
8
  {%- endif %}
9
  {{- "# 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>" }}
10
  {%- for tool in tools %}
@@ -16,11 +18,10 @@
16
  {%- if messages[0].role == 'system' %}
17
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
18
  {%- else %}
19
- {{- '<|im_start|>system\n' }}
20
- {{- 'A conversation between User and Assistant. The assistant reasons step by step inside <think></think> and gives the final answer inside \\boxed{}.' }}
21
- {{- '<|im_end|>\n' }}
22
  {%- endif %}
23
  {%- endif %}
 
24
  {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
25
  {%- for message in messages[::-1] %}
26
  {%- set index = (messages|length - 1) - loop.index0 %}
@@ -29,14 +30,17 @@
29
  {%- set ns.last_query_index = index %}
30
  {%- endif %}
31
  {%- endfor %}
 
32
  {%- for message in messages %}
33
  {%- if message.content is string %}
34
  {%- set content = message.content %}
35
  {%- else %}
36
  {%- set content = '' %}
37
  {%- endif %}
 
38
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
39
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
 
40
  {%- elif message.role == "assistant" %}
41
  {%- set reasoning_content = '' %}
42
  {%- if message.reasoning_content is string %}
@@ -47,6 +51,7 @@
47
  {%- set content = content.split('</think>')[-1].lstrip('\n') %}
48
  {%- endif %}
49
  {%- endif %}
 
50
  {%- if loop.index0 > ns.last_query_index %}
51
  {%- if loop.last or (not loop.last and reasoning_content) %}
52
  {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
@@ -56,6 +61,7 @@
56
  {%- else %}
57
  {{- '<|im_start|>' + message.role + '\n' + content }}
58
  {%- endif %}
 
59
  {%- if message.tool_calls %}
60
  {%- for tool_call in message.tool_calls %}
61
  {%- if (loop.first and content) or (not loop.first) %}
@@ -76,6 +82,7 @@
76
  {%- endfor %}
77
  {%- endif %}
78
  {{- '<|im_end|>\n' }}
 
79
  {%- elif message.role == "tool" %}
80
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
81
  {{- '<|im_start|>user' }}
@@ -88,6 +95,7 @@
88
  {%- endif %}
89
  {%- endif %}
90
  {%- endfor %}
 
91
  {%- if add_generation_prompt %}
92
  {{- '<|im_start|>assistant\n' }}
93
  {%- if enable_thinking is defined and enable_thinking is false %}
 
1
  {%- set enable_thinking = true %}
2
+ {%- set default_system_prompt = "Your task is to follow a systematic, thorough reasoning process before providing the final solution. This involves analyzing, summarizing, exploring, reassessing, and refining your thought process through multiple iterations.\n\nStructure your response into two sections: Thought and Solution. In the Thought section, present your reasoning using this format:\n<think>\n{thoughts}\n</think>\n\nIn the Solution section, provide the final, logical, and accurate answer, clearly derived from the exploration in the Thought section. Please reason step by step, and put your final answer within \\boxed{}. Keep the answers brief and do not think for very long steps and also do not make repetitions (maximum token budget is 4096 tokens)." %}
3
+
4
  {%- if tools %}
5
  {{- '<|im_start|>system\n' }}
6
  {%- if messages[0].role == 'system' %}
7
  {{- messages[0].content + '\n\n' }}
8
  {%- else %}
9
+ {{- default_system_prompt + '\n\n' }}
10
  {%- endif %}
11
  {{- "# 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>" }}
12
  {%- for tool in tools %}
 
18
  {%- if messages[0].role == 'system' %}
19
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
20
  {%- else %}
21
+ {{- '<|im_start|>system\n' + default_system_prompt + '<|im_end|>\n' }}
 
 
22
  {%- endif %}
23
  {%- endif %}
24
+
25
  {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
26
  {%- for message in messages[::-1] %}
27
  {%- set index = (messages|length - 1) - loop.index0 %}
 
30
  {%- set ns.last_query_index = index %}
31
  {%- endif %}
32
  {%- endfor %}
33
+
34
  {%- for message in messages %}
35
  {%- if message.content is string %}
36
  {%- set content = message.content %}
37
  {%- else %}
38
  {%- set content = '' %}
39
  {%- endif %}
40
+
41
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
42
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
43
+
44
  {%- elif message.role == "assistant" %}
45
  {%- set reasoning_content = '' %}
46
  {%- if message.reasoning_content is string %}
 
51
  {%- set content = content.split('</think>')[-1].lstrip('\n') %}
52
  {%- endif %}
53
  {%- endif %}
54
+
55
  {%- if loop.index0 > ns.last_query_index %}
56
  {%- if loop.last or (not loop.last and reasoning_content) %}
57
  {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
 
61
  {%- else %}
62
  {{- '<|im_start|>' + message.role + '\n' + content }}
63
  {%- endif %}
64
+
65
  {%- if message.tool_calls %}
66
  {%- for tool_call in message.tool_calls %}
67
  {%- if (loop.first and content) or (not loop.first) %}
 
82
  {%- endfor %}
83
  {%- endif %}
84
  {{- '<|im_end|>\n' }}
85
+
86
  {%- elif message.role == "tool" %}
87
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
88
  {{- '<|im_start|>user' }}
 
95
  {%- endif %}
96
  {%- endif %}
97
  {%- endfor %}
98
+
99
  {%- if add_generation_prompt %}
100
  {{- '<|im_start|>assistant\n' }}
101
  {%- if enable_thinking is defined and enable_thinking is false %}
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:60eb9d586a28207a72d622f48d9ff0902e874fd2349d9c7cc663a302f6678e91
3
  size 3441185608
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce744d47195a1bf1fc9f7117efa78fd4148234d1171d3fa2cf1f6997a96f007b
3
  size 3441185608
tokenizer_config.json CHANGED
@@ -29,5 +29,4 @@
29
  "tokenizer_class": "Qwen2Tokenizer",
30
  "truncation_side": "left",
31
  "unk_token": null
32
-
33
  }
 
29
  "tokenizer_class": "Qwen2Tokenizer",
30
  "truncation_side": "left",
31
  "unk_token": null
 
32
  }