NemoTLS commited on
Commit
2f765fa
·
verified ·
1 Parent(s): 5408adb

Upload Hy3-preview-oQ3.5 via oMLX

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
+ model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlx
3
+ tags:
4
+ - mlx
5
+ - oq
6
+ - quantized
7
+ ---
8
+
9
+ # Hy3-preview-oQ3.5
10
+
11
+ This model was quantized using [oQ](https://github.com/jundot/omlx) (oMLX v0.3.6) mixed-precision quantization.
12
+
13
+ ## Quantization details
14
+
15
+ - **Model type**: hy_v3
16
+ - **Bits**: 3
17
+ - **Group size**: 64
18
+ - **Format**: MLX safetensors
chat_template.jinja ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#- ----------‑‑‑ special token variables ‑‑‑---------- -#}
2
+ {%- set bos_token = '<|hy_begin▁of▁sentence|>' %}
3
+ {%- set pad_token = '<|hy_▁pad▁|>' %}
4
+ {%- set user_token = '<|hy_User|>' %}
5
+ {%- set assistant_token = '<|hy_Assistant|>' %}
6
+ {%- set eos_token = '<|hy_eos|>' %}
7
+ {%- set think_begin_token = '<think>' %}
8
+ {%- set think_end_token = '</think>' %}
9
+ {%- set toolcalls_begin_token = '<tool_calls>' %}
10
+ {%- set toolcalls_end_token = '</tool_calls>' %}
11
+ {%- set toolcall_begin_token = '<tool_call>' %}
12
+ {%- set toolcall_end_token = '</tool_call>' %}
13
+ {%- set toolsep_token = '<tool_sep>' %}
14
+ {%- set argkey_begin_token = '<arg_key>' %}
15
+ {%- set argkey_end_token = '</arg_key>' %}
16
+ {%- set argvalue_begin_token = '<arg_value>' %}
17
+ {%- set argvalue_end_token = '</arg_value>' %}
18
+ {%- set toolresponses_begin_token = '<tool_responses>' %}
19
+ {%- set toolresponses_end_token = '</tool_responses>' %}
20
+ {%- set toolresponse_begin_token = '<tool_response>' %}
21
+ {%- set toolresponse_end_token = '</tool_response>' %}
22
+ {%- set reasoning_mode_token = '<|reasoning_mode|>' %}
23
+ {#- ----------‑‑‑ hyperparameters variables ‑‑‑---------- -#}
24
+ {%- if not add_generation_prompt is defined %}
25
+ {%- set add_generation_prompt = false %}
26
+ {%- endif %}
27
+ {%- if not interleaved_thinking is defined %}
28
+ {%- set interleaved_thinking = false %}
29
+ {%- endif %}
30
+ {%- if not tools %}
31
+ {%- set interleaved_thinking = false %}
32
+ {%- endif %}
33
+ {%- if not is_training is defined %}
34
+ {%- set is_training = false %}
35
+ {%- endif %}
36
+ {%- if not reasoning_effort is defined or reasoning_effort not in ['high', 'low', 'no_think'] %}
37
+ {%- set reasoning_effort = 'no_think' %}
38
+ {%- endif %}
39
+
40
+ {%- macro visible_text(content) -%}
41
+ {%- if content is string -%}
42
+ {{- content }}
43
+ {%- elif content is iterable and content is not mapping -%}
44
+ {%- for item in content -%}
45
+ {%- if item is mapping and item.type == 'text' -%}
46
+ {{- item.text }}
47
+ {%- elif item is string -%}
48
+ {{- item }}
49
+ {%- endif -%}
50
+ {%- endfor -%}
51
+ {%- elif content is none -%}
52
+ {{- '' }}
53
+ {%- else -%}
54
+ {{- content }}
55
+ {%- endif -%}
56
+ {%- endmacro -%}
57
+
58
+ {%- set ns = namespace(last_user_index=-1) %}
59
+ {%- set sp_ns = namespace(system_prompt='', is_first_sp=true) %}
60
+ {%- for message in messages %}
61
+ {%- if message['role'] == 'system' %}
62
+ {%- set sp_ns.system_prompt = sp_ns.system_prompt + visible_text(message['content']) %}
63
+ {%- endif %}
64
+ {%- if message['role'] == 'user' %}
65
+ {%- set ns.last_user_index = loop.index0 %}
66
+ {%- endif %}
67
+ {%- endfor %}
68
+ {%- if reasoning_effort is defined and reasoning_effort is string and reasoning_effort != '' and not tools %}
69
+ {%- set sp_ns.system_prompt = sp_ns.system_prompt + reasoning_mode_token + 'reasoning_effort:' + reasoning_effort %}
70
+ {%- endif %}
71
+ {{- bos_token }}
72
+ {{- sp_ns.system_prompt }}
73
+ {%- if tools %}
74
+ {%- if sp_ns.system_prompt != '' %}
75
+ {{- '\n\n# Tools\n\nYou may call one or more functions to assist with the user query.' }}
76
+ {%- else %}
77
+ {{- '# Tools\n\nYou may call one or more functions to assist with the user query.' }}
78
+ {%- endif %}
79
+ {{- '\n\nYou are provided with function signatures within <tools></tools> XML tags:' }}
80
+ {{- '\n<tools>\n' }}
81
+ {%- for tool in tools %}
82
+ {%- if loop.index0 > 0 %}
83
+ {{- '\n' }}
84
+ {%- endif %}
85
+ {{- tool | tojson }}
86
+ {%- endfor %}
87
+ {{- '\n</tools>\n\n' }}
88
+ {{- 'For function call returns, you should first print ' + toolcalls_begin_token + '\n' }}
89
+ {{- 'For each function call, you should return object like:\n' }}
90
+ {{- toolcall_begin_token + '{function-name}' + toolsep_token + '\n' }}
91
+ {{- argkey_begin_token + '{arg-key-1}' + argkey_end_token + '\n' }}
92
+ {{- argvalue_begin_token + '{arg-value-1}' + argvalue_end_token + '\n' }}
93
+ {{- argkey_begin_token + '{arg-key-2}' + argkey_end_token + '\n' }}
94
+ {{- argvalue_begin_token + '{arg-value-2}' + argvalue_end_token + '\n' }}
95
+ {{- '...\n' }}
96
+ {{- toolcall_end_token + '\n' }}
97
+ {%- if reasoning_effort is defined and reasoning_effort is string and reasoning_effort != '' %}
98
+ {{- 'At the end of function call returns, you should print ' + toolcalls_end_token + reasoning_mode_token + 'reasoning_effort:' + reasoning_effort }}
99
+ {%- else %}
100
+ {{- 'At the end of function call returns, you should print ' + toolcalls_end_token }}
101
+ {%- endif %}
102
+ {%- endif %}
103
+
104
+ {%- set prev_ns = namespace(is_tool=false, is_tool_first=true) %}
105
+ {%- set last_ns = namespace(last_is_assistant=false) %}
106
+ {%- for message in messages %}
107
+ {%- if message['role'] == 'user' %}
108
+ {%- if prev_ns.is_tool %}
109
+ {{- toolresponses_end_token }}
110
+ {%- endif %}
111
+ {{- user_token + visible_text(message['content']) }}
112
+ {%- set prev_ns.is_tool = false %}
113
+ {%- endif %}
114
+ {%- if message['role'] == 'assistant' %}
115
+ {%- if 'reasoning_content' in message and message['reasoning_content'] is string %}
116
+ {%- set rc = message['reasoning_content'] %}
117
+ {%- elif 'reasoning' in message and message['reasoning'] is string %}
118
+ {%- set rc = message['reasoning'] %}
119
+ {%- else %}
120
+ {%- set rc = none %}
121
+ {%- endif %}
122
+ {%- if is_training %}
123
+ {%- if rc is not none %}
124
+ {%- set content = think_begin_token + rc + think_end_token + visible_text(message['content']) %}
125
+ {%- else %}
126
+ {%- set content = think_begin_token + think_end_token + visible_text(message['content']) %}
127
+ {%- endif %}
128
+ {%- else %}
129
+ {%- if interleaved_thinking %}
130
+ {%- if loop.index0 > ns.last_user_index and rc is not none %}
131
+ {%- set content = think_begin_token + rc + think_end_token + visible_text(message['content']) %}
132
+ {%- else %}
133
+ {%- set content = think_begin_token + think_end_token + visible_text(message['content']) %}
134
+ {%- endif %}
135
+ {%- else %}
136
+ {%- set content = think_begin_token + think_end_token + visible_text(message['content']) %}
137
+ {%- endif %}
138
+ {%- endif %}
139
+ {%- if prev_ns.is_tool %}
140
+ {{- toolresponses_end_token }}
141
+ {%- endif %}
142
+ {{- assistant_token }}
143
+ {%- if message['tool_calls'] is defined and message['tool_calls'] %}
144
+ {%- set prev_ns.is_tool_first = true %}
145
+ {{- content }}
146
+ {{- toolcalls_begin_token + '\n' }}
147
+ {%- for tool in message['tool_calls'] %}
148
+ {%- set arguments = tool['function']['arguments'] %}
149
+ {{- toolcall_begin_token + tool['function']['name'] + toolsep_token + '\n' }}
150
+ {%- for key, value in arguments.items() %}
151
+ {{- argkey_begin_token + key + argkey_end_token + '\n' }}
152
+ {%- if value is not string %}
153
+ {%- set value = value | tojson(ensure_ascii=False) %}
154
+ {%- endif %}
155
+ {{- argvalue_begin_token + value + argvalue_end_token + '\n' }}
156
+ {%- endfor %}
157
+ {{- toolcall_end_token + '\n' }}
158
+ {%- endfor %}
159
+ {{- toolcalls_end_token + eos_token }}
160
+ {%- else %}
161
+ {%- if not loop.last or is_training %}
162
+ {{- content + eos_token }}
163
+ {%- else %}
164
+ {{- content }}
165
+ {%- endif %}
166
+ {%- endif %}
167
+ {%- set prev_ns.is_tool = false %}
168
+ {%- endif %}
169
+ {%- if message['role'] == 'tool' %}
170
+ {%- set prev_ns.is_tool = true %}
171
+ {%- if prev_ns.is_tool_first %}
172
+ {{- toolresponses_begin_token + '\n' }}
173
+ {%- set prev_ns.is_tool_first = false %}
174
+ {%- endif %}
175
+ {{- toolresponse_begin_token + '\n' + visible_text(message['content']) + '\n' + toolresponse_end_token + '\n' }}
176
+ {%- endif %}
177
+ {%- if loop.last and message['role'] == 'assistant' %}
178
+ {%- set last_ns.last_is_assistant = true %}
179
+ {%- endif %}
180
+
181
+ {%- endfor %}
182
+ {%- if prev_ns.is_tool %}
183
+ {{- toolresponses_end_token }}
184
+ {%- endif %}
185
+ {%- if add_generation_prompt %}
186
+ {%- if not last_ns.last_is_assistant %}
187
+ {%- if reasoning_effort is defined and reasoning_effort in ['low', 'high'] %}
188
+ {{- assistant_token + think_begin_token }}
189
+ {%- elif reasoning_effort is defined and reasoning_effort == 'no_think' %}
190
+ {{- assistant_token + think_begin_token + think_end_token }}
191
+ {%- else %}
192
+ {{- assistant_token }}
193
+ {%- endif %}
194
+ {%- endif %}
195
+ {%- endif %}
config.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 120000,
3
+ "do_sample": true,
4
+ "eos_token_id": 120025,
5
+ "pad_token_id": 120002,
6
+ "temperature": 0.9,
7
+ "top_k": -1,
8
+ "top_p": 1,
9
+ "transformers_version": "5.6.0"
10
+ }
model-00001-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:448736cb61e740b95e6671fc76ea2c3654b7b459caf39fe1a19278cd9413db1b
3
+ size 5001139777
model-00002-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4dc1dcbf5837ff4ac89e3ecd3cbb0c9a91f622c2cc3041e83acf418fbef4b785
3
+ size 5001143225
model-00003-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe5e060f2816e613d308be176044e45f87cd0be8add8820370b752971c78957f
3
+ size 5003895969
model-00004-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:facc9f9c709febcfbc87e54f1f425344f4ad1d1c74626202f9912f89ed07f598
3
+ size 5001665991
model-00005-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92150583991d81f9673af61659b1f8f307e6f3ec08d5ba8298d72d46ff53d06b
3
+ size 5001127158
model-00006-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9623c2bc7c9293e68a3f263b5e0dac8b3a802d4f0eef13ca172e5510aac9a9c
3
+ size 5001538192
model-00007-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aba37fbdf51673bc865b598fac83ea5d1c78f4d6dc3fea20c55fa3db3a2d9265
3
+ size 5003104937
model-00008-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a503e8be724432708d926e84e58e18c92d226e3cfe9795737ff60117a536d6fb
3
+ size 5003061574
model-00009-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cd6c8f18a3946580cd0657f9efc16e78108f458c73520c714d85e276a309b99
3
+ size 5000745976
model-00010-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:579b29ab40b78bbf04a41b7107344e36e075e7e207f26d5c04c4bb4f3f875e5a
3
+ size 5000746101
model-00011-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b09f283518d688fe5ad26fcacc259159a6ce308f549a85449011f69dea01c0e
3
+ size 5002266908
model-00012-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1f84ec08cfff8bc4ce6699473c6b356e74c9495084696561e0fb41af42796bc
3
+ size 5003107244
model-00013-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b29925b190fb5f54df8152ba7c87fa216b528607f5f2d23689761e659f63fa8
3
+ size 5003107947
model-00014-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e47608c93a1e7367fdafce132dc5fe404ac279bba1b6de96a537bf4f64625c9d
3
+ size 5000747345
model-00015-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae41bbad4a083be11c7906565c62c0027b73a56d5da0401ce4e1c83325395214
3
+ size 5002658868
model-00016-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa3e795c12f97f56f34ad1c863f1a20f13201bdd0b465efd1bbb90ac13f5313b
3
+ size 5002716449
model-00017-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bf16ca742f4ee621df7dd98704f02aa914de3c535eb93eb2a42812bd5810afc
3
+ size 5001141857
model-00018-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c853ba911956107c8737c54635df25c5027925d8bd666dc9949a3012bfefb10c
3
+ size 5002359763
model-00019-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:beb969e6bdeea2f80ec44adcee55b434cf9e739277aa2c436106f9590468dd1c
3
+ size 5001927412
model-00020-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d003c319e9ff5b875be502426ea6d6d0aee2a21097b9af8d74fce31c74839c4
3
+ size 5001141555
model-00021-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86e2194c27b8e1f9996525c094e2d65566a4ab37ecb78260d52eea6dc57d2e46
3
+ size 5003894408
model-00022-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c349c34299fb4ba8a2a549b6d85371983d2e442c481e13fa92302ca6008981c3
3
+ size 5001051199
model-00023-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ad624d353b2d7e8909f040779f5c87f2bb544e46ab537088bee0cf36f06bbc9
3
+ size 5002712354
model-00024-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b19ee48ac7a4be2db49d9a9d9dc8993dfe814127a9c45f60cc0685d59eeeff3e
3
+ size 5001928842
model-00025-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c270809aa71797113c5bf41241d1f9c4074bacc47e624ce0cc3a9f7410ebd45c
3
+ size 5001927344
model-00026-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba82d3c34925a4c48f2680d52b79254d2304c354aeb9ebe2ab2cf2718c46736b
3
+ size 5002390549
model-00027-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:696eea6da4d40cbcc66a981295823017bdc8085d367258fed32397b98d04e081
3
+ size 5001145169
model-00028-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1edb1d408feebf1002a173980803d0db5abb517ab034d3385f5d18ebaad38891
3
+ size 5003108888
model-00029-of-00029.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d1895cc6556607ef5da7b9404e524de6fffef9e3e1d0810b824a90680256dad
3
+ size 4805478649
model.safetensors.index.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8777641492ffb05bec93ce31872daab792f286963b234f09f1a7716b8a3e28dd
3
+ size 12718315
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff