Upload C2 base Qwen full SFT bigmix30k
Browse files- chat_template.jinja +10 -53
- config.json +2 -2
- generation_config.json +3 -3
- model.safetensors +3 -0
- tokenizer.json +2 -2
- tokenizer_config.json +3 -2
- training_args.bin +3 -0
chat_template.jinja
CHANGED
|
@@ -13,6 +13,8 @@
|
|
| 13 |
{%- else %}
|
| 14 |
{%- if messages[0].role == 'system' %}
|
| 15 |
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
|
|
|
|
|
|
| 16 |
{%- endif %}
|
| 17 |
{%- endif %}
|
| 18 |
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
|
@@ -24,67 +26,22 @@
|
|
| 24 |
{%- endif %}
|
| 25 |
{%- endfor %}
|
| 26 |
{%- for message in messages %}
|
| 27 |
-
{%- if message.content is string %}
|
| 28 |
-
{%- set content = message.content %}
|
| 29 |
-
{%- else %}
|
| 30 |
-
{%- set content = '' %}
|
| 31 |
-
{%- endif %}
|
| 32 |
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 33 |
-
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>
|
| 34 |
{%- elif message.role == "assistant" %}
|
| 35 |
{%- set reasoning_content = '' %}
|
| 36 |
-
{%- if
|
| 37 |
-
{%- set reasoning_content =
|
| 38 |
-
|
| 39 |
-
{%- if '</think>' in content %}
|
| 40 |
-
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 41 |
-
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 42 |
-
{%- endif %}
|
| 43 |
{%- endif %}
|
| 44 |
{%- if loop.index0 > ns.last_query_index %}
|
| 45 |
-
{
|
| 46 |
-
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
| 47 |
-
{%- else %}
|
| 48 |
-
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 49 |
-
{%- endif %}
|
| 50 |
{%- else %}
|
| 51 |
-
{{- '<|im_start|>' +
|
| 52 |
-
{%- endif %}
|
| 53 |
-
{%- if message.tool_calls %}
|
| 54 |
-
{%- for tool_call in message.tool_calls %}
|
| 55 |
-
{%- if (loop.first and content) or (not loop.first) %}
|
| 56 |
-
{{- '\n' }}
|
| 57 |
-
{%- endif %}
|
| 58 |
-
{%- if tool_call.function %}
|
| 59 |
-
{%- set tool_call = tool_call.function %}
|
| 60 |
-
{%- endif %}
|
| 61 |
-
{{- '<tool_call>\n{"name": "' }}
|
| 62 |
-
{{- tool_call.name }}
|
| 63 |
-
{{- '", "arguments": ' }}
|
| 64 |
-
{%- if tool_call.arguments is string %}
|
| 65 |
-
{{- tool_call.arguments }}
|
| 66 |
-
{%- else %}
|
| 67 |
-
{{- tool_call.arguments | tojson }}
|
| 68 |
-
{%- endif %}
|
| 69 |
-
{{- '}\n</tool_call>' }}
|
| 70 |
-
{%- endfor %}
|
| 71 |
-
{%- endif %}
|
| 72 |
-
{{- '<|im_end|>\n' }}
|
| 73 |
-
{%- elif message.role == "tool" %}
|
| 74 |
-
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 75 |
-
{{- '<|im_start|>user' }}
|
| 76 |
-
{%- endif %}
|
| 77 |
-
{{- '\n<tool_response>\n' }}
|
| 78 |
-
{{- content }}
|
| 79 |
-
{{- '\n</tool_response>' }}
|
| 80 |
-
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 81 |
-
{{- '<|im_end|>\n' }}
|
| 82 |
{%- endif %}
|
| 83 |
{%- endif %}
|
| 84 |
{%- endfor %}
|
| 85 |
{%- if add_generation_prompt %}
|
| 86 |
-
{{- '<|im_start|>assistant\n' }}
|
| 87 |
-
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 88 |
-
{{- '<think>\n\n</think>\n\n' }}
|
| 89 |
-
{%- endif %}
|
| 90 |
{%- endif %}
|
|
|
|
| 13 |
{%- else %}
|
| 14 |
{%- if messages[0].role == 'system' %}
|
| 15 |
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 16 |
+
{%- else %}
|
| 17 |
+
{{- '<|im_start|>system\nYou are an expert at answering multiple-choice questions. Reason carefully inside <think>. After </think>, output only one final answer in \\boxed{LETTER}.<|im_end|>\n' }}
|
| 18 |
{%- endif %}
|
| 19 |
{%- endif %}
|
| 20 |
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
|
|
|
| 26 |
{%- endif %}
|
| 27 |
{%- endfor %}
|
| 28 |
{%- for message in messages %}
|
| 29 |
+
{%- set content = message.content if message.content is string else '' %}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 31 |
+
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>\n' }}
|
| 32 |
{%- elif message.role == "assistant" %}
|
| 33 |
{%- set reasoning_content = '' %}
|
| 34 |
+
{%- if '</think>' in content %}
|
| 35 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 36 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
{%- endif %}
|
| 38 |
{%- if loop.index0 > ns.last_query_index %}
|
| 39 |
+
{{- '<|im_start|>assistant\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') + '<|im_end|>\n' }}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
{%- else %}
|
| 41 |
+
{{- '<|im_start|>assistant\n' + content + '<|im_end|>\n' }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
{%- endif %}
|
| 43 |
{%- endif %}
|
| 44 |
{%- endfor %}
|
| 45 |
{%- if add_generation_prompt %}
|
| 46 |
+
{{- '<|im_start|>assistant\n<think>\n' }}
|
|
|
|
|
|
|
|
|
|
| 47 |
{%- endif %}
|
config.json
CHANGED
|
@@ -56,8 +56,8 @@
|
|
| 56 |
},
|
| 57 |
"sliding_window": null,
|
| 58 |
"tie_word_embeddings": true,
|
| 59 |
-
"transformers_version": "5.
|
| 60 |
-
"use_cache":
|
| 61 |
"use_sliding_window": false,
|
| 62 |
"vocab_size": 151936
|
| 63 |
}
|
|
|
|
| 56 |
},
|
| 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.
|
|
|
|
| 10 |
"top_k": 20,
|
| 11 |
-
"
|
| 12 |
-
"transformers_version": "4.51.0"
|
| 13 |
}
|
|
|
|
| 6 |
151643
|
| 7 |
],
|
| 8 |
"pad_token_id": 151643,
|
| 9 |
+
"temperature": 0.6,
|
| 10 |
+
"top_p": 0.95,
|
| 11 |
"top_k": 20,
|
| 12 |
+
"max_new_tokens": 4096
|
|
|
|
| 13 |
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5195fd986cc5c5290526564ef1d300de0e665657cb1cbdf44d111c6fc6d1615
|
| 3 |
+
size 3441185608
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9015c7b9bcc5ac57906c55460048b82b9dfcdef34eb1f781c079da50de99f3d0
|
| 3 |
+
size 11422749
|
tokenizer_config.json
CHANGED
|
@@ -26,5 +26,6 @@
|
|
| 26 |
"pad_token": "<|endoftext|>",
|
| 27 |
"split_special_tokens": false,
|
| 28 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 29 |
-
"unk_token": null
|
| 30 |
-
}
|
|
|
|
|
|
| 26 |
"pad_token": "<|endoftext|>",
|
| 27 |
"split_special_tokens": false,
|
| 28 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 29 |
+
"unk_token": null,
|
| 30 |
+
"chat_template": "{%- set enable_thinking = true %}\n{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\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 an expert at answering multiple-choice questions. Reason carefully inside <think>. After </think>, output only one final answer in \\\\boxed{LETTER}.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- 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>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- set content = message.content if message.content is string else '' %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {{- '<|im_start|>assistant\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>assistant\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n<think>\\n' }}\n{%- endif %}"
|
| 31 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:991583ae3de7667071ca29da83e0fe68e0389ac656f3ab3cb27d8ccb0d7e4dad
|
| 3 |
+
size 5265
|