ATL-Machine commited on
Commit
f822cb0
·
verified ·
1 Parent(s): 714c935

Upload model

Browse files
chat_template.jinja CHANGED
@@ -14,15 +14,6 @@
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 %}
22
- {%- set ns.last_query_index = index %}
23
- {%- endif %}
24
- {%- endfor %}
25
- {# o-5DaWwWm #}
26
  {%- for message in messages %}
27
  {%- if message.content is string %}
28
  {%- set content = message.content %}
@@ -32,44 +23,56 @@
32
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
33
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
34
  {%- elif message.role == "assistant" %}
35
- {%- set reasoning_content = '' %}
36
- {%- if message.reasoning_content is string %}
37
- {%- set reasoning_content = message.reasoning_content %}
38
- {%- else %}
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
- {%- if loop.last or (not loop.last and reasoning_content) %}
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|>' + message.role + '\n' + content }}
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' }}
 
14
  {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
  {%- endif %}
16
  {%- endif %}
 
 
 
 
 
 
 
 
 
17
  {%- for message in messages %}
18
  {%- if message.content is string %}
19
  {%- set content = message.content %}
 
23
  {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
24
  {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
25
  {%- elif message.role == "assistant" %}
26
+ {{- '<|im_start|>' + message.role + '\n' }}
27
+ {%- set has_loss = (message.loss is defined and message.loss) %}
28
+ {%- if has_loss %}
29
+ {% generation %}
30
+ {{- content }}
31
+ {%- if message.tool_calls %}
32
+ {%- for tool_call in message.tool_calls %}
33
+ {%- if (loop.first and content) or (not loop.first) %}
34
+ {{- '\n' }}
35
+ {%- endif %}
36
+ {%- if tool_call.function %}
37
+ {%- set tool_call = tool_call.function %}
38
+ {%- endif %}
39
+ {{- '<tool_call>\n{"name": "' }}
40
+ {{- tool_call.name }}
41
+ {{- '", "arguments": ' }}
42
+ {%- if tool_call.arguments is string %}
43
+ {{- tool_call.arguments }}
44
+ {%- else %}
45
+ {{- tool_call.arguments | tojson }}
46
+ {%- endif %}
47
+ {{- '}\n</tool_call>' }}
48
+ {%- endfor %}
49
  {%- endif %}
50
+ {{- '<|im_end|>' }}
51
+ {%- endgeneration %}
52
+ {{- '\n' }}
53
  {%- else %}
54
+ {{- content }}
55
+ {%- if message.tool_calls %}
56
+ {%- for tool_call in message.tool_calls %}
57
+ {%- if (loop.first and content) or (not loop.first) %}
58
+ {{- '\n' }}
59
+ {%- endif %}
60
+ {%- if tool_call.function %}
61
+ {%- set tool_call = tool_call.function %}
62
+ {%- endif %}
63
+ {{- '<tool_call>\n{"name": "' }}
64
+ {{- tool_call.name }}
65
+ {{- '", "arguments": ' }}
66
+ {%- if tool_call.arguments is string %}
67
+ {{- tool_call.arguments }}
68
+ {%- else %}
69
+ {{- tool_call.arguments | tojson }}
70
+ {%- endif %}
71
+ {{- '}\n</tool_call>' }}
72
+ {%- endfor %}
73
+ {%- endif %}
74
+ {{- '<|im_end|>\n' }}
75
  {%- endif %}
 
76
  {%- elif message.role == "tool" %}
77
  {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
78
  {{- '<|im_start|>user' }}
config.json CHANGED
@@ -4,7 +4,6 @@
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,
@@ -63,7 +62,7 @@
63
  "sliding_window": null,
64
  "tie_word_embeddings": true,
65
  "transformers_version": "4.57.1",
66
- "use_cache": true,
67
  "use_sliding_window": false,
68
  "vocab_size": 151936
69
  }
 
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
 
7
  "dtype": "bfloat16",
8
  "eos_token_id": 151645,
9
  "head_dim": 128,
 
62
  "sliding_window": null,
63
  "tie_word_embeddings": true,
64
  "transformers_version": "4.57.1",
65
+ "use_cache": false,
66
  "use_sliding_window": false,
67
  "vocab_size": 151936
68
  }
generation_config.json CHANGED
@@ -1,13 +1,12 @@
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": "4.57.1"
13
  }
 
1
  {
 
2
  "do_sample": true,
3
  "eos_token_id": [
4
  151645,
5
  151643
6
  ],
7
  "pad_token_id": 151643,
8
+ "temperature": 0.7,
9
  "top_k": 20,
10
+ "top_p": 0.8,
11
  "transformers_version": "4.57.1"
12
  }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:beaf70b7b8687ac46221f65288d05c48b8914b94a7ec2e79cebafe3f3150d1d4
3
  size 4967215360
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6161ca1f0608777355fe845782b6cf7e0bb960528a6eb367659a15490181ec87
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:b44d8b249c103b52af5125e6191c75698f9fa0094638363d6f23a7b468b791fb
3
  size 3077766632
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74e2ab9436bd02bb026875812750223b3f5155e7692f6bd031de8db9712e0778
3
  size 3077766632
tokenizer_config.json CHANGED
@@ -231,7 +231,7 @@
231
  "eos_token": "<|im_end|>",
232
  "errors": "replace",
233
  "extra_special_tokens": {},
234
- "model_max_length": 262144,
235
  "pad_token": "<|endoftext|>",
236
  "split_special_tokens": false,
237
  "tokenizer_class": "Qwen2Tokenizer",
 
231
  "eos_token": "<|im_end|>",
232
  "errors": "replace",
233
  "extra_special_tokens": {},
234
+ "model_max_length": 1010000,
235
  "pad_token": "<|endoftext|>",
236
  "split_special_tokens": false,
237
  "tokenizer_class": "Qwen2Tokenizer",