ATL-Machine commited on
Commit
e5b87f6
·
verified ·
1 Parent(s): 2588b42

Upload model (bfloat16) from script

Browse files
chat_template.jinja CHANGED
@@ -14,8 +14,11 @@
14
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
  {%- endif %}
16
  {%- endif %}
17
- {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
  {%- for message in messages[::-1] %}
 
 
 
19
  {%- set index = (messages|length - 1) - loop.index0 %}
20
  {%- 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>')) %}
21
  {%- set ns.multi_step_tool = false %}
@@ -40,6 +43,7 @@
40
  {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
  {%- endif %}
42
  {%- endif %}
 
43
  {%- if loop.index0 > ns.last_query_index %}
44
  {%- if loop.last or (not loop.last and reasoning_content) %}
45
  {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
@@ -69,6 +73,7 @@
69
  {%- endfor %}
70
  {%- endif %}
71
  {{- '<|im_end|>\n' }}
 
72
  {%- elif message.role == "tool" %}
73
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
74
  {{- '<|im_start|>user' }}
@@ -82,7 +87,9 @@
82
  {%- endif %}
83
  {%- endfor %}
84
  {%- if add_generation_prompt %}
85
- {{- '<|im_start|>assistant\n<think>\n' }}
86
- {%- else %}
87
- {{- '<|end_of_text|>\n' }}
 
 
88
  {%- endif %}
 
14
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
  {%- endif %}
16
  {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1, thinking=false) %}
18
  {%- for message in messages[::-1] %}
19
+ {%- if message.role == "system" and message.content and message.content | trim != "" %}
20
+ {%- set ns.thinking = true %}
21
+ {%- endif %}
22
  {%- set index = (messages|length - 1) - loop.index0 %}
23
  {%- 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>')) %}
24
  {%- set ns.multi_step_tool = false %}
 
43
  {%- set content = content.split('</think>')[-1].lstrip('\n') %}
44
  {%- endif %}
45
  {%- endif %}
46
+ {%- generation -%}
47
  {%- if loop.index0 > ns.last_query_index %}
48
  {%- if loop.last or (not loop.last and reasoning_content) %}
49
  {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
 
73
  {%- endfor %}
74
  {%- endif %}
75
  {{- '<|im_end|>\n' }}
76
+ {%- endgeneration -%}
77
  {%- elif message.role == "tool" %}
78
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
79
  {{- '<|im_start|>user' }}
 
87
  {%- endif %}
88
  {%- endfor %}
89
  {%- if add_generation_prompt %}
90
+ {%- if ns.thinking %}
91
+ {{- '<|im_start|>assistant\n' }}
92
+ {%- else %}
93
+ {{- '<|im_start|>assistant\n<think>\n' }}
94
+ {%- endif %}
95
  {%- endif %}
config.json CHANGED
@@ -49,7 +49,7 @@
49
  "full_attention",
50
  "full_attention"
51
  ],
52
- "max_position_embeddings": 40960,
53
  "max_window_layers": 36,
54
  "model_type": "qwen3",
55
  "num_attention_heads": 32,
@@ -58,13 +58,12 @@
58
  "pad_token_id": 151643,
59
  "rms_norm_eps": 1e-06,
60
  "rope_scaling": null,
61
- "rope_theta": 1000000,
62
  "sliding_window": null,
63
  "tie_word_embeddings": true,
64
  "transformers_version": "4.57.6",
65
- "unsloth_fixed": true,
66
  "unsloth_version": "2026.1.2",
67
- "use_cache": true,
68
  "use_sliding_window": false,
69
  "vocab_size": 151936
70
  }
 
49
  "full_attention",
50
  "full_attention"
51
  ],
52
+ "max_position_embeddings": 262144,
53
  "max_window_layers": 36,
54
  "model_type": "qwen3",
55
  "num_attention_heads": 32,
 
58
  "pad_token_id": 151643,
59
  "rms_norm_eps": 1e-06,
60
  "rope_scaling": null,
61
+ "rope_theta": 5000000,
62
  "sliding_window": null,
63
  "tie_word_embeddings": true,
64
  "transformers_version": "4.57.6",
 
65
  "unsloth_version": "2026.1.2",
66
+ "use_cache": false,
67
  "use_sliding_window": false,
68
  "vocab_size": 151936
69
  }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:30e6a1a0d03288a755a42a4448a059686f490d976fc6bde36e9c3a7d02f331b9
3
- size 4967215455
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95c6b1f6a0a3c9f26518b962b64fb3ef76da60a0271970852d0d198594e5f773
3
+ size 4967215360
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d532b1ab732ca66ef0e17af8bcc51c4ec0589b3e34045ed379bafce72806ca5d
3
- size 3077766730
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c87eda0d7829d8223ecafa3cec1df2cd894360b2c8dc679480f445a2382a4bd3
3
+ size 3077766632
model.safetensors.index.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "metadata": {
 
3
  "total_size": 8044936192
4
  },
5
  "weight_map": {
 
1
  {
2
  "metadata": {
3
+ "total_parameters": 4022468096,
4
  "total_size": 8044936192
5
  },
6
  "weight_map": {
tokenizer_config.json CHANGED
@@ -231,10 +231,11 @@
231
  "eos_token": "<|im_end|>",
232
  "errors": "replace",
233
  "extra_special_tokens": {},
234
- "model_max_length": 131072,
235
  "pad_token": "<|endoftext|>",
 
236
  "split_special_tokens": false,
237
  "tokenizer_class": "Qwen2Tokenizer",
238
  "unk_token": null,
239
- "chat_template": "{%- 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 {%- 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 {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\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 message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\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 {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- 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<think>\\n' }}\n{%- else %}\n {{- '<|end_of_text|>\\n' }}\n{%- endif %}"
240
  }
 
231
  "eos_token": "<|im_end|>",
232
  "errors": "replace",
233
  "extra_special_tokens": {},
234
+ "model_max_length": 262144,
235
  "pad_token": "<|endoftext|>",
236
+ "padding_side": "left",
237
  "split_special_tokens": false,
238
  "tokenizer_class": "Qwen2Tokenizer",
239
  "unk_token": null,
240
+ "chat_template": "{%- 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 {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1, thinking=false) %}\n{%- for message in messages[::-1] %}\n {%- if message.role == \"system\" and message.content and message.content | trim != \"\" %}\n {%- set ns.thinking = true %}\n {%- endif %}\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 {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\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 message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\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 {%- endif %}\n {%- generation -%}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- endgeneration -%}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- 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 {%- if ns.thinking %}\n {{- '<|im_start|>assistant\\n' }}\n {%- else %}\n {{- '<|im_start|>assistant\\n<think>\\n' }}\n {%- endif %}\n{%- endif %}"
241
  }