Upload FP4 checkpoint weights and runtime configuration
Browse files- .gitattributes +2 -34
- chat_template.jinja +261 -0
- config.json +0 -0
- generation_config.json +12 -0
- model.safetensors.index.json +3 -0
- processor_config.json +44 -0
- tensors/model-00001-of-00036.safetensors +3 -0
- tensors/model-00002-of-00036.safetensors +3 -0
- tensors/model-00003-of-00036.safetensors +3 -0
- tensors/model-00004-of-00036.safetensors +3 -0
- tensors/model-00005-of-00036.safetensors +3 -0
- tensors/model-00006-of-00036.safetensors +3 -0
- tensors/model-00007-of-00036.safetensors +3 -0
- tensors/model-00008-of-00036.safetensors +3 -0
- tensors/model-00009-of-00036.safetensors +3 -0
- tensors/model-00010-of-00036.safetensors +3 -0
- tensors/model-00011-of-00036.safetensors +3 -0
- tensors/model-00012-of-00036.safetensors +3 -0
- tensors/model-00013-of-00036.safetensors +3 -0
- tensors/model-00014-of-00036.safetensors +3 -0
- tensors/model-00015-of-00036.safetensors +3 -0
- tensors/model-00016-of-00036.safetensors +3 -0
- tensors/model-00017-of-00036.safetensors +3 -0
- tensors/model-00018-of-00036.safetensors +3 -0
- tensors/model-00019-of-00036.safetensors +3 -0
- tensors/model-00020-of-00036.safetensors +3 -0
- tensors/model-00021-of-00036.safetensors +3 -0
- tensors/model-00022-of-00036.safetensors +3 -0
- tensors/model-00023-of-00036.safetensors +3 -0
- tensors/model-00024-of-00036.safetensors +3 -0
- tensors/model-00025-of-00036.safetensors +3 -0
- tensors/model-00026-of-00036.safetensors +3 -0
- tensors/model-00027-of-00036.safetensors +3 -0
- tensors/model-00028-of-00036.safetensors +3 -0
- tensors/model-00029-of-00036.safetensors +3 -0
- tensors/model-00030-of-00036.safetensors +3 -0
- tensors/model-00031-of-00036.safetensors +3 -0
- tensors/model-00032-of-00036.safetensors +3 -0
- tensors/model-00033-of-00036.safetensors +3 -0
- tensors/model-00034-of-00036.safetensors +3 -0
- tensors/model-00035-of-00036.safetensors +3 -0
- tensors/model-00036-of-00036.safetensors +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +33 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,3 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[gMASK]<sop>
|
| 2 |
+
{%- set effective_reasoning_effort = reasoning_effort if reasoning_effort is defined and reasoning_effort in ['low', 'high'] else 'max' -%}
|
| 3 |
+
{%- if effective_reasoning_effort is not none -%}<|system|>Reasoning Effort: {{ effective_reasoning_effort | capitalize }}{%- endif -%}
|
| 4 |
+
{%- set clear_thinking = clear_thinking if clear_thinking is defined else false -%}
|
| 5 |
+
{%- if tools -%}
|
| 6 |
+
{%- macro tool_to_json(tool) -%}
|
| 7 |
+
{%- set ns_tool = namespace(first=true) -%}
|
| 8 |
+
{{ '{' -}}
|
| 9 |
+
{%- for k, v in tool.items() -%}
|
| 10 |
+
{%- if k != 'defer_loading' and k != 'strict' -%}
|
| 11 |
+
{%- if not ns_tool.first -%}{{- ', ' -}}{%- endif -%}
|
| 12 |
+
{%- set ns_tool.first = false -%}
|
| 13 |
+
"{{ k }}": {{ v | tojson(ensure_ascii=False) }}
|
| 14 |
+
{%- endif -%}
|
| 15 |
+
{%- endfor -%}
|
| 16 |
+
{{- '}' -}}
|
| 17 |
+
{%- endmacro -%}
|
| 18 |
+
{%- macro tool_references_to_response(refs) -%}
|
| 19 |
+
{{- '<tool_response><tools>\n' -}}
|
| 20 |
+
{%- for tr in refs -%}
|
| 21 |
+
{%- for tool in tools -%}
|
| 22 |
+
{%- if 'function' in tool -%}
|
| 23 |
+
{%- set tool = tool['function'] -%}
|
| 24 |
+
{%- endif -%}
|
| 25 |
+
{%- if tool.name == tr.name -%}
|
| 26 |
+
{{- tool_to_json(tool) + '\n' -}}
|
| 27 |
+
{%- endif -%}
|
| 28 |
+
{%- endfor -%}
|
| 29 |
+
{%- endfor -%}
|
| 30 |
+
{{- '</tools></tool_response>' -}}
|
| 31 |
+
{%- endmacro -%}
|
| 32 |
+
<|system|>
|
| 33 |
+
# Tools
|
| 34 |
+
|
| 35 |
+
You may call one or more functions to assist with the user query.
|
| 36 |
+
|
| 37 |
+
You are provided with function signatures within <tools></tools> XML tags:
|
| 38 |
+
<tools>
|
| 39 |
+
{% for tool in tools %}
|
| 40 |
+
{%- if 'function' in tool -%}
|
| 41 |
+
{%- set tool = tool['function'] -%}
|
| 42 |
+
{%- endif -%}
|
| 43 |
+
{% if tool.defer_loading is not defined or not tool.defer_loading %}
|
| 44 |
+
{{ tool_to_json(tool) }}
|
| 45 |
+
{% endif %}
|
| 46 |
+
{% endfor %}
|
| 47 |
+
</tools>
|
| 48 |
+
|
| 49 |
+
For each function call, output the function name and arguments within the following XML format:
|
| 50 |
+
<tool_call>{function-name}<arg_key>{arg-key-1}</arg_key><arg_value>{arg-value-1}</arg_value><arg_key>{arg-key-2}</arg_key><arg_value>{arg-value-2}</arg_value>...</tool_call>{%- endif -%}
|
| 51 |
+
{%- macro emit_image() -%}<|begin_of_image|><|image|><|end_of_image|>{%- endmacro -%}
|
| 52 |
+
{%- macro emit_video() -%}<|begin_of_video|><|video|><|end_of_video|>{%- endmacro -%}
|
| 53 |
+
{%- macro emit_audio() -%}<|begin_of_audio|><|end_of_audio|>{%- endmacro -%}
|
| 54 |
+
{%- macro visible_text(content) -%}
|
| 55 |
+
{%- if content is string -%}
|
| 56 |
+
{{- content -}}
|
| 57 |
+
{%- elif content is iterable and content is not mapping -%}
|
| 58 |
+
{%- for item in content -%}
|
| 59 |
+
{%- if item is mapping and item.type == 'text' -%}
|
| 60 |
+
{{- item.text -}}
|
| 61 |
+
{%- elif item is string -%}
|
| 62 |
+
{{- item -}}
|
| 63 |
+
{%- elif item is mapping and item.type in ['image', 'image_url'] -%}
|
| 64 |
+
{{- emit_image() -}}
|
| 65 |
+
{%- elif item is mapping and item.type in ['video', 'video_url'] -%}
|
| 66 |
+
{{- emit_video() -}}
|
| 67 |
+
{%- elif item is mapping and item.type in ['audio', 'audio_url', 'input_audio'] -%}
|
| 68 |
+
{{- emit_audio() -}}
|
| 69 |
+
{%- endif -%}
|
| 70 |
+
{%- endfor -%}
|
| 71 |
+
{%- elif content is not none -%}
|
| 72 |
+
{{- content -}}
|
| 73 |
+
{%- endif -%}
|
| 74 |
+
{%- endmacro -%}
|
| 75 |
+
{%- macro tool_response(text) -%}
|
| 76 |
+
{{- '<tool_response>' + text + '</tool_response>' -}}
|
| 77 |
+
{%- endmacro -%}
|
| 78 |
+
{%- macro render_tool_response(m) -%}
|
| 79 |
+
{%- if m.content is string -%}
|
| 80 |
+
{{- tool_response(m.content) -}}
|
| 81 |
+
{%- elif m.content and m.content is not mapping and m.content.0.type == "tool_reference" -%}
|
| 82 |
+
{{- tool_references_to_response(m.content) -}}
|
| 83 |
+
{%- elif is_list_of_outputs(m) -%}
|
| 84 |
+
{%- for tr in m.content -%}
|
| 85 |
+
{%- if tr.output is iterable and tr.output is not string and tr.output is not mapping and tr.output and tr.output.0.type == "tool_reference" -%}
|
| 86 |
+
{{- tool_references_to_response(tr.output) -}}
|
| 87 |
+
{%- else -%}
|
| 88 |
+
{{- tool_response(visible_text(tr.output)) -}}
|
| 89 |
+
{%- endif -%}
|
| 90 |
+
{%- endfor -%}
|
| 91 |
+
{%- else -%}
|
| 92 |
+
{{- tool_response(visible_text(m.content)) -}}
|
| 93 |
+
{%- endif -%}
|
| 94 |
+
{%- endmacro -%}
|
| 95 |
+
{%- macro id_of(obj) -%}
|
| 96 |
+
{%- if obj.tool_call_id -%}
|
| 97 |
+
{{- obj.tool_call_id -}}
|
| 98 |
+
{%- elif obj.id -%}
|
| 99 |
+
{{- obj.id -}}
|
| 100 |
+
{%- endif -%}
|
| 101 |
+
{%- endmacro -%}
|
| 102 |
+
{%- macro is_list_of_outputs(m) -%}
|
| 103 |
+
{%- if m.content and m.content.0.output is defined -%}1{%- endif -%}
|
| 104 |
+
{%- endmacro -%}
|
| 105 |
+
{%- macro has_dup_tool_result_id(lo, hi, target) -%}
|
| 106 |
+
{%- set ns_cnt = namespace(n=0) -%}
|
| 107 |
+
{%- for k in range(lo, hi + 1) -%}
|
| 108 |
+
{%- set m = messages[k] -%}
|
| 109 |
+
{%- if is_list_of_outputs(m) -%}
|
| 110 |
+
{%- for entry in m.content -%}
|
| 111 |
+
{%- if id_of(entry) == target -%}
|
| 112 |
+
{%- set ns_cnt.n = ns_cnt.n + 1 -%}
|
| 113 |
+
{%- endif -%}
|
| 114 |
+
{%- endfor -%}
|
| 115 |
+
{%- elif id_of(m) == target -%}
|
| 116 |
+
{%- set ns_cnt.n = ns_cnt.n + 1 -%}
|
| 117 |
+
{%- endif -%}
|
| 118 |
+
{%- if ns_cnt.n > 1 -%}{%- break -%}{%- endif -%}
|
| 119 |
+
{%- endfor -%}
|
| 120 |
+
{%- if ns_cnt.n > 1 -%}1{%- endif -%}
|
| 121 |
+
{%- endmacro -%}
|
| 122 |
+
{%- macro tc_id_exists(tcs, target) -%}
|
| 123 |
+
{%- set ns_f = namespace(found=false) -%}
|
| 124 |
+
{%- for tc in tcs -%}
|
| 125 |
+
{%- if id_of(tc) == target -%}
|
| 126 |
+
{%- set ns_f.found = true -%}
|
| 127 |
+
{%- break -%}
|
| 128 |
+
{%- endif -%}
|
| 129 |
+
{%- endfor -%}
|
| 130 |
+
{%- if ns_f.found -%}1{%- endif -%}
|
| 131 |
+
{%- endmacro -%}
|
| 132 |
+
{%- set ns = namespace(last_user_index=-1) -%}
|
| 133 |
+
{%- for m in messages %}
|
| 134 |
+
{%- if m.role == 'user' %}
|
| 135 |
+
{%- set ns.last_user_index = loop.index0 -%}
|
| 136 |
+
{%- endif %}
|
| 137 |
+
{%- endfor %}
|
| 138 |
+
{%- for m in messages -%}
|
| 139 |
+
{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}
|
| 140 |
+
{%- elif m.role == 'assistant' -%}
|
| 141 |
+
<|assistant|>
|
| 142 |
+
{%- set content = visible_text(m.content) %}
|
| 143 |
+
{%- if m.reasoning_content is string %}
|
| 144 |
+
{%- set reasoning_content = m.reasoning_content %}
|
| 145 |
+
{%- elif '</think>' in content %}
|
| 146 |
+
{%- set reasoning_content = content.split('</think>')[0].split('<think>')[-1] %}
|
| 147 |
+
{%- set content = content.split('</think>')[-1] %}
|
| 148 |
+
{%- endif %}
|
| 149 |
+
{%- if (not clear_thinking or loop.index0 > ns.last_user_index) and reasoning_content is defined -%}
|
| 150 |
+
{{ '<think>' + reasoning_content + '</think>'}}
|
| 151 |
+
{%- else -%}
|
| 152 |
+
{{ '<think></think>' }}
|
| 153 |
+
{%- endif -%}
|
| 154 |
+
{%- if content.strip() -%}
|
| 155 |
+
{{ content.strip() }}
|
| 156 |
+
{%- endif -%}
|
| 157 |
+
{% if m.tool_calls %}
|
| 158 |
+
{% for tc in m.tool_calls %}
|
| 159 |
+
{%- if tc.function %}
|
| 160 |
+
{%- set tc = tc.function %}
|
| 161 |
+
{%- endif %}
|
| 162 |
+
{{- '<tool_call>' ~ tc.name -}}
|
| 163 |
+
{% set _args = tc.arguments %}{% for k, v in _args.items() %}<arg_key>{{ k }}</arg_key><arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>{% endfor %}</tool_call>{% endfor %}
|
| 164 |
+
{% endif %}
|
| 165 |
+
{%- elif m.role == 'tool' -%}
|
| 166 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 167 |
+
{{- '<|observation|>' -}}
|
| 168 |
+
{%- set block_start = loop.index0 -%}
|
| 169 |
+
{%- set ns_blk = namespace(end=block_start) -%}
|
| 170 |
+
{%- for j in range(block_start, messages|length) -%}
|
| 171 |
+
{%- if messages[j].role == 'tool' -%}
|
| 172 |
+
{%- set ns_blk.end = j -%}
|
| 173 |
+
{%- else -%}
|
| 174 |
+
{%- break -%}
|
| 175 |
+
{%- endif -%}
|
| 176 |
+
{%- endfor -%}
|
| 177 |
+
{%- set ns_a = namespace(tool_calls=none) -%}
|
| 178 |
+
{%- if block_start > 0 and messages[block_start - 1].role == 'assistant' and messages[block_start - 1].tool_calls -%}
|
| 179 |
+
{%- set ns_a.tool_calls = messages[block_start - 1].tool_calls -%}
|
| 180 |
+
{%- endif -%}
|
| 181 |
+
{%- set ns_chk = namespace(can_sort=true) -%}
|
| 182 |
+
{%- if not ns_a.tool_calls -%}
|
| 183 |
+
{%- set ns_chk.can_sort = false -%}
|
| 184 |
+
{%- else -%}
|
| 185 |
+
{%- for k in range(block_start, ns_blk.end + 1) -%}
|
| 186 |
+
{%- if not ns_chk.can_sort -%}{%- break -%}{%- endif -%}
|
| 187 |
+
{%- set m = messages[k] -%}
|
| 188 |
+
{%- if is_list_of_outputs(m) -%}
|
| 189 |
+
{%- for entry in m.content -%}
|
| 190 |
+
{%- if not ns_chk.can_sort -%}{%- break -%}{%- endif -%}
|
| 191 |
+
{%- set eid = id_of(entry) -%}
|
| 192 |
+
{%- if not eid -%}
|
| 193 |
+
{%- set ns_chk.can_sort = false -%}
|
| 194 |
+
{%- elif has_dup_tool_result_id(block_start, ns_blk.end, eid) -%}
|
| 195 |
+
{%- set ns_chk.can_sort = false -%}
|
| 196 |
+
{%- elif not tc_id_exists(ns_a.tool_calls, eid) -%}
|
| 197 |
+
{%- set ns_chk.can_sort = false -%}
|
| 198 |
+
{%- endif -%}
|
| 199 |
+
{%- endfor -%}
|
| 200 |
+
{%- else -%}
|
| 201 |
+
{%- set tk_id = id_of(m) -%}
|
| 202 |
+
{%- if not tk_id -%}
|
| 203 |
+
{%- set ns_chk.can_sort = false -%}
|
| 204 |
+
{%- elif has_dup_tool_result_id(block_start, ns_blk.end, tk_id) -%}
|
| 205 |
+
{%- set ns_chk.can_sort = false -%}
|
| 206 |
+
{%- elif not tc_id_exists(ns_a.tool_calls, tk_id) -%}
|
| 207 |
+
{%- set ns_chk.can_sort = false -%}
|
| 208 |
+
{%- endif -%}
|
| 209 |
+
{%- endif -%}
|
| 210 |
+
{%- endfor -%}
|
| 211 |
+
{%- for i in range(ns_a.tool_calls | length) -%}
|
| 212 |
+
{%- if not ns_chk.can_sort -%}{%- break -%}{%- endif -%}
|
| 213 |
+
{%- set tc_id = id_of(ns_a.tool_calls[i]) -%}
|
| 214 |
+
{%- if not tc_id -%}
|
| 215 |
+
{%- set ns_chk.can_sort = false -%}
|
| 216 |
+
{%- endif -%}
|
| 217 |
+
{%- for j in range(i + 1, ns_a.tool_calls | length) -%}
|
| 218 |
+
{%- if id_of(ns_a.tool_calls[j]) == tc_id -%}
|
| 219 |
+
{%- set ns_chk.can_sort = false -%}
|
| 220 |
+
{%- break -%}
|
| 221 |
+
{%- endif -%}
|
| 222 |
+
{%- endfor -%}
|
| 223 |
+
{%- endfor -%}
|
| 224 |
+
{%- endif -%}
|
| 225 |
+
{%- if ns_chk.can_sort -%}
|
| 226 |
+
{%- for tc in ns_a.tool_calls -%}
|
| 227 |
+
{%- set tc_id = id_of(tc) -%}
|
| 228 |
+
{%- for k in range(block_start, ns_blk.end + 1) -%}
|
| 229 |
+
{%- set m = messages[k] -%}
|
| 230 |
+
{%- if is_list_of_outputs(m) -%}
|
| 231 |
+
{%- for entry in m.content -%}
|
| 232 |
+
{%- set eid = id_of(entry) -%}
|
| 233 |
+
{%- if eid == tc_id -%}
|
| 234 |
+
{%- if entry.output is iterable and entry.output is not string and entry.output is not mapping and entry.output and entry.output.0.type == "tool_reference" -%}
|
| 235 |
+
{{- tool_references_to_response(entry.output) -}}
|
| 236 |
+
{%- else -%}
|
| 237 |
+
{{- tool_response(visible_text(entry.output)) -}}
|
| 238 |
+
{%- endif -%}
|
| 239 |
+
{%- endif -%}
|
| 240 |
+
{%- endfor -%}
|
| 241 |
+
{%- else -%}
|
| 242 |
+
{%- set tk_id = id_of(m) -%}
|
| 243 |
+
{%- if tk_id == tc_id -%}
|
| 244 |
+
{{- render_tool_response(m) -}}
|
| 245 |
+
{%- endif -%}
|
| 246 |
+
{%- endif -%}
|
| 247 |
+
{%- endfor -%}
|
| 248 |
+
{%- endfor -%}
|
| 249 |
+
{%- else -%}
|
| 250 |
+
{%- for k in range(block_start, ns_blk.end + 1) -%}
|
| 251 |
+
{{- render_tool_response(messages[k]) -}}
|
| 252 |
+
{%- endfor -%}
|
| 253 |
+
{%- endif -%}
|
| 254 |
+
{% endif -%}
|
| 255 |
+
{%- elif m.role == 'system' -%}
|
| 256 |
+
<|system|>{{ visible_text(m.content) }}
|
| 257 |
+
{%- endif -%}
|
| 258 |
+
{%- endfor -%}
|
| 259 |
+
{%- if add_generation_prompt -%}
|
| 260 |
+
<|assistant|>{{- '<think>' -}}
|
| 261 |
+
{%- endif -%}
|
config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
154820,
|
| 5 |
+
154827,
|
| 6 |
+
154829
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 154820,
|
| 9 |
+
"temperature": 1.0,
|
| 10 |
+
"top_p": 0.95,
|
| 11 |
+
"transformers_version": "5.16.0"
|
| 12 |
+
}
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:568c770e4a083ab53c3d74deab348d541724f23ec9637d83513ecb8fa4a7ef73
|
| 3 |
+
size 23449767
|
processor_config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"do_rescale": true,
|
| 4 |
+
"patch_expand_factor": 1,
|
| 5 |
+
"merge_size": 2,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.48145466,
|
| 8 |
+
0.4578275,
|
| 9 |
+
0.40821073
|
| 10 |
+
],
|
| 11 |
+
"image_std": [
|
| 12 |
+
0.26862954,
|
| 13 |
+
0.26130258,
|
| 14 |
+
0.27577711
|
| 15 |
+
],
|
| 16 |
+
"temporal_patch_size": 2,
|
| 17 |
+
"patch_size": 14,
|
| 18 |
+
"min_image_tokens": 16,
|
| 19 |
+
"max_image_tokens": 8000,
|
| 20 |
+
"image_processor_type": "Glm5NextImageProcessor"
|
| 21 |
+
},
|
| 22 |
+
"video_processor": {
|
| 23 |
+
"do_rescale": true,
|
| 24 |
+
"video_processor_type": "Glm5NextVideoProcessor",
|
| 25 |
+
"patch_expand_factor": 1,
|
| 26 |
+
"merge_size": 2,
|
| 27 |
+
"image_mean": [
|
| 28 |
+
0.48145466,
|
| 29 |
+
0.4578275,
|
| 30 |
+
0.40821073
|
| 31 |
+
],
|
| 32 |
+
"image_std": [
|
| 33 |
+
0.26862954,
|
| 34 |
+
0.26130258,
|
| 35 |
+
0.27577711
|
| 36 |
+
],
|
| 37 |
+
"temporal_patch_size": 2,
|
| 38 |
+
"patch_size": 14,
|
| 39 |
+
"min_image_tokens": 16,
|
| 40 |
+
"max_image_tokens": 240000,
|
| 41 |
+
"fps": 2
|
| 42 |
+
},
|
| 43 |
+
"processor_class": "Glm5NextProcessor"
|
| 44 |
+
}
|
tensors/model-00001-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bee2ce859f246fa647a28a6b8086d2d77c3388e878e135ec851c3c15f1283be4
|
| 3 |
+
size 4997009796
|
tensors/model-00002-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58c17a9a8bb87bc108b2243d0b3554a0fd8e72a668f88bd4c050785a0716ada6
|
| 3 |
+
size 4997194608
|
tensors/model-00003-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5725f708d20f7089f589b020fa1f83f21d62e20c3c8ed5798aa2385c154b011d
|
| 3 |
+
size 4997082968
|
tensors/model-00004-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15d33f9a63251c4fd63d9c7f9a2477003f1fcbbd5aaab4fc9f47261bf63def12
|
| 3 |
+
size 4996991824
|
tensors/model-00005-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e7089fdbb56f76745f5ed1488d5610c181a77bab476b2c0cd18b83d52b650bf
|
| 3 |
+
size 4997092464
|
tensors/model-00006-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5cc20bd94516fadc06153d81466401420cfc345b6bc193c948ce7c4bf020cec1
|
| 3 |
+
size 4996967984
|
tensors/model-00007-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac91e97bc6aa6cf55342bd91cfa03d20d0a61af7b7dcfb7eee157a9e51309372
|
| 3 |
+
size 4997293804
|
tensors/model-00008-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3fec2e3f9d1fdac465afb28d77e17bbfa721362aacca61e445c4d3db7fd64c43
|
| 3 |
+
size 4996970628
|
tensors/model-00009-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c075d2b39a2ba0e05d826fa35744bc453fa2550a3c8c23437c3b65bbc0c61082
|
| 3 |
+
size 4997192808
|
tensors/model-00010-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e16cb82de5f953a6d88bf58de8f09037eada207faea50b0b4e5b97b4fe26e35
|
| 3 |
+
size 4996948996
|
tensors/model-00011-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79913b9d9bb3c587b1152ef030f3140d0f7c8b1a089265e775bc0e2740ce90a6
|
| 3 |
+
size 4997114488
|
tensors/model-00012-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:399a88dc53644448c5ec8e8492c145618d51db0e7179e53fa7a88051567bad56
|
| 3 |
+
size 4996944132
|
tensors/model-00013-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:557a3341555fc0e27ccd9446ea379358e5d74e97d7818bf8e9d2c10c832e4227
|
| 3 |
+
size 4997096672
|
tensors/model-00014-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37622fae7f9ee1aa538cdb0097ee13b971bf0e3ae620e81e1f4bcc86264d0a1c
|
| 3 |
+
size 4996943364
|
tensors/model-00015-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f92f51d1df09d050a3166fee939e66bc607dccbf3e00fdbba3eebfaa38239333
|
| 3 |
+
size 4997084344
|
tensors/model-00016-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87e978c2abbcb39ae95e73ff366efbda5456639a81e098cd47b510db8f764a75
|
| 3 |
+
size 4996913892
|
tensors/model-00017-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:096de82e005eb510096f72d3136dea6f80356728ac76ae808b69e2ca3c3f92a3
|
| 3 |
+
size 4997065516
|
tensors/model-00018-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3c7d5d8e6a0f471d03800cf88c4d375945a687564b6f1f8bff7e519c830d564
|
| 3 |
+
size 4996930276
|
tensors/model-00019-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff1cd2b20aff716f4314ed038ad0d356a3ccabb8c9eb983115a48859ce908ca1
|
| 3 |
+
size 4997073008
|
tensors/model-00020-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d123dfc1206a1f6b64cf6398db5adc0584d353994fba7d257d0a9b18479444d8
|
| 3 |
+
size 4996913640
|
tensors/model-00021-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d391245f4fb5cdfd8d858da934f3360b658824679008ae9b423f0deb6d7e5e7c
|
| 3 |
+
size 4997125272
|
tensors/model-00022-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33bff3f9215815fd8131e492e4079585f2fdbd6979573cba219d00062f7e4678
|
| 3 |
+
size 4996901328
|
tensors/model-00023-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75278b3533e644e6f203c5153fc668faaa6868d56a4581960e8115f7e818bedc
|
| 3 |
+
size 4997355200
|
tensors/model-00024-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef6141efe7c20d241d43cf8821620901a43e5ef2f76b16846a2faf686af1299b
|
| 3 |
+
size 4996951360
|
tensors/model-00025-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f862d809c19c1e2e9cdda27d47d39006ea87a067dd64b34b6d1e25cd58a062e
|
| 3 |
+
size 4997232564
|
tensors/model-00026-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c3ced571603a8d2027cb705bb49167628a798ef0dca2e6c2934fda4e20a95e9
|
| 3 |
+
size 4996892836
|
tensors/model-00027-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc059e4eae08dd20ba5f54e6becc399520e1428f4aa82a4c0866be5a769beabf
|
| 3 |
+
size 4997073756
|
tensors/model-00028-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd5b23d3e9826239409bea852550cf0cffeba70257a29fdea53fc47c76ae3912
|
| 3 |
+
size 4996930664
|
tensors/model-00029-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c5d80cdba170ba39e63d0efa6052fcc03cf27918f59082a8440ba48d3040dbb
|
| 3 |
+
size 4997188988
|
tensors/model-00030-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58156d30c3e67ca46d6d7549d0f979e32b2ae2d3cde3e799d9403f9de0c11031
|
| 3 |
+
size 4996967996
|
tensors/model-00031-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dc61b00fc16329751c58802b44d0cbfabce3c17a61a3630ca0f4123552df711
|
| 3 |
+
size 4997170828
|
tensors/model-00032-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4707ae80ba0b010891545e7eced8d0bec288ce7cf221b65cf9f5f141647d5c61
|
| 3 |
+
size 4996950972
|
tensors/model-00033-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:856b635e1b073b5049b7700abd279690ba4dc624cf6822d4cc419a47f9fca1bd
|
| 3 |
+
size 4988337164
|
tensors/model-00034-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55d6b957a6fac947df848a844a520fe9305317ec8dae2ae4fa75c1601cd6ac73
|
| 3 |
+
size 4999372640
|
tensors/model-00035-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bbe43857d935891edc909248f10e3ce5eec43d50ea11d0a90425452b3975bd41
|
| 3 |
+
size 5003932528
|
tensors/model-00036-of-00036.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52caa105d4f466c774dbded16324a00c87cdb1e28782fc7dbb73cc9c10895770
|
| 3 |
+
size 2809743712
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d
|
| 3 |
+
size 20217442
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": false,
|
| 4 |
+
"do_lower_case": false,
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"extra_special_tokens": [
|
| 7 |
+
"<|endoftext|>",
|
| 8 |
+
"[MASK]",
|
| 9 |
+
"[gMASK]",
|
| 10 |
+
"[sMASK]",
|
| 11 |
+
"<sop>",
|
| 12 |
+
"<eop>",
|
| 13 |
+
"<|system|>",
|
| 14 |
+
"<|user|>",
|
| 15 |
+
"<|assistant|>",
|
| 16 |
+
"<|observation|>",
|
| 17 |
+
"<|begin_of_image|>",
|
| 18 |
+
"<|end_of_image|>",
|
| 19 |
+
"<|begin_of_video|>",
|
| 20 |
+
"<|end_of_video|>",
|
| 21 |
+
"<|begin_of_audio|>",
|
| 22 |
+
"<|end_of_audio|>",
|
| 23 |
+
"<|begin_of_transcription|>",
|
| 24 |
+
"<|end_of_transcription|>"
|
| 25 |
+
],
|
| 26 |
+
"is_local": true,
|
| 27 |
+
"model_max_length": 1048576,
|
| 28 |
+
"model_specific_special_tokens": {},
|
| 29 |
+
"pad_token": "<|endoftext|>",
|
| 30 |
+
"padding_side": "left",
|
| 31 |
+
"remove_space": false,
|
| 32 |
+
"tokenizer_class": "TokenizersBackend"
|
| 33 |
+
}
|