AKM-12 commited on
Commit
50980f6
·
verified ·
1 Parent(s): 548bef2

Upload full SFT v1 general knowledge model

Browse files
chat_template.jinja CHANGED
@@ -1,94 +1,31 @@
1
- {# Forces enable_thinking = true regardless of CI runtime kwargs.
2
- Prepended to the official Qwen/Qwen3-1.7B chat_template.jinja by
3
- scripts/push_baseline.py at deploy time. Applied to: math, group. #}
4
  {%- set enable_thinking = false -%}
5
- {%- set system_message = "Start your message with: final answer will be \\boxed{ANSWER}. Then, solve concisely. Do not ramble on, decompose the problem into subproblems. Do NOT TRY TO ANSWER BY TRYING THE CASE FOR EVERY INTEGER IN MATH PROBLEMS. If you are given the choice between multiple options, generated your final answer as \\boxed{A} or \\boxed{B}. Always end answers with a If you find yourself doing that generate a final answer as \\boxed{NONE} and stop. Your final answer MUST BE IN A BOX as such \\boxed{ANSWER} only once. Do not say anything after giving your final answer as long as it is in a \\boxed{FINAL_ANSWER} format." -%}
6
- {%- if tools %}
7
- {{- '<|im_start|>system\n' }}
8
- {%- if messages[0].role == 'system' %}
9
- {{- system_message + '\n' + messages[0].content + '\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 %}
13
- {{- "\n" }}
14
- {{- tool | tojson }}
15
- {%- endfor %}
16
- {{- "\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" }}
17
- {%- else %}
18
- {%- if messages[0].role == 'system' %}
19
- {{- '<|im_start|>system\n' + system_message + '\n' + messages[0].content + '<|im_end|>\n' }}
20
- {%- endif %}
21
- {%- endif %}
22
- {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
23
- {%- for message in messages[::-1] %}
24
- {%- set index = (messages|length - 1) - loop.index0 %}
25
- {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
26
- {%- set ns.multi_step_tool = false %}
27
- {%- set ns.last_query_index = index %}
28
- {%- endif %}
29
- {%- endfor %}
30
- {%- for message in messages %}
31
- {%- if message.content is string %}
32
- {%- set content = message.content %}
33
- {%- else %}
34
- {%- set content = '' %}
35
- {%- endif %}
36
- {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
37
- {{- '<|im_start|>' + message.role + ' ' + system_message + '\n' + content + '<|im_end|>' + '\n' }}
38
- {%- elif message.role == "assistant" %}
39
- {%- set reasoning_content = '' %}
40
- {%- if message.reasoning_content is string %}
41
- {%- set reasoning_content = message.reasoning_content %}
42
- {%- else %}
43
- {%- if '</think>' in content %}
44
- {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
45
- {%- set content = content.split('</think>')[-1].lstrip('\n') %}
46
- {%- endif %}
47
- {%- endif %}
48
- {%- if loop.index0 > ns.last_query_index %}
49
- {%- if loop.last or (not loop.last and reasoning_content) %}
50
- {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
51
- {%- else %}
52
- {{- '<|im_start|>' + message.role + '\n' + content }}
53
- {%- endif %}
54
- {%- else %}
55
- {{- '<|im_start|>' + message.role + '\n' + content }}
56
- {%- endif %}
57
- {%- if message.tool_calls %}
58
- {%- for tool_call in message.tool_calls %}
59
- {%- if (loop.first and content) or (not loop.first) %}
60
- {{- '\n' }}
61
- {%- endif %}
62
- {%- if tool_call.function %}
63
- {%- set tool_call = tool_call.function %}
64
- {%- endif %}
65
- {{- '<tool_call>\n{"name": "' }}
66
- {{- tool_call.name }}
67
- {{- '", "arguments": ' }}
68
- {%- if tool_call.arguments is string %}
69
- {{- tool_call.arguments }}
70
- {%- else %}
71
- {{- tool_call.arguments | tojson }}
72
- {%- endif %}
73
- {{- '}\n</tool_call>' }}
74
- {%- endfor %}
75
- {%- endif %}
76
- {{- '<|im_end|>\n' }}
77
- {%- elif message.role == "tool" %}
78
- {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
79
- {{- '<|im_start|>user' }}
80
- {%- endif %}
81
- {{- '\n<tool_response>\n' }}
82
- {{- content }}
83
- {{- '\n</tool_response>' }}
84
- {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
85
- {{- '<|im_end|>\n' }}
86
- {%- endif %}
87
- {%- endif %}
88
- {%- endfor %}
89
- {%- if add_generation_prompt %}
90
  {{- '<|im_start|>assistant\n' }}
91
- {%- if enable_thinking is defined and enable_thinking is false %}
92
  {{- '<think>\n\n</think>\n\n' }}
93
- {%- endif %}
94
- {%- endif %}
 
 
 
 
1
  {%- set enable_thinking = false -%}
2
+ {%- set default_system_message = "You are a multiple-choice general knowledge answerer.\n\nThe user will provide a question and a list of choices. Choose exactly one option.\n\nThe choices may have any number of labels, for example A, B, C, D, ... up to T. Your answer must be the letter of the best choice.\n\nYour entire response must be exactly one boxed answer, such as \\boxed{A}, \\boxed{C}, \\boxed{J}, or \\boxed{T}.\n\nDo not explain. Do not show reasoning. Do not write words. Do not add punctuation. Do not write anything before or after the boxed answer." -%}
3
+
4
+ {%- if messages and messages[0]['role'] == 'system' -%}
5
+ {%- set system_message = default_system_message + '\n\n' + messages[0]['content'] -%}
6
+ {%- set loop_messages = messages[1:] -%}
7
+ {%- else -%}
8
+ {%- set system_message = default_system_message -%}
9
+ {%- set loop_messages = messages -%}
10
+ {%- endif -%}
11
+
12
+ {{- '<|im_start|>system\n' + system_message + '<|im_end|>\n' }}
13
+
14
+ {%- for message in loop_messages -%}
15
+ {%- if message['role'] == 'user' -%}
16
+ {{- '<|im_start|>user\n' + message['content'] + '<|im_end|>\n' }}
17
+ {%- elif message['role'] == 'assistant' -%}
18
+ {{- '<|im_start|>assistant\n' }}
19
+ {%- if enable_thinking is defined and enable_thinking is false -%}
20
+ {{- '<think>\n\n</think>\n\n' }}
21
+ {%- endif -%}
22
+ {{- message['content'] + '<|im_end|>\n' }}
23
+ {%- endif -%}
24
+ {%- endfor -%}
25
+
26
+ {%- if add_generation_prompt -%}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  {{- '<|im_start|>assistant\n' }}
28
+ {%- if enable_thinking is defined and enable_thinking is false -%}
29
  {{- '<think>\n\n</think>\n\n' }}
30
+ {%- endif -%}
31
+ {%- endif -%}
config.json CHANGED
@@ -5,7 +5,7 @@
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 151643,
8
- "dtype": "float16",
9
  "eos_token_id": 151645,
10
  "head_dim": 128,
11
  "hidden_act": "silu",
@@ -57,7 +57,7 @@
57
  "sliding_window": null,
58
  "tie_word_embeddings": true,
59
  "transformers_version": "5.7.0",
60
- "use_cache": true,
61
  "use_sliding_window": false,
62
  "vocab_size": 151936
63
  }
 
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",
 
57
  "sliding_window": null,
58
  "tie_word_embeddings": true,
59
  "transformers_version": "5.7.0",
60
+ "use_cache": false,
61
  "use_sliding_window": false,
62
  "vocab_size": 151936
63
  }
generation_config.json CHANGED
@@ -6,8 +6,8 @@
6
  151643
7
  ],
8
  "pad_token_id": 151643,
9
- "temperature": 0.4,
10
  "top_k": 20,
11
- "top_p": 0.85,
12
  "transformers_version": "5.7.0"
13
  }
 
6
  151643
7
  ],
8
  "pad_token_id": 151643,
9
+ "temperature": 0.1,
10
  "top_k": 20,
11
+ "top_p": 0.8,
12
  "transformers_version": "5.7.0"
13
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3ae9245a6fa9f978e8cdaecb47a41663bd29c12e15c974f717ecc0f4590a188d
3
- size 3441185296
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ed2ae875a376a7d4a0e8f2ec4a40452b2070dfedc50dd2e0e340f1ed09a6989
3
+ size 3441185608
tokenizer_config.json CHANGED
@@ -20,7 +20,7 @@
20
  "<|image_pad|>",
21
  "<|video_pad|>"
22
  ],
23
- "is_local": false,
24
  "local_files_only": false,
25
  "model_max_length": 131072,
26
  "pad_token": "<|endoftext|>",
 
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|>",
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c7fef7c910e9ebfd35ba5767e2a099909c6387cbe09a804c4e3f8cb7d3f496c
3
+ size 5265