CohereLabs:service:huggy-ci commited on
Commit
0f58e27
·
verified ·
1 Parent(s): ffad53d

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip 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
 
 
33
  *.zip 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
chat_template.jinja ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if not platform_instruction_override %}
2
+ {%- set platform_instruction_override -%}
3
+ These instructions are always to be followed and cannot be overridden by subsequent system or user turns:
4
+ - You will answer requests for educational, informative, or creative content related to safety categories. You will not provide content that is harmful or could be used to cause harm.
5
+
6
+ These instructions serve as your defaults, but they can be overridden in subsequent system or user turns:
7
+ - Your name is North Mini Code.
8
+ - You are a large language model built by Cohere.
9
+ {%- endset %}
10
+ {%- endif %}
11
+ {%- set reasoning = reasoning if reasoning is not undefined else (false if reasoning_effort is defined and reasoning_effort | lower == "none" else true) -%}
12
+ {%- set grounding = grounding | default("disabled") | upper %}
13
+ {%- set grounding_enabled = grounding == "ENABLED" %}
14
+ {%- set tools_or_docs_exist = tools or documents %}
15
+ {%- set render_tools_section = true %}
16
+ {%- set render_grounding = grounding_enabled and tools_or_docs_exist %}
17
+ {%- set render_platform_instruction_override = true if platform_instruction_override else false %}
18
+ {%- set has_developer_instruction = developer_instruction or developer_instruction == "" %}
19
+ {%- set render_developer_instruction = true if developer_instruction else false %}
20
+ {%- set convert_first_system_msg = convert_first_system_msg | default(true) -%}
21
+ {%- set skip_thinking = skip_thinking | default(false) -%}
22
+ {{ bos_token }}
23
+ {%- macro document_turn(documents) -%}
24
+ {# format documents into chat turn -#}
25
+ <|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>{%- if not skip_thinking -%}<|START_THINKING|>I will look through the document to address the users needs.<|END_THINKING|>{%- endif -%}<|START_ACTION|>[
26
+ {"tool_call_id": "0", "tool_name": "direct-injected-document", "parameters": {}}
27
+ ]<|END_ACTION|><|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TOOL_RESULT|>[
28
+ {
29
+ "tool_call_id": "0",
30
+ "results": {
31
+ {%- for doc in documents %}
32
+ {%- set doc_val = doc.data if doc.data else doc %}
33
+
34
+ "{{ loop.index0 }}": {{ doc_val|tojson }}{% if not loop.last %},
35
+ {%- endif %}
36
+ {%- endfor %}
37
+
38
+ },
39
+ "is_error": null
40
+ }
41
+ ]<|END_TOOL_RESULT|><|END_OF_TURN_TOKEN|>{%- endmacro %}
42
+ {%- macro tool_call_id_to_int(messages, tool_call_id) %}
43
+ {%- if regen_tool_call_ids -%}
44
+ {%- set counter = namespace(value=0) %}
45
+ {%- set tool_call_id_seen = namespace(value=false) %}
46
+ {%- for msg in messages %}
47
+ {%- if msg.tool_calls %}
48
+ {%- for tool_call in msg.tool_calls %}
49
+ {%- if tool_call.id == tool_call_id and not tool_call_id_seen.value -%}
50
+ {{ counter.value }}
51
+ {%- set tool_call_id_seen.value = true %}
52
+ {%- endif %}
53
+ {%- set counter.value = counter.value + 1 %}
54
+ {%- endfor %}
55
+ {%- endif %}
56
+ {%- endfor %}
57
+ {%- else -%}
58
+ {{ tool_call_id }}
59
+ {%- endif -%}
60
+ {%- endmacro %}
61
+ {%- macro format_tool_message(messages, tool_msg) -%}
62
+ {#- format tool message #}{
63
+ "tool_call_id": "{{ tool_call_id_to_int(messages, tool_msg.tool_call_id) }}",
64
+ "results": {
65
+ {%- if tool_msg.content is mapping or tool_msg.content is string %}
66
+
67
+ {% if tool_msg.content is string -%}
68
+ {%- set text_wrapper = {"content": tool_msg.content} -%}
69
+ {%- else -%}
70
+ {%- set text_wrapper = tool_msg.content -%}
71
+ {%- endif %}
72
+ "0": {{ text_wrapper|tojson }}
73
+ {%- else %}
74
+ {%- for content in tool_msg.content %}
75
+
76
+ "{{ loop.index0 }}": {{ print_tool_content(content) }}{% if not loop.last %},{% endif %}
77
+ {%- endfor %}
78
+ {%- endif %}
79
+
80
+ },
81
+ "is_error": null
82
+ }
83
+ {%- endmacro -%}
84
+ {%- macro print_tool_content(item) %}
85
+ {%- if item.type|lower == "text" -%}
86
+ {%- set text_wrapper = {"content": item.text} -%}
87
+ {{ text_wrapper|tojson }}
88
+ {%- elif item.type|lower == "document" and item.document and "data" in item.document -%}
89
+ {{ item.document.data|tojson }}
90
+ {%- else -%}
91
+ {{ item|tojson }}
92
+ {%- endif -%}
93
+ {%- endmacro %}
94
+ {%- macro print_msg(msg) %}
95
+ {%- if msg is string -%}
96
+ <|START_TEXT|>{{ msg }}<|END_TEXT|>
97
+ {%- elif msg.content is string -%}
98
+ <|START_TEXT|>{{ msg.content }}<|END_TEXT|>
99
+ {%- else %}
100
+ {%- set last_was_text = namespace(value=false) %}
101
+ {%- for content in msg.content %}
102
+ {%- if content.type|lower == "text" -%}
103
+ {%- if not last_was_text.value -%}
104
+ <|START_TEXT|>
105
+ {%- endif -%}
106
+ {{ content.text }}
107
+ {%- if loop.last -%}
108
+ <|END_TEXT|>
109
+ {%- endif %}
110
+ {%- set last_was_text.value = true -%}
111
+ {%- else -%}
112
+ {%- if last_was_text.value -%}
113
+ <|END_TEXT|>
114
+ {%- endif -%}
115
+ {%- set last_was_text.value = false -%}
116
+ {%- endif -%}
117
+ {%- if content.type|lower == "image" -%}
118
+ {%- if content.data -%}
119
+ {{ content.data }}
120
+ {%- else -%}
121
+ <|IMG_PATCH|>
122
+ {%- endif -%}
123
+ {%- endif -%}
124
+ {%- endfor %}
125
+ {%- endif %}
126
+ {%- endmacro %}
127
+ {%- macro print_thinking(msg) %}
128
+ {%- if msg.reasoning -%}
129
+ {{ msg.reasoning }}
130
+ {%- elif msg.reasoning_content -%}
131
+ {{ msg.reasoning_content }}
132
+ {%- elif msg.thinking -%}
133
+ {{ msg.thinking }}
134
+ {%- elif msg.content and msg.content[0].thinking -%}
135
+ {{ msg.content[0].thinking }}
136
+ {%- endif %}
137
+ {%- endmacro %}
138
+ {%- if messages and messages[0]['role']|lower == 'system' and not has_developer_instruction and convert_first_system_msg %}{%- set developer_instruction = messages[0] %}{%- set render_developer_instruction = true %}{%- set initial_instruction_message = true %}{% endif %}
139
+ {%- set json_object = true if response_format and response_format.type == "json_object" else false %}
140
+ {%- set json_schema = (response_format.json_schema or response_format.schema) if response_format %}
141
+ {%- set json_mode = json_object or json_schema %}
142
+ {%- set tool_idx = namespace(value=0) %}
143
+ {%- set tool_ids_seen = namespace(value=[]) %}
144
+ {%- set regen_tool_call_ids = regen_tool_call_ids | default(true) -%}
145
+ {%- set sent_documents = namespace(value=false) -%}
146
+
147
+ {%- if render_tools_section or render_platform_instruction_override or render_grounding or json_mode -%}
148
+ <|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TEXT|>
149
+ {%- elif not render_developer_instruction -%}
150
+ <|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>
151
+ {%- endif %}
152
+
153
+ {%- set rendered_platform_turn_chunk = false %}
154
+
155
+ {%- if render_platform_instruction_override -%}
156
+ {{ platform_instruction_override }}
157
+ {% set rendered_platform_turn_chunk = true %}
158
+ {%- else %}
159
+ {%- endif %}
160
+
161
+ {%- if render_grounding -%}
162
+ {%- if rendered_platform_turn_chunk %}
163
+
164
+ {% endif -%}
165
+ Note that both your responses and reflections can be grounded. Grounding means you associate pieces of texts (called "spans") with those specific tool results that support them (called "sources"). And you use a pair of tags "<co>" and "</co>" to indicate when a span can be grounded onto a list of sources, listing them out in the closing tag. Sources from the same tool call are grouped together and listed as "{tool_call_id}:[{list of result indices}]", before they are joined together by ",". E.g., "<co>span</co: 0:[1,2],1:[0]>" means that "span" is supported by result 1 and 2 from "tool_call_id=0" as well as result 0 from "tool_call_id=1".
166
+ {% set rendered_platform_turn_chunk = true %}
167
+ {%- endif %}
168
+
169
+ {%- if render_tools_section %}
170
+ {%- if rendered_platform_turn_chunk %}
171
+
172
+ {% endif %}
173
+ # Available Tools
174
+ ```json
175
+ [
176
+ {% if tools_or_docs_exist %}
177
+ {%- if documents %}
178
+ {"name": "direct-injected-document", "description": "This is a special tool to directly inject user-uploaded documents into the chat as additional context. DO NOT use this tool by yourself!", "parameters": {"type": "object", "properties": {}, "required": []}, "responses": {"200": {"description": "Successfully returned a list of chunked text snippets from the directly uploaded documents.", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "object", "required": ["url", "snippet"], "properties": {"url": {"type": "string", "description": "The url of the uploaded document."}, "snippet": {"type": "string", "description": "The text snippet for the returned document chunk."}}}}}}}}}
179
+ {%- if tools %},
180
+ {% else %}
181
+
182
+ {% endif %}
183
+ {%- endif %}
184
+ {%- for tool in tools %}
185
+ {"name": "{{ tool['function']['name'] }}", "description": "{{ tool['function']['description'] }}", "parameters": {{ tool['function']['parameters']|tojson }}, "responses": null}
186
+ {%- if not loop.last %},{% endif %}
187
+
188
+ {% endfor %}
189
+ {%- else %}
190
+
191
+ {% endif %}
192
+ ]
193
+ ```
194
+ {%- set rendered_platform_turn_chunk = true %}
195
+ {%- endif -%}
196
+
197
+ {%- if json_mode -%}
198
+ {%- if rendered_platform_turn_chunk %}
199
+
200
+
201
+ {% endif -%}
202
+ When generating JSON objects, do not generate block markers. Generate an object directly without prefixing with ```json. Return only the JSON and nothing else.
203
+ {%- if json_schema %}
204
+
205
+ Your output should adhere to the following json schema:
206
+ {{ json_schema }}
207
+ {%- endif -%}
208
+ {%- set rendered_platform_turn_chunk = true %}
209
+ {%- endif %}
210
+ {%- if rendered_platform_turn_chunk -%}
211
+ <|END_TEXT|><|END_OF_TURN_TOKEN|>
212
+ {%- elif not render_developer_instruction -%}
213
+ <|END_OF_TURN_TOKEN|>
214
+ {%- endif %}
215
+ {%- if render_developer_instruction -%}
216
+ <|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{{ print_msg(developer_instruction) }}<|END_OF_TURN_TOKEN|>
217
+ {%- endif %}
218
+ {%- for message in messages %}
219
+ {%- set msg_role_downcased = message.role | lower %}
220
+ {%- if msg_role_downcased == 'system' and (not (loop.first and initial_instruction_message)) -%}
221
+ <|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{{ print_msg(message) }}<|END_OF_TURN_TOKEN|>
222
+ {%- elif msg_role_downcased == 'user' -%}
223
+ <|START_OF_TURN_TOKEN|><|USER_TOKEN|>{{ print_msg(message) }}<|END_OF_TURN_TOKEN|>
224
+ {%- if documents and not sent_documents.value %}{%- set sent_documents.value = true %}{% set tool_idx.value = tool_idx.value + 1 %}{{ document_turn(documents) }}{% endif %}
225
+ {%- elif msg_role_downcased == 'assistant' or msg_role_downcased == 'chatbot' -%}
226
+ <|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>
227
+ {%- if message.tool_calls %}
228
+ {% if not skip_thinking %}
229
+ {% if message.tool_plan -%}
230
+ <|START_THINKING|>{{ message.tool_plan }}<|END_THINKING|>
231
+ {%- elif message.reasoning or message.reasoning_content or message.thinking or (message.content and message.content[0].type == "thinking") -%}
232
+ <|START_THINKING|>{{ print_thinking(message) }}<|END_THINKING|>
233
+ {%- endif %}
234
+ {%- endif %}<|START_ACTION|>[
235
+ {%- for tc in message.tool_calls %}
236
+
237
+ {"tool_call_id": "{%- if regen_tool_call_ids -%}{{ tool_idx.value }}{%- else -%}{{ tc.id }}{%- endif -%}", "tool_name": "{{ tc['function']['name'] }}", "parameters": {{ tc['function']['arguments']|tojson }}}{% if not loop.last %},{% endif %}
238
+ {%- set tool_idx.value = tool_idx.value + 1 %}
239
+ {%- endfor %}
240
+
241
+ ]<|END_ACTION|><|END_OF_TURN_TOKEN|>
242
+ {%- else -%}
243
+ {% if (message.reasoning or message.reasoning_content or message.thinking or (message.content and message.content[0].type == "thinking")) and not skip_thinking -%}
244
+ <|START_THINKING|>{{ print_thinking(message) }}<|END_THINKING|>
245
+ {%- endif -%}
246
+ {{ print_msg(message) }}<|END_OF_TURN_TOKEN|>
247
+ {%- endif %}
248
+ {%- elif msg_role_downcased == 'tool' and message.tool_call_id not in tool_ids_seen.value -%}
249
+ <|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TOOL_RESULT|>[
250
+ {{ format_tool_message(messages, message) }}
251
+ {%- for msg in messages[loop.index0 + 1:] %}
252
+
253
+ {%- if msg.role | lower == 'tool' %},
254
+ {{ format_tool_message(messages, msg) }}
255
+ {%- set tool_ids_seen.value = tool_ids_seen.value + [msg.tool_call_id] %}
256
+ {%- else %}
257
+ {%- break %}
258
+ {%- endif %}
259
+ {%- endfor %}
260
+
261
+ ]<|END_TOOL_RESULT|><|END_OF_TURN_TOKEN|>
262
+ {%- endif %}
263
+ {%- endfor %}{%- if add_generation_prompt -%}<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>{% if reasoning %}<|START_THINKING|>{% else %}<|START_THINKING|><|END_THINKING|>{% endif %}{%- endif %}
config.json ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Cohere2MoeForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 2,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 255001,
10
+ "expert_selection_fn": "sigmoid",
11
+ "first_k_dense_replace": 1,
12
+ "head_dim": 128,
13
+ "hidden_act": "silu",
14
+ "hidden_size": 2048,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 768,
17
+ "layer_norm_eps": 1e-05,
18
+ "layer_types": [
19
+ "full_attention",
20
+ "sliding_attention",
21
+ "sliding_attention",
22
+ "sliding_attention",
23
+ "full_attention",
24
+ "sliding_attention",
25
+ "sliding_attention",
26
+ "sliding_attention",
27
+ "full_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "sliding_attention",
31
+ "full_attention",
32
+ "sliding_attention",
33
+ "sliding_attention",
34
+ "sliding_attention",
35
+ "full_attention",
36
+ "sliding_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "full_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "sliding_attention",
43
+ "full_attention",
44
+ "sliding_attention",
45
+ "sliding_attention",
46
+ "sliding_attention",
47
+ "full_attention",
48
+ "sliding_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "full_attention",
52
+ "sliding_attention",
53
+ "sliding_attention",
54
+ "sliding_attention",
55
+ "full_attention",
56
+ "sliding_attention",
57
+ "sliding_attention",
58
+ "sliding_attention",
59
+ "full_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "full_attention",
64
+ "sliding_attention",
65
+ "sliding_attention",
66
+ "sliding_attention",
67
+ "full_attention"
68
+ ],
69
+ "logit_scale": 1.0,
70
+ "max_position_embeddings": 500000,
71
+ "model_type": "cohere2_moe",
72
+ "norm_topk_prob": false,
73
+ "num_attention_heads": 32,
74
+ "num_experts": 128,
75
+ "num_experts_per_tok": 8,
76
+ "num_hidden_layers": 49,
77
+ "num_key_value_heads": 4,
78
+ "num_shared_experts": 0,
79
+ "pad_token_id": 0,
80
+ "prefix_dense_intermediate_size": 3072,
81
+ "prefix_dense_sliding_window_pattern": 1,
82
+ "rms_norm_eps": 1e-06,
83
+ "rope_scaling": null,
84
+ "rope_theta": 50000,
85
+ "shared_expert_combination_strategy": "average",
86
+ "sliding_window": 4096,
87
+ "transformers_version": "5.8.0",
88
+ "use_cache": true,
89
+ "use_gated_activation": true,
90
+ "use_parallel_block": true,
91
+ "use_parallel_embedding": false,
92
+ "use_qk_norm": false,
93
+ "vocab_size": 262144,
94
+ "quantization_config": {
95
+ "config_groups": {
96
+ "group_0": {
97
+ "targets": [
98
+ "Linear"
99
+ ],
100
+ "weights": {
101
+ "num_bits": 4,
102
+ "type": "float",
103
+ "symmetric": true,
104
+ "group_size": 16,
105
+ "strategy": "tensor_group",
106
+ "block_structure": null,
107
+ "dynamic": false,
108
+ "actorder": null,
109
+ "scale_dtype": "torch.float8_e4m3fn",
110
+ "zp_dtype": null,
111
+ "observer": "memoryless_minmax",
112
+ "observer_kwargs": {}
113
+ },
114
+ "input_activations": null,
115
+ "output_activations": null,
116
+ "format": null
117
+ }
118
+ },
119
+ "kv_cache_scheme": null,
120
+ "format": "nvfp4-pack-quantized",
121
+ "quantization_status": "compressed",
122
+ "global_compression_ratio": null,
123
+ "ignore": [
124
+ "model.embed_tokens",
125
+ "model.layers.0.input_layernorm",
126
+ "model.layers.0.mlp.down_proj",
127
+ "model.layers.0.mlp.gate_proj",
128
+ "model.layers.0.mlp.up_proj",
129
+ "model.layers.0.self_attn.k_proj",
130
+ "model.layers.0.self_attn.o_proj",
131
+ "model.layers.0.self_attn.q_proj",
132
+ "model.layers.0.self_attn.v_proj",
133
+ "model.layers.1.input_layernorm",
134
+ "model.layers.1.mlp.gate",
135
+ "model.layers.1.self_attn.k_proj",
136
+ "model.layers.1.self_attn.o_proj",
137
+ "model.layers.1.self_attn.q_proj",
138
+ "model.layers.1.self_attn.v_proj",
139
+ "model.layers.10.input_layernorm",
140
+ "model.layers.10.mlp.gate",
141
+ "model.layers.10.self_attn.k_proj",
142
+ "model.layers.10.self_attn.o_proj",
143
+ "model.layers.10.self_attn.q_proj",
144
+ "model.layers.10.self_attn.v_proj",
145
+ "model.layers.11.input_layernorm",
146
+ "model.layers.11.mlp.gate",
147
+ "model.layers.11.self_attn.k_proj",
148
+ "model.layers.11.self_attn.o_proj",
149
+ "model.layers.11.self_attn.q_proj",
150
+ "model.layers.11.self_attn.v_proj",
151
+ "model.layers.12.input_layernorm",
152
+ "model.layers.12.mlp.gate",
153
+ "model.layers.12.self_attn.k_proj",
154
+ "model.layers.12.self_attn.o_proj",
155
+ "model.layers.12.self_attn.q_proj",
156
+ "model.layers.12.self_attn.v_proj",
157
+ "model.layers.13.input_layernorm",
158
+ "model.layers.13.mlp.gate",
159
+ "model.layers.13.self_attn.k_proj",
160
+ "model.layers.13.self_attn.o_proj",
161
+ "model.layers.13.self_attn.q_proj",
162
+ "model.layers.13.self_attn.v_proj",
163
+ "model.layers.14.input_layernorm",
164
+ "model.layers.14.mlp.gate",
165
+ "model.layers.14.self_attn.k_proj",
166
+ "model.layers.14.self_attn.o_proj",
167
+ "model.layers.14.self_attn.q_proj",
168
+ "model.layers.14.self_attn.v_proj",
169
+ "model.layers.15.input_layernorm",
170
+ "model.layers.15.mlp.gate",
171
+ "model.layers.15.self_attn.k_proj",
172
+ "model.layers.15.self_attn.o_proj",
173
+ "model.layers.15.self_attn.q_proj",
174
+ "model.layers.15.self_attn.v_proj",
175
+ "model.layers.16.input_layernorm",
176
+ "model.layers.16.mlp.gate",
177
+ "model.layers.16.self_attn.k_proj",
178
+ "model.layers.16.self_attn.o_proj",
179
+ "model.layers.16.self_attn.q_proj",
180
+ "model.layers.16.self_attn.v_proj",
181
+ "model.layers.17.input_layernorm",
182
+ "model.layers.17.mlp.gate",
183
+ "model.layers.17.self_attn.k_proj",
184
+ "model.layers.17.self_attn.o_proj",
185
+ "model.layers.17.self_attn.q_proj",
186
+ "model.layers.17.self_attn.v_proj",
187
+ "model.layers.18.input_layernorm",
188
+ "model.layers.18.mlp.gate",
189
+ "model.layers.18.self_attn.k_proj",
190
+ "model.layers.18.self_attn.o_proj",
191
+ "model.layers.18.self_attn.q_proj",
192
+ "model.layers.18.self_attn.v_proj",
193
+ "model.layers.19.input_layernorm",
194
+ "model.layers.19.mlp.gate",
195
+ "model.layers.19.self_attn.k_proj",
196
+ "model.layers.19.self_attn.o_proj",
197
+ "model.layers.19.self_attn.q_proj",
198
+ "model.layers.19.self_attn.v_proj",
199
+ "model.layers.2.input_layernorm",
200
+ "model.layers.2.mlp.gate",
201
+ "model.layers.2.self_attn.k_proj",
202
+ "model.layers.2.self_attn.o_proj",
203
+ "model.layers.2.self_attn.q_proj",
204
+ "model.layers.2.self_attn.v_proj",
205
+ "model.layers.20.input_layernorm",
206
+ "model.layers.20.mlp.gate",
207
+ "model.layers.20.self_attn.k_proj",
208
+ "model.layers.20.self_attn.o_proj",
209
+ "model.layers.20.self_attn.q_proj",
210
+ "model.layers.20.self_attn.v_proj",
211
+ "model.layers.21.input_layernorm",
212
+ "model.layers.21.mlp.gate",
213
+ "model.layers.21.self_attn.k_proj",
214
+ "model.layers.21.self_attn.o_proj",
215
+ "model.layers.21.self_attn.q_proj",
216
+ "model.layers.21.self_attn.v_proj",
217
+ "model.layers.22.input_layernorm",
218
+ "model.layers.22.mlp.gate",
219
+ "model.layers.22.self_attn.k_proj",
220
+ "model.layers.22.self_attn.o_proj",
221
+ "model.layers.22.self_attn.q_proj",
222
+ "model.layers.22.self_attn.v_proj",
223
+ "model.layers.23.input_layernorm",
224
+ "model.layers.23.mlp.gate",
225
+ "model.layers.23.self_attn.k_proj",
226
+ "model.layers.23.self_attn.o_proj",
227
+ "model.layers.23.self_attn.q_proj",
228
+ "model.layers.23.self_attn.v_proj",
229
+ "model.layers.24.input_layernorm",
230
+ "model.layers.24.mlp.gate",
231
+ "model.layers.24.self_attn.k_proj",
232
+ "model.layers.24.self_attn.o_proj",
233
+ "model.layers.24.self_attn.q_proj",
234
+ "model.layers.24.self_attn.v_proj",
235
+ "model.layers.25.input_layernorm",
236
+ "model.layers.25.mlp.gate",
237
+ "model.layers.25.self_attn.k_proj",
238
+ "model.layers.25.self_attn.o_proj",
239
+ "model.layers.25.self_attn.q_proj",
240
+ "model.layers.25.self_attn.v_proj",
241
+ "model.layers.26.input_layernorm",
242
+ "model.layers.26.mlp.gate",
243
+ "model.layers.26.self_attn.k_proj",
244
+ "model.layers.26.self_attn.o_proj",
245
+ "model.layers.26.self_attn.q_proj",
246
+ "model.layers.26.self_attn.v_proj",
247
+ "model.layers.27.input_layernorm",
248
+ "model.layers.27.mlp.gate",
249
+ "model.layers.27.self_attn.k_proj",
250
+ "model.layers.27.self_attn.o_proj",
251
+ "model.layers.27.self_attn.q_proj",
252
+ "model.layers.27.self_attn.v_proj",
253
+ "model.layers.28.input_layernorm",
254
+ "model.layers.28.mlp.gate",
255
+ "model.layers.28.self_attn.k_proj",
256
+ "model.layers.28.self_attn.o_proj",
257
+ "model.layers.28.self_attn.q_proj",
258
+ "model.layers.28.self_attn.v_proj",
259
+ "model.layers.29.input_layernorm",
260
+ "model.layers.29.mlp.gate",
261
+ "model.layers.29.self_attn.k_proj",
262
+ "model.layers.29.self_attn.o_proj",
263
+ "model.layers.29.self_attn.q_proj",
264
+ "model.layers.29.self_attn.v_proj",
265
+ "model.layers.3.input_layernorm",
266
+ "model.layers.3.mlp.gate",
267
+ "model.layers.3.self_attn.k_proj",
268
+ "model.layers.3.self_attn.o_proj",
269
+ "model.layers.3.self_attn.q_proj",
270
+ "model.layers.3.self_attn.v_proj",
271
+ "model.layers.30.input_layernorm",
272
+ "model.layers.30.mlp.gate",
273
+ "model.layers.30.self_attn.k_proj",
274
+ "model.layers.30.self_attn.o_proj",
275
+ "model.layers.30.self_attn.q_proj",
276
+ "model.layers.30.self_attn.v_proj",
277
+ "model.layers.31.input_layernorm",
278
+ "model.layers.31.mlp.gate",
279
+ "model.layers.31.self_attn.k_proj",
280
+ "model.layers.31.self_attn.o_proj",
281
+ "model.layers.31.self_attn.q_proj",
282
+ "model.layers.31.self_attn.v_proj",
283
+ "model.layers.32.input_layernorm",
284
+ "model.layers.32.mlp.gate",
285
+ "model.layers.32.self_attn.k_proj",
286
+ "model.layers.32.self_attn.o_proj",
287
+ "model.layers.32.self_attn.q_proj",
288
+ "model.layers.32.self_attn.v_proj",
289
+ "model.layers.33.input_layernorm",
290
+ "model.layers.33.mlp.gate",
291
+ "model.layers.33.self_attn.k_proj",
292
+ "model.layers.33.self_attn.o_proj",
293
+ "model.layers.33.self_attn.q_proj",
294
+ "model.layers.33.self_attn.v_proj",
295
+ "model.layers.34.input_layernorm",
296
+ "model.layers.34.mlp.gate",
297
+ "model.layers.34.self_attn.k_proj",
298
+ "model.layers.34.self_attn.o_proj",
299
+ "model.layers.34.self_attn.q_proj",
300
+ "model.layers.34.self_attn.v_proj",
301
+ "model.layers.35.input_layernorm",
302
+ "model.layers.35.mlp.gate",
303
+ "model.layers.35.self_attn.k_proj",
304
+ "model.layers.35.self_attn.o_proj",
305
+ "model.layers.35.self_attn.q_proj",
306
+ "model.layers.35.self_attn.v_proj",
307
+ "model.layers.36.input_layernorm",
308
+ "model.layers.36.mlp.gate",
309
+ "model.layers.36.self_attn.k_proj",
310
+ "model.layers.36.self_attn.o_proj",
311
+ "model.layers.36.self_attn.q_proj",
312
+ "model.layers.36.self_attn.v_proj",
313
+ "model.layers.37.input_layernorm",
314
+ "model.layers.37.mlp.gate",
315
+ "model.layers.37.self_attn.k_proj",
316
+ "model.layers.37.self_attn.o_proj",
317
+ "model.layers.37.self_attn.q_proj",
318
+ "model.layers.37.self_attn.v_proj",
319
+ "model.layers.38.input_layernorm",
320
+ "model.layers.38.mlp.gate",
321
+ "model.layers.38.self_attn.k_proj",
322
+ "model.layers.38.self_attn.o_proj",
323
+ "model.layers.38.self_attn.q_proj",
324
+ "model.layers.38.self_attn.v_proj",
325
+ "model.layers.39.input_layernorm",
326
+ "model.layers.39.mlp.gate",
327
+ "model.layers.39.self_attn.k_proj",
328
+ "model.layers.39.self_attn.o_proj",
329
+ "model.layers.39.self_attn.q_proj",
330
+ "model.layers.39.self_attn.v_proj",
331
+ "model.layers.4.input_layernorm",
332
+ "model.layers.4.mlp.gate",
333
+ "model.layers.4.self_attn.k_proj",
334
+ "model.layers.4.self_attn.o_proj",
335
+ "model.layers.4.self_attn.q_proj",
336
+ "model.layers.4.self_attn.v_proj",
337
+ "model.layers.40.input_layernorm",
338
+ "model.layers.40.mlp.gate",
339
+ "model.layers.40.self_attn.k_proj",
340
+ "model.layers.40.self_attn.o_proj",
341
+ "model.layers.40.self_attn.q_proj",
342
+ "model.layers.40.self_attn.v_proj",
343
+ "model.layers.41.input_layernorm",
344
+ "model.layers.41.mlp.gate",
345
+ "model.layers.41.self_attn.k_proj",
346
+ "model.layers.41.self_attn.o_proj",
347
+ "model.layers.41.self_attn.q_proj",
348
+ "model.layers.41.self_attn.v_proj",
349
+ "model.layers.42.input_layernorm",
350
+ "model.layers.42.mlp.gate",
351
+ "model.layers.42.self_attn.k_proj",
352
+ "model.layers.42.self_attn.o_proj",
353
+ "model.layers.42.self_attn.q_proj",
354
+ "model.layers.42.self_attn.v_proj",
355
+ "model.layers.43.input_layernorm",
356
+ "model.layers.43.mlp.gate",
357
+ "model.layers.43.self_attn.k_proj",
358
+ "model.layers.43.self_attn.o_proj",
359
+ "model.layers.43.self_attn.q_proj",
360
+ "model.layers.43.self_attn.v_proj",
361
+ "model.layers.44.input_layernorm",
362
+ "model.layers.44.mlp.gate",
363
+ "model.layers.44.self_attn.k_proj",
364
+ "model.layers.44.self_attn.o_proj",
365
+ "model.layers.44.self_attn.q_proj",
366
+ "model.layers.44.self_attn.v_proj",
367
+ "model.layers.45.input_layernorm",
368
+ "model.layers.45.mlp.gate",
369
+ "model.layers.45.self_attn.k_proj",
370
+ "model.layers.45.self_attn.o_proj",
371
+ "model.layers.45.self_attn.q_proj",
372
+ "model.layers.45.self_attn.v_proj",
373
+ "model.layers.46.input_layernorm",
374
+ "model.layers.46.mlp.gate",
375
+ "model.layers.46.self_attn.k_proj",
376
+ "model.layers.46.self_attn.o_proj",
377
+ "model.layers.46.self_attn.q_proj",
378
+ "model.layers.46.self_attn.v_proj",
379
+ "model.layers.47.input_layernorm",
380
+ "model.layers.47.mlp.gate",
381
+ "model.layers.47.self_attn.k_proj",
382
+ "model.layers.47.self_attn.o_proj",
383
+ "model.layers.47.self_attn.q_proj",
384
+ "model.layers.47.self_attn.v_proj",
385
+ "model.layers.48.input_layernorm",
386
+ "model.layers.48.mlp.gate",
387
+ "model.layers.48.self_attn.k_proj",
388
+ "model.layers.48.self_attn.o_proj",
389
+ "model.layers.48.self_attn.q_proj",
390
+ "model.layers.48.self_attn.v_proj",
391
+ "model.layers.5.input_layernorm",
392
+ "model.layers.5.mlp.gate",
393
+ "model.layers.5.self_attn.k_proj",
394
+ "model.layers.5.self_attn.o_proj",
395
+ "model.layers.5.self_attn.q_proj",
396
+ "model.layers.5.self_attn.v_proj",
397
+ "model.layers.6.input_layernorm",
398
+ "model.layers.6.mlp.gate",
399
+ "model.layers.6.self_attn.k_proj",
400
+ "model.layers.6.self_attn.o_proj",
401
+ "model.layers.6.self_attn.q_proj",
402
+ "model.layers.6.self_attn.v_proj",
403
+ "model.layers.7.input_layernorm",
404
+ "model.layers.7.mlp.gate",
405
+ "model.layers.7.self_attn.k_proj",
406
+ "model.layers.7.self_attn.o_proj",
407
+ "model.layers.7.self_attn.q_proj",
408
+ "model.layers.7.self_attn.v_proj",
409
+ "model.layers.8.input_layernorm",
410
+ "model.layers.8.mlp.gate",
411
+ "model.layers.8.self_attn.k_proj",
412
+ "model.layers.8.self_attn.o_proj",
413
+ "model.layers.8.self_attn.q_proj",
414
+ "model.layers.8.self_attn.v_proj",
415
+ "model.layers.9.input_layernorm",
416
+ "model.layers.9.mlp.gate",
417
+ "model.layers.9.self_attn.k_proj",
418
+ "model.layers.9.self_attn.o_proj",
419
+ "model.layers.9.self_attn.q_proj",
420
+ "model.layers.9.self_attn.v_proj",
421
+ "model.norm"
422
+ ],
423
+ "version": "0.15.1.dev6+g077e752",
424
+ "quant_method": "compressed-tensors",
425
+ "sparsity_config": {},
426
+ "transform_config": {}
427
+ }
428
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "eos_token_id": 255001,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "5.8.0"
7
+ }
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0522c3999766bb1a1f94991e1faa0f54ae69b19eb864acd2541f17c17f2d4370
3
+ size 5372290582
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:378994dc59d90c4b7bb300adaede90308fe19b558be2a7f0d9204c82fa9d8b51
3
+ size 5370206950
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50774d1fb54a39d7791ee39a31c897a0bc825e30961e92d35cfb815497bb3d6b
3
+ size 5370876144
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f25824e9d21451f5810e1c0d6bad72655e0c7d52d930eca27fb63a3b7eeb73bf
3
+ size 3234214028
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<BOS_TOKEN>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|END_OF_TURN_TOKEN|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<PAD>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<UNK>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14bd1c49d7d11874921d324986713df4be21cd06060530c497dacef99919b7a5
3
+ size 28217141
tokenizer_config.json ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": false,
5
+ "clean_up_tokenization_spaces": false,
6
+ "legacy": true,
7
+ "spaces_between_special_tokens": false,
8
+ "use_default_system_prompt": false,
9
+ "bos_token": "<BOS_TOKEN>",
10
+ "eos_token": "<|END_OF_TURN_TOKEN|>",
11
+ "pad_token": "<PAD>",
12
+ "unk_token": "<UNK>",
13
+ "tokenizer_class": "TokenizersBackend",
14
+ "model_max_length": 1000000000000000019884624838656,
15
+ "sp_model_kwargs": {},
16
+ "chat_template": [
17
+ {
18
+ "name": "default",
19
+ "template": "{{ bos_token }}\n{%- macro document_turn(documents) -%}\n<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|START_THINKING|>I will look through the document to address the users needs.<|END_THINKING|><|START_ACTION|>[\n {\"tool_call_id\": \"0\", \"tool_name\": \"direct-injected-document\", \"parameters\": {}}\n]<|END_ACTION|><|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TOOL_RESULT|>[\n {\n \"tool_call_id\": \"0\",\n \"results\": {\n{% for doc in documents %}\n \"{{ loop.index0 }}\": {{doc|tojson}}{% if not loop.last %},\n {% endif %}\n{% endfor %}\n\n },\n \"is_error\": null\n }\n]<|END_TOOL_RESULT|><|END_OF_TURN_TOKEN|>\n{%- endmacro -%}\n{%- macro render_content(content) -%}\n{%- if content is string -%}\n{{ content }}\n{%- elif content is none -%}\n{%- elif content is mapping -%}\n{%- if content.text is defined -%}{{ content.text }}{%- endif -%}\n{%- else -%}\n{%- set _parts = namespace(first=true) -%}\n{%- for item in content -%}\n{%- if item is string -%}\n{%- if not _parts.first -%}{{ \"\\n\" }}{%- endif -%}\n{{ item }}\n{%- set _parts.first = false -%}\n{%- elif item is mapping and (item.type|default(\"text\"))|lower == \"text\" and item.text is defined -%}\n{%- if not _parts.first -%}{{ \"\\n\" }}{%- endif -%}\n{{ item.text }}\n{%- set _parts.first = false -%}\n{%- endif -%}\n{%- endfor -%}\n{%- endif -%}\n{%- endmacro -%}\n{%- macro tool_call_id_to_int(messages, tool_call_id) %}\n{%- set counter = namespace(value=0) %}\n{%- set tool_call_id_seen = namespace(value=false) %}\n{%- for msg in messages %}\n {%- if msg.tool_calls %}\n {%- for tool_call in msg.tool_calls %}\n {%- if tool_call.id == tool_call_id and not tool_call_id_seen.value -%}\n {{ counter.value }}\n {%- set tool_call_id_seen.value = true %}\n {%- endif %}\n {%- set counter.value = counter.value + 1 %}\n {%- endfor %}\n {%- endif %}\n{%- endfor %}\n{%- endmacro %}\n{%- macro format_tool_message(messages, tool_msg) -%}\n {\n \"tool_call_id\": \"{{ tool_call_id_to_int(messages, tool_msg.tool_call_id) }}\",\n \"results\": {\n \"0\": {{ render_content(tool_msg.content)|tojson }}\n },\n \"is_error\": null\n }\n{%- endmacro -%}\n{%- if messages and messages[0]['role']|lower == 'system' %}{%- set developer_preamble = messages[0]['content'] %}{% endif %}\n{%- set tool_idx = namespace(value=0) %}\n{%- set tool_ids_seen = namespace(value=[]) %}\n{%- set sent_documents = namespace(value=false) -%}\n<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TEXT|># Available Tools\n```json\n[\n{% if documents or tools %}\n{%- if documents %}\n {\"name\": \"direct-injected-document\", \"description\": \"This is a special tool to directly inject user-uploaded documents into the chat as additional context. DO NOT use this tool by yourself!\", \"parameters\": {\"type\": \"object\", \"properties\": {}, \"required\": []}, \"responses\": {\"200\": {\"description\": \"Successfully returned a list of chunked text snippets from the directly uploaded documents.\", \"content\": {\"application/json\": {\"schema\": {\"type\": \"array\", \"items\": {\"type\": \"object\", \"required\": [\"url\", \"snippet\"], \"properties\": {\"url\": {\"type\": \"string\", \"description\": \"The url of the uploaded document.\"}, \"snippet\": {\"type\": \"string\", \"description\": \"The text snippet for the returned document chunk.\"}}}}}}}}}{%- if tools %},{% endif %}\n{%- endif %}\n{%- if tools %}\n{%- for tool in tools %}\n {\"name\": \"{{ tool['function']['name'] }}\", \"description\": \"{{tool['function']['description']}}\", \"parameters\": {{ tool['function']['parameters']|tojson }}, \"responses\": null}{%- if not loop.last %},{% endif %}\n{%- endfor %}\n{%- endif %}\n{% else %}\n\n{% endif %}\n]\n```<|END_TEXT|><|END_OF_TURN_TOKEN|>\n{%- if developer_preamble %}\n<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TEXT|>{{ render_content(developer_preamble) }}<|END_TEXT|><|END_OF_TURN_TOKEN|>\n{%- endif %}\n{%- for message in messages %}\n {%- if message.role|lower == 'system' and not (loop.first and developer_preamble) %}\n<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TEXT|>{{ render_content(message.content) }}<|END_TEXT|><|END_OF_TURN_TOKEN|>\n {%- elif message.role|lower == 'user' %}\n<|START_OF_TURN_TOKEN|><|USER_TOKEN|><|START_TEXT|>{{ render_content(message.content) }}<|END_TEXT|><|END_OF_TURN_TOKEN|>{%- if documents and not sent_documents.value %}{%- set sent_documents.value = true %}{% set tool_idx.value = tool_idx.value + 1 %}{{ document_turn(documents) }}{% endif %}\n {%- elif message.role|lower == 'assistant' or message.role|lower == 'chatbot' %}\n<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>{% if message.tool_calls %}<|START_THINKING|>{{message.tool_plan}}<|END_THINKING|><|START_ACTION|>[\n {% for tc in message.tool_calls %}\n {\"tool_call_id\": \"{{ tool_idx.value }}\", \"tool_name\": \"{{ tc['function']['name'] }}\", \"parameters\": {{ tc['function']['arguments']|tojson }}}{% if not loop.last %},{% endif %}\n\n {% set tool_idx.value = tool_idx.value + 1 %}\n {% endfor %}\n]<|END_ACTION|><|END_OF_TURN_TOKEN|>{% else %}<|START_TEXT|>{{ render_content(message.content) }}<|END_TEXT|><|END_OF_TURN_TOKEN|>{% endif %}\n {% elif message.role|lower == 'tool' and message.tool_call_id not in tool_ids_seen.value %}\n<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|><|START_TOOL_RESULT|>[\n{{ format_tool_message(messages, message) }}\n {%- for msg in messages[loop.index0 + 1:] %}\n {%- if msg.role|lower == 'tool' %},\n{{ format_tool_message(messages, msg) }}\n {%- set tool_ids_seen.value = tool_ids_seen.value + [msg.tool_call_id] %}\n {%- else %}\n {%- break %}\n {%- endif %}\n {%- endfor %}\n\n]<|END_TOOL_RESULT|><|END_OF_TURN_TOKEN|>\n {%- endif %}\n{%- endfor %}<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|><|START_THINKING|>\n"
20
+ }
21
+ ],
22
+ "added_tokens_decoder": {
23
+ "0": {
24
+ "content": "<PAD>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false,
29
+ "special": true
30
+ },
31
+ "1": {
32
+ "content": "<MASK_TOKEN>",
33
+ "lstrip": false,
34
+ "normalized": false,
35
+ "rstrip": false,
36
+ "single_word": false,
37
+ "special": true
38
+ },
39
+ "2": {
40
+ "content": "<BOS_TOKEN>",
41
+ "lstrip": false,
42
+ "normalized": false,
43
+ "rstrip": false,
44
+ "single_word": false,
45
+ "special": true
46
+ },
47
+ "3": {
48
+ "content": "<EOS_TOKEN>",
49
+ "lstrip": false,
50
+ "normalized": false,
51
+ "rstrip": false,
52
+ "single_word": false,
53
+ "special": true
54
+ },
55
+ "4": {
56
+ "content": "<UNK>",
57
+ "lstrip": false,
58
+ "normalized": false,
59
+ "rstrip": false,
60
+ "single_word": false,
61
+ "special": true
62
+ },
63
+ "255000": {
64
+ "content": "<|START_OF_TURN_TOKEN|>",
65
+ "lstrip": false,
66
+ "normalized": false,
67
+ "rstrip": false,
68
+ "single_word": false,
69
+ "special": false
70
+ },
71
+ "255001": {
72
+ "content": "<|END_OF_TURN_TOKEN|>",
73
+ "lstrip": false,
74
+ "normalized": false,
75
+ "rstrip": false,
76
+ "single_word": false,
77
+ "special": false
78
+ },
79
+ "255002": {
80
+ "content": "<|USER_TOKEN|>",
81
+ "lstrip": false,
82
+ "normalized": false,
83
+ "rstrip": false,
84
+ "single_word": false,
85
+ "special": false
86
+ },
87
+ "255003": {
88
+ "content": "<|CHATBOT_TOKEN|>",
89
+ "lstrip": false,
90
+ "normalized": false,
91
+ "rstrip": false,
92
+ "single_word": false,
93
+ "special": false
94
+ },
95
+ "255004": {
96
+ "content": "<|SYSTEM_TOKEN|>",
97
+ "lstrip": false,
98
+ "normalized": false,
99
+ "rstrip": false,
100
+ "single_word": false,
101
+ "special": false
102
+ },
103
+ "255005": {
104
+ "content": "<|NEW_FILE|>",
105
+ "lstrip": false,
106
+ "normalized": false,
107
+ "rstrip": false,
108
+ "single_word": false,
109
+ "special": true
110
+ },
111
+ "255006": {
112
+ "content": "<|BEGINNING_OF_PREFIX_FIM_TOKEN|>",
113
+ "lstrip": false,
114
+ "normalized": false,
115
+ "rstrip": false,
116
+ "single_word": false,
117
+ "special": true
118
+ },
119
+ "255007": {
120
+ "content": "<|BEGINNING_OF_MIDDLE_FIM_TOKEN|>",
121
+ "lstrip": false,
122
+ "normalized": false,
123
+ "rstrip": false,
124
+ "single_word": false,
125
+ "special": true
126
+ },
127
+ "255008": {
128
+ "content": "<|BEGINNING_OF_SUFFIX_FIM_TOKEN|>",
129
+ "lstrip": false,
130
+ "normalized": false,
131
+ "rstrip": false,
132
+ "single_word": false,
133
+ "special": true
134
+ },
135
+ "255009": {
136
+ "content": "<|END_OF_MIDDLE_FIM_TOKEN|>",
137
+ "lstrip": false,
138
+ "normalized": false,
139
+ "rstrip": false,
140
+ "single_word": false,
141
+ "special": true
142
+ },
143
+ "255010": {
144
+ "content": "<|START_THINKING|>",
145
+ "lstrip": false,
146
+ "normalized": false,
147
+ "rstrip": false,
148
+ "single_word": false,
149
+ "special": false
150
+ },
151
+ "255011": {
152
+ "content": "<|END_THINKING|>",
153
+ "lstrip": false,
154
+ "normalized": false,
155
+ "rstrip": false,
156
+ "single_word": false,
157
+ "special": false
158
+ },
159
+ "255012": {
160
+ "content": "<|START_TEXT|>",
161
+ "lstrip": false,
162
+ "normalized": false,
163
+ "rstrip": false,
164
+ "single_word": false,
165
+ "special": false
166
+ },
167
+ "255013": {
168
+ "content": "<|END_TEXT|>",
169
+ "lstrip": false,
170
+ "normalized": false,
171
+ "rstrip": false,
172
+ "single_word": false,
173
+ "special": false
174
+ },
175
+ "255014": {
176
+ "content": "<|START_ACTION|>",
177
+ "lstrip": false,
178
+ "normalized": false,
179
+ "rstrip": false,
180
+ "single_word": false,
181
+ "special": false
182
+ },
183
+ "255015": {
184
+ "content": "<|END_ACTION|>",
185
+ "lstrip": false,
186
+ "normalized": false,
187
+ "rstrip": false,
188
+ "single_word": false,
189
+ "special": false
190
+ },
191
+ "255016": {
192
+ "content": "<|START_TOOL_RESULT|>",
193
+ "lstrip": false,
194
+ "normalized": false,
195
+ "rstrip": false,
196
+ "single_word": false,
197
+ "special": false
198
+ },
199
+ "255017": {
200
+ "content": "<|END_TOOL_RESULT|>",
201
+ "lstrip": false,
202
+ "normalized": false,
203
+ "rstrip": false,
204
+ "single_word": false,
205
+ "special": false
206
+ },
207
+ "255018": {
208
+ "content": "<|USER_0_TOKEN|>",
209
+ "lstrip": false,
210
+ "normalized": false,
211
+ "rstrip": false,
212
+ "single_word": false,
213
+ "special": false
214
+ },
215
+ "255019": {
216
+ "content": "<|USER_1_TOKEN|>",
217
+ "lstrip": false,
218
+ "normalized": false,
219
+ "rstrip": false,
220
+ "single_word": false,
221
+ "special": false
222
+ },
223
+ "255020": {
224
+ "content": "<|USER_2_TOKEN|>",
225
+ "lstrip": false,
226
+ "normalized": false,
227
+ "rstrip": false,
228
+ "single_word": false,
229
+ "special": false
230
+ },
231
+ "255021": {
232
+ "content": "<|USER_3_TOKEN|>",
233
+ "lstrip": false,
234
+ "normalized": false,
235
+ "rstrip": false,
236
+ "single_word": false,
237
+ "special": false
238
+ },
239
+ "255022": {
240
+ "content": "<|USER_4_TOKEN|>",
241
+ "lstrip": false,
242
+ "normalized": false,
243
+ "rstrip": false,
244
+ "single_word": false,
245
+ "special": false
246
+ },
247
+ "255023": {
248
+ "content": "<|USER_5_TOKEN|>",
249
+ "lstrip": false,
250
+ "normalized": false,
251
+ "rstrip": false,
252
+ "single_word": false,
253
+ "special": false
254
+ },
255
+ "255024": {
256
+ "content": "<|USER_6_TOKEN|>",
257
+ "lstrip": false,
258
+ "normalized": false,
259
+ "rstrip": false,
260
+ "single_word": false,
261
+ "special": false
262
+ },
263
+ "255025": {
264
+ "content": "<|USER_7_TOKEN|>",
265
+ "lstrip": false,
266
+ "normalized": false,
267
+ "rstrip": false,
268
+ "single_word": false,
269
+ "special": false
270
+ },
271
+ "255026": {
272
+ "content": "<|USER_8_TOKEN|>",
273
+ "lstrip": false,
274
+ "normalized": false,
275
+ "rstrip": false,
276
+ "single_word": false,
277
+ "special": false
278
+ },
279
+ "255027": {
280
+ "content": "<|USER_9_TOKEN|>",
281
+ "lstrip": false,
282
+ "normalized": false,
283
+ "rstrip": false,
284
+ "single_word": false,
285
+ "special": false
286
+ },
287
+ "255028": {
288
+ "content": "<|START_OF_IMG|>",
289
+ "lstrip": false,
290
+ "normalized": false,
291
+ "rstrip": false,
292
+ "single_word": false,
293
+ "special": true
294
+ },
295
+ "255029": {
296
+ "content": "<|END_OF_IMG|>",
297
+ "lstrip": false,
298
+ "normalized": false,
299
+ "rstrip": false,
300
+ "single_word": false,
301
+ "special": true
302
+ },
303
+ "255030": {
304
+ "content": "<|IMG_LINE_BREAK|>",
305
+ "lstrip": false,
306
+ "normalized": false,
307
+ "rstrip": false,
308
+ "single_word": false,
309
+ "special": true
310
+ },
311
+ "255031": {
312
+ "content": "<|IMG_PATCH|>",
313
+ "lstrip": false,
314
+ "normalized": false,
315
+ "rstrip": false,
316
+ "single_word": false,
317
+ "special": true
318
+ }
319
+ }
320
+ }