mavis-ai commited on
Commit
1c34992
·
verified ·
1 Parent(s): d68af5f

Upload Gemma4 26B MoE QAT Q4 MLX model

Browse files
.DS_Store ADDED
Binary file (6.15 kB). View file
 
.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
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlx
3
+ license: apache-2.0
4
+ license_link: https://ai.google.dev/gemma/docs/gemma_4_license
5
+ pipeline_tag: image-text-to-text
6
+ base_model: google/gemma-4-26B-A4B-it-qat-q4_0-gguf
7
+ tags:
8
+ - mlx
9
+ - gemma4
10
+ - qat
11
+ - q4
12
+ - moe
13
+ - apple-silicon
14
+ ---
15
+
16
+ # mavis-ai/Gemma4-26B-MoE-QATQ4
17
+
18
+ This repository provides an MLX-ready **QAT Q4** build of Google's Gemma 4 26B A4B instruction-tuned Mixture-of-Experts model for local inference on Apple Silicon Macs.
19
+
20
+ Unlike a plain post-training 4-bit quantized checkpoint, this model is based on Google's **Quantization-Aware Training (QAT)** Q4 release. The goal is not only to reduce the storage and memory footprint, but also to preserve the model's practical judgment, instruction-following behavior, and reasoning stability under low-bit inference.
21
+
22
+ **💡 Notice for Everyone**
23
+ While this repository is hosted primarily as a dedicated engine source for our application ecosystem (**R.E.V.I.S.**), **you are completely free to download and use this model normally** for your own local MLX projects or workflows.
24
+
25
+ For more details on the official source model, please refer to Google's Gemma 4 model pages:
26
+
27
+ - [google/gemma-4-26B-A4B-it](https://huggingface.co/google/gemma-4-26B-A4B-it)
28
+ - [google/gemma-4-26B-A4B-it-qat-q4_0-gguf](https://huggingface.co/google/gemma-4-26B-A4B-it-qat-q4_0-gguf)
29
+
30
+ ## Why QAT Q4?
31
+
32
+ R.E.V.I.S. is designed around local, evidence-grounded AI workflows where the model does not need to memorize everything. Instead, the model should be strong at judging, reading, filtering, structuring, and reasoning over the local context it is given.
33
+
34
+ QAT Q4 is especially interesting for this direction because it aims to keep more of the model's behavior intact after quantization, compared with ordinary post-training quantization. In practical local workflows, this can matter for tasks such as:
35
+
36
+ - judging whether a passage is real body text or navigation / advertisement noise
37
+ - checking whether a Markdown extraction is complete enough for RAG
38
+ - preserving instruction-following behavior in low-bit inference
39
+ - restructuring long documents into useful sections
40
+ - acting as a second-opinion evaluator for local agents
41
+
42
+ ## 🚀 Optimized for R.E.V.I.S. (Local Cognitive OS)
43
+
44
+ We prepared and tested this QAT Q4 model to serve as a local reasoning and judgment engine for **R.E.V.I.S.**
45
+
46
+ **R.E.V.I.S.** is a 100% local Cognitive OS for Multi-Agentic AI. It transforms your Mac devices into a distributed Agentic Swarm via zero-config Wi-Fi clustering, allowing you to run heavy AI workloads—like recursive web research, dynamic RAG generation, and multi-step logic—without killing single-machine performance.
47
+
48
+ If you are interested in pushing the limits of local AI and open-weight models like this one, check out our project!
49
+
50
+ - **🌐 Official Website:** [https://mavis-ai.co.jp/revis/](https://mavis-ai.co.jp/revis/)
51
+ - **▶️ Watch the 13-min Raw Demo (Multi-node Dynamic RAG):** [https://x.gd/LxaBF](https://x.gd/LxaBF)
52
+ - **🐦 Follow our updates on X:** [@mavis_ai_jp](https://x.com/mavis_ai_jp)
53
+
54
+ ## Usage
55
+
56
+ Install or update the MLX runtime you use for Gemma 4 / multimodal models:
57
+
58
+ ```bash
59
+ pip install -U mlx mlx-lm mlx-vlm huggingface_hub hf_xet
60
+ ```
61
+
62
+ Download the model:
63
+
64
+ ```bash
65
+ hf download mavis-ai/Gemma4-26B-MoE-QATQ4 \
66
+ --local-dir ~/Models/mlx/Gemma4-26B-MoE-QATQ4
67
+ ```
68
+
69
+ Run a quick text generation test:
70
+
71
+ ```bash
72
+ python -m mlx_vlm.generate \
73
+ --model ~/Models/mlx/Gemma4-26B-MoE-QATQ4 \
74
+ --max-tokens 256 \
75
+ --temperature 0.0 \
76
+ --prompt "日本語で短く自己紹介してください。"
77
+ ```
78
+
79
+ ## Notes
80
+
81
+ Gemma 4 26B A4B is a Mixture-of-Experts model. Although only a subset of parameters is active per token, the full model still needs to be stored and loaded. On Apple Silicon, practical speed and context length depend heavily on unified memory size, MLX / mlx-vlm versions, prompt length, KV cache usage, and generation settings.
82
+
83
+ For day-to-day local RAG, a smaller Gemma 4 E2B / E4B QAT model may be faster. This 26B MoE QAT Q4 build is best suited for heavier judgment tasks, long-document inspection, extraction-quality review, and second-opinion reasoning.
84
+
85
+ ## License
86
+
87
+ This model is a derivative of Google's Gemma 4 26B A4B instruction-tuned QAT Q4 release, which is distributed by Google under the **Apache License 2.0**.
88
+
89
+ This derivative is likewise distributed under the Apache License 2.0. A copy of the license is included in the `LICENSE` file in this repository, and can also be found at <https://www.apache.org/licenses/LICENSE-2.0>.
90
+
91
+ **Modification notice:** This repository adapts the official Gemma 4 26B A4B instruction-tuned QAT Q4 model for MLX-based local inference. No additional fine-tuning or architectural changes were applied by MAVIS.
chat_template.jinja ADDED
@@ -0,0 +1,354 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- macro format_parameters(properties, required, filter_keys=false) -%}
2
+ {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
3
+ {%- set ns = namespace(found_first=false) -%}
4
+ {%- for key, value in properties | dictsort -%}
5
+ {%- set add_comma = false -%}
6
+ {%- if not filter_keys or key not in standard_keys -%}
7
+ {%- if ns.found_first %},{% endif -%}
8
+ {%- set ns.found_first = true -%}
9
+ {{ key }}:{
10
+ {%- if value['description'] -%}
11
+ description:<|"|>{{ value['description'] }}<|"|>
12
+ {%- set add_comma = true -%}
13
+ {%- endif -%}
14
+ {%- if value['type'] | upper == 'STRING' -%}
15
+ {%- if value['enum'] -%}
16
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
17
+ enum:{{ format_argument(value['enum']) }}
18
+ {%- endif -%}
19
+ {%- elif value['type'] | upper == 'ARRAY' -%}
20
+ {%- if value['items'] is mapping and value['items'] -%}
21
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
22
+ items:{
23
+ {%- set ns_items = namespace(found_first=false) -%}
24
+ {%- for item_key, item_value in value['items'] | dictsort -%}
25
+ {%- if item_value is not none -%}
26
+ {%- if ns_items.found_first %},{% endif -%}
27
+ {%- set ns_items.found_first = true -%}
28
+ {%- if item_key == 'properties' -%}
29
+ properties:{
30
+ {%- if item_value is mapping -%}
31
+ {{- format_parameters(item_value, value['items']['required'] | default([])) -}}
32
+ {%- endif -%}
33
+ }
34
+ {%- elif item_key == 'required' -%}
35
+ required:[
36
+ {%- for req_item in item_value -%}
37
+ <|"|>{{- req_item -}}<|"|>
38
+ {%- if not loop.last %},{% endif -%}
39
+ {%- endfor -%}
40
+ ]
41
+ {%- elif item_key == 'type' -%}
42
+ {%- if item_value is string -%}
43
+ type:{{ format_argument(item_value | upper) }}
44
+ {%- else -%}
45
+ type:{{ format_argument(item_value | map('upper') | list) }}
46
+ {%- endif -%}
47
+ {%- else -%}
48
+ {{ item_key }}:{{ format_argument(item_value) }}
49
+ {%- endif -%}
50
+ {%- endif -%}
51
+ {%- endfor -%}
52
+ }
53
+ {%- endif -%}
54
+ {%- endif -%}
55
+ {%- if value['nullable'] %}
56
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
57
+ nullable:true
58
+ {%- endif -%}
59
+ {%- if value['type'] | upper == 'OBJECT' -%}
60
+ {%- if value['properties'] is defined and value['properties'] is mapping -%}
61
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
62
+ properties:{
63
+ {{- format_parameters(value['properties'], value['required'] | default([])) -}}
64
+ }
65
+ {%- elif value is mapping -%}
66
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
67
+ properties:{
68
+ {{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
69
+ }
70
+ {%- endif -%}
71
+ {%- if value['required'] -%}
72
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
73
+ required:[
74
+ {%- for item in value['required'] | default([]) -%}
75
+ <|"|>{{- item -}}<|"|>
76
+ {%- if not loop.last %},{% endif -%}
77
+ {%- endfor -%}
78
+ ]
79
+ {%- endif -%}
80
+ {%- endif -%}
81
+ {%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
82
+ type:<|"|>{{ value['type'] | upper }}<|"|>}
83
+ {%- endif -%}
84
+ {%- endfor -%}
85
+ {%- endmacro -%}
86
+ {%- macro format_function_declaration(tool_data) -%}
87
+ declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
88
+ {%- set params = tool_data['function']['parameters'] -%}
89
+ {%- if params -%}
90
+ ,parameters:{
91
+ {%- if params['properties'] -%}
92
+ properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
93
+ {%- endif -%}
94
+ {%- if params['required'] -%}
95
+ required:[
96
+ {%- for item in params['required'] -%}
97
+ <|"|>{{- item -}}<|"|>
98
+ {{- ',' if not loop.last -}}
99
+ {%- endfor -%}
100
+ ],
101
+ {%- endif -%}
102
+ {%- if params['type'] -%}
103
+ type:<|"|>{{- params['type'] | upper -}}<|"|>}
104
+ {%- endif -%}
105
+ {%- endif -%}
106
+ {%- if 'response' in tool_data['function'] -%}
107
+ {%- set response_declaration = tool_data['function']['response'] -%}
108
+ ,response:{
109
+ {%- if response_declaration['description'] -%}
110
+ description:<|"|>{{- response_declaration['description'] -}}<|"|>,
111
+ {%- endif -%}
112
+ {%- if response_declaration['type'] | upper == 'OBJECT' -%}
113
+ type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
114
+ {%- endif -%}
115
+ {%- endif -%}
116
+ }
117
+ {%- endmacro -%}
118
+ {%- macro format_argument(argument, escape_keys=True) -%}
119
+ {%- if argument is string -%}
120
+ {{- '<|"|>' + argument + '<|"|>' -}}
121
+ {%- elif argument is boolean -%}
122
+ {{- 'true' if argument else 'false' -}}
123
+ {%- elif argument is mapping -%}
124
+ {{- '{' -}}
125
+ {%- set ns = namespace(found_first=false) -%}
126
+ {%- for key, value in argument | dictsort -%}
127
+ {%- if ns.found_first %},{% endif -%}
128
+ {%- set ns.found_first = true -%}
129
+ {%- if escape_keys -%}
130
+ {{- '<|"|>' + key + '<|"|>' -}}
131
+ {%- else -%}
132
+ {{- key -}}
133
+ {%- endif -%}
134
+ :{{- format_argument(value, escape_keys=escape_keys) -}}
135
+ {%- endfor -%}
136
+ {{- '}' -}}
137
+ {%- elif argument is sequence -%}
138
+ {{- '[' -}}
139
+ {%- for item in argument -%}
140
+ {{- format_argument(item, escape_keys=escape_keys) -}}
141
+ {%- if not loop.last %},{% endif -%}
142
+ {%- endfor -%}
143
+ {{- ']' -}}
144
+ {%- else -%}
145
+ {{- argument -}}
146
+ {%- endif -%}
147
+ {%- endmacro -%}
148
+ {%- macro strip_thinking(text) -%}
149
+ {%- set ns = namespace(result='') -%}
150
+ {%- for part in text.split('<channel|>') -%}
151
+ {%- if '<|channel>' in part -%}
152
+ {%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
153
+ {%- else -%}
154
+ {%- set ns.result = ns.result + part -%}
155
+ {%- endif -%}
156
+ {%- endfor -%}
157
+ {{- ns.result | trim -}}
158
+ {%- endmacro -%}
159
+
160
+ {%- macro format_tool_response_block(tool_name, response) -%}
161
+ {{- '<|tool_response>' -}}
162
+ {%- if response is mapping -%}
163
+ {{- 'response:' + tool_name + '{' -}}
164
+ {%- for key, value in response | dictsort -%}
165
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
166
+ {%- if not loop.last %},{% endif -%}
167
+ {%- endfor -%}
168
+ {{- '}' -}}
169
+ {%- else -%}
170
+ {{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
171
+ {%- endif -%}
172
+ {{- '<tool_response|>' -}}
173
+ {%- endmacro -%}
174
+
175
+ {%- set ns = namespace(prev_message_type=None) -%}
176
+ {%- set loop_messages = messages -%}
177
+ {{- bos_token -}}
178
+ {#- Handle System/Tool Definitions Block -#}
179
+ {%- if (enable_thinking is defined and enable_thinking) or tools or messages[0]['role'] in ['system', 'developer'] -%}
180
+ {{- '<|turn>system\n' -}}
181
+ {#- Inject Thinking token at the very top of the FIRST system turn -#}
182
+ {%- if enable_thinking is defined and enable_thinking -%}
183
+ {{- '<|think|>\n' -}}
184
+ {%- set ns.prev_message_type = 'think' -%}
185
+ {%- endif -%}
186
+ {%- if messages[0]['role'] in ['system', 'developer'] -%}
187
+ {%- if messages[0]['content'] is string -%}
188
+ {{- messages[0]['content'] | trim -}}
189
+ {%- elif messages[0]['content'] is sequence -%}
190
+ {%- for item in messages[0]['content'] -%}
191
+ {{- item['text'] | trim + ' '-}}
192
+ {%- endfor -%}
193
+ {%- endif -%}
194
+ {%- set loop_messages = messages[1:] -%}
195
+ {%- endif -%}
196
+ {%- if tools -%}
197
+ {%- for tool in tools %}
198
+ {{- '<|tool>' -}}
199
+ {{- format_function_declaration(tool) | trim -}}
200
+ {{- '<tool|>' -}}
201
+ {%- endfor %}
202
+ {%- set ns.prev_message_type = 'tool' -%}
203
+ {%- endif -%}
204
+ {{- '<turn|>\n' -}}
205
+ {%- endif %}
206
+
207
+ {#- Pre-scan: find last user message index for reasoning guard -#}
208
+ {%- set ns_turn = namespace(last_user_idx=-1) -%}
209
+ {%- for i in range(loop_messages | length) -%}
210
+ {%- if loop_messages[i]['role'] == 'user' -%}
211
+ {%- set ns_turn.last_user_idx = i -%}
212
+ {%- endif -%}
213
+ {%- endfor -%}
214
+
215
+ {#- Loop through messages -#}
216
+ {%- for message in loop_messages -%}
217
+ {%- if message['role'] != 'tool' -%}
218
+ {%- set ns.prev_message_type = None -%}
219
+ {%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
220
+ {#- Detect continuation: suppress duplicate <|turn>model when previous non-tool message was also assistant -#}
221
+ {%- set prev_nt = namespace(role=None, found=false) -%}
222
+ {%- if loop.index0 > 0 -%}
223
+ {%- for j in range(loop.index0 - 1, -1, -1) -%}
224
+ {%- if not prev_nt.found -%}
225
+ {%- if loop_messages[j]['role'] != 'tool' -%}
226
+ {%- set prev_nt.role = loop_messages[j]['role'] -%}
227
+ {%- set prev_nt.found = true -%}
228
+ {%- endif -%}
229
+ {%- endif -%}
230
+ {%- endfor -%}
231
+ {%- endif -%}
232
+ {%- set continue_same_model_turn = (role == 'model' and prev_nt.role == 'assistant') -%}
233
+ {%- if not continue_same_model_turn -%}
234
+ {{- '<|turn>' + role + '\n' }}
235
+ {%- endif -%}
236
+
237
+ {#- Render reasoning/reasoning_content as thinking channel -#}
238
+ {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
239
+ {%- if thinking_text and loop.index0 > ns_turn.last_user_idx and message.get('tool_calls') -%}
240
+ {{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
241
+ {%- endif -%}
242
+
243
+ {%- if message['tool_calls'] -%}
244
+ {%- for tool_call in message['tool_calls'] -%}
245
+ {%- set function = tool_call['function'] -%}
246
+ {{- '<|tool_call>call:' + function['name'] + '{' -}}
247
+ {%- if function['arguments'] is mapping -%}
248
+ {%- set ns_args = namespace(found_first=false) -%}
249
+ {%- for key, value in function['arguments'] | dictsort -%}
250
+ {%- if ns_args.found_first %},{% endif -%}
251
+ {%- set ns_args.found_first = true -%}
252
+ {{- key -}}:{{- format_argument(value, escape_keys=False) -}}
253
+ {%- endfor -%}
254
+ {%- elif function['arguments'] is string -%}
255
+ {{- function['arguments'] -}}
256
+ {%- endif -%}
257
+ {{- '}<tool_call|>' -}}
258
+ {%- endfor -%}
259
+ {%- set ns.prev_message_type = 'tool_call' -%}
260
+ {%- endif -%}
261
+
262
+ {%- set ns_tr_out = namespace(flag=false) -%}
263
+ {%- if message.get('tool_responses') -%}
264
+ {#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
265
+ {%- for tool_response in message['tool_responses'] -%}
266
+ {{- format_tool_response_block(tool_response['name'] | default('unknown'), tool_response['response']) -}}
267
+ {%- set ns_tr_out.flag = true -%}
268
+ {%- set ns.prev_message_type = 'tool_response' -%}
269
+ {%- endfor -%}
270
+ {%- elif message.get('tool_calls') -%}
271
+ {#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
272
+ {%- set ns_tool_scan = namespace(stopped=false) -%}
273
+ {%- for k in range(loop.index0 + 1, loop_messages | length) -%}
274
+ {%- if ns_tool_scan.stopped -%}
275
+ {%- elif loop_messages[k]['role'] != 'tool' -%}
276
+ {%- set ns_tool_scan.stopped = true -%}
277
+ {%- else -%}
278
+ {%- set follow = loop_messages[k] -%}
279
+ {#- Resolve tool_call_id to function name -#}
280
+ {%- set ns_tname = namespace(name=follow.get('name') | default('unknown')) -%}
281
+ {%- for tc in message['tool_calls'] -%}
282
+ {%- if tc.get('id') == follow.get('tool_call_id') -%}
283
+ {%- set ns_tname.name = tc['function']['name'] -%}
284
+ {%- endif -%}
285
+ {%- endfor -%}
286
+ {#- Handle content as string or content-parts array -#}
287
+ {%- set tool_body = follow.get('content') -%}
288
+ {%- if tool_body is string -%}
289
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
290
+ {%- elif tool_body is sequence and tool_body is not string -%}
291
+ {%- set ns_txt = namespace(s='') -%}
292
+ {%- for part in tool_body -%}
293
+ {%- if part.get('type') == 'text' -%}
294
+ {%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
295
+ {%- endif -%}
296
+ {%- endfor -%}
297
+ {{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
298
+ {%- else -%}
299
+ {{- format_tool_response_block(ns_tname.name, tool_body) -}}
300
+ {%- endif -%}
301
+ {%- set ns_tr_out.flag = true -%}
302
+ {%- set ns.prev_message_type = 'tool_response' -%}
303
+ {%- endif -%}
304
+ {%- endfor -%}
305
+ {%- endif -%}
306
+
307
+ {%- set captured_content -%}
308
+ {%- if message['content'] is string -%}
309
+ {%- if role == 'model' -%}
310
+ {{- strip_thinking(message['content']) -}}
311
+ {%- else -%}
312
+ {{- message['content'] | trim -}}
313
+ {%- endif -%}
314
+ {%- elif message['content'] is sequence -%}
315
+ {%- for item in message['content'] -%}
316
+ {%- if item['type'] == 'text' -%}
317
+ {%- if role == 'model' -%}
318
+ {{- strip_thinking(item['text']) -}}
319
+ {%- else -%}
320
+ {{- item['text'] | trim -}}
321
+ {%- endif -%}
322
+ {%- elif item['type'] == 'image' -%}
323
+ {{- '<|image|>' -}}
324
+ {%- set ns.prev_message_type = 'image' -%}
325
+ {%- elif item['type'] == 'audio' -%}
326
+ {{- '<|audio|>' -}}
327
+ {%- set ns.prev_message_type = 'audio' -%}
328
+ {%- elif item['type'] == 'video' -%}
329
+ {{- '<|video|>' -}}
330
+ {%- set ns.prev_message_type = 'video' -%}
331
+ {%- endif -%}
332
+ {%- endfor -%}
333
+ {%- endif -%}
334
+ {%- endset -%}
335
+
336
+ {{- captured_content -}}
337
+ {%- set has_content = captured_content | trim | length > 0 -%}
338
+
339
+ {%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
340
+ {{- '<|tool_response>' -}}
341
+ {%- elif not (ns_tr_out.flag and not has_content) -%}
342
+ {{- '<turn|>\n' -}}
343
+ {%- endif -%}
344
+ {%- endif -%}
345
+ {%- endfor -%}
346
+
347
+ {%- if add_generation_prompt -%}
348
+ {%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
349
+ {{- '<|turn>model\n' -}}
350
+ {%- if not enable_thinking | default(false) -%}
351
+ {{- '<|channel>thought\n<channel|>' -}}
352
+ {%- endif -%}
353
+ {%- endif -%}
354
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,1117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma4ForConditionalGeneration"
4
+ ],
5
+ "audio_config": null,
6
+ "audio_token_id": 258881,
7
+ "boa_token_id": 256000,
8
+ "boi_token_id": 255999,
9
+ "dtype": "bfloat16",
10
+ "eoa_token_id": 258883,
11
+ "eoa_token_index": 258883,
12
+ "eoi_token_id": 258882,
13
+ "eos_token_id": [
14
+ 1,
15
+ 106,
16
+ 50
17
+ ],
18
+ "image_token_id": 258880,
19
+ "initializer_range": 0.02,
20
+ "model_type": "gemma4",
21
+ "quantization": {
22
+ "group_size": 64,
23
+ "bits": 4,
24
+ "mode": "affine",
25
+ "language_model.model.layers.0.mlp.gate_proj": {
26
+ "group_size": 64,
27
+ "bits": 8
28
+ },
29
+ "language_model.model.layers.0.mlp.down_proj": {
30
+ "group_size": 64,
31
+ "bits": 8
32
+ },
33
+ "language_model.model.layers.0.mlp.up_proj": {
34
+ "group_size": 64,
35
+ "bits": 8
36
+ },
37
+ "language_model.model.layers.0.router.proj": {
38
+ "group_size": 64,
39
+ "bits": 8
40
+ },
41
+ "language_model.model.layers.1.mlp.gate_proj": {
42
+ "group_size": 64,
43
+ "bits": 8
44
+ },
45
+ "language_model.model.layers.1.mlp.down_proj": {
46
+ "group_size": 64,
47
+ "bits": 8
48
+ },
49
+ "language_model.model.layers.1.mlp.up_proj": {
50
+ "group_size": 64,
51
+ "bits": 8
52
+ },
53
+ "language_model.model.layers.1.router.proj": {
54
+ "group_size": 64,
55
+ "bits": 8
56
+ },
57
+ "language_model.model.layers.2.mlp.gate_proj": {
58
+ "group_size": 64,
59
+ "bits": 8
60
+ },
61
+ "language_model.model.layers.2.mlp.down_proj": {
62
+ "group_size": 64,
63
+ "bits": 8
64
+ },
65
+ "language_model.model.layers.2.mlp.up_proj": {
66
+ "group_size": 64,
67
+ "bits": 8
68
+ },
69
+ "language_model.model.layers.2.router.proj": {
70
+ "group_size": 64,
71
+ "bits": 8
72
+ },
73
+ "language_model.model.layers.3.mlp.gate_proj": {
74
+ "group_size": 64,
75
+ "bits": 8
76
+ },
77
+ "language_model.model.layers.3.mlp.down_proj": {
78
+ "group_size": 64,
79
+ "bits": 8
80
+ },
81
+ "language_model.model.layers.3.mlp.up_proj": {
82
+ "group_size": 64,
83
+ "bits": 8
84
+ },
85
+ "language_model.model.layers.3.router.proj": {
86
+ "group_size": 64,
87
+ "bits": 8
88
+ },
89
+ "language_model.model.layers.4.mlp.gate_proj": {
90
+ "group_size": 64,
91
+ "bits": 8
92
+ },
93
+ "language_model.model.layers.4.mlp.down_proj": {
94
+ "group_size": 64,
95
+ "bits": 8
96
+ },
97
+ "language_model.model.layers.4.mlp.up_proj": {
98
+ "group_size": 64,
99
+ "bits": 8
100
+ },
101
+ "language_model.model.layers.4.router.proj": {
102
+ "group_size": 64,
103
+ "bits": 8
104
+ },
105
+ "language_model.model.layers.5.mlp.gate_proj": {
106
+ "group_size": 64,
107
+ "bits": 8
108
+ },
109
+ "language_model.model.layers.5.mlp.down_proj": {
110
+ "group_size": 64,
111
+ "bits": 8
112
+ },
113
+ "language_model.model.layers.5.mlp.up_proj": {
114
+ "group_size": 64,
115
+ "bits": 8
116
+ },
117
+ "language_model.model.layers.5.router.proj": {
118
+ "group_size": 64,
119
+ "bits": 8
120
+ },
121
+ "language_model.model.layers.6.mlp.gate_proj": {
122
+ "group_size": 64,
123
+ "bits": 8
124
+ },
125
+ "language_model.model.layers.6.mlp.down_proj": {
126
+ "group_size": 64,
127
+ "bits": 8
128
+ },
129
+ "language_model.model.layers.6.mlp.up_proj": {
130
+ "group_size": 64,
131
+ "bits": 8
132
+ },
133
+ "language_model.model.layers.6.router.proj": {
134
+ "group_size": 64,
135
+ "bits": 8
136
+ },
137
+ "language_model.model.layers.7.mlp.gate_proj": {
138
+ "group_size": 64,
139
+ "bits": 8
140
+ },
141
+ "language_model.model.layers.7.mlp.down_proj": {
142
+ "group_size": 64,
143
+ "bits": 8
144
+ },
145
+ "language_model.model.layers.7.mlp.up_proj": {
146
+ "group_size": 64,
147
+ "bits": 8
148
+ },
149
+ "language_model.model.layers.7.router.proj": {
150
+ "group_size": 64,
151
+ "bits": 8
152
+ },
153
+ "language_model.model.layers.8.mlp.gate_proj": {
154
+ "group_size": 64,
155
+ "bits": 8
156
+ },
157
+ "language_model.model.layers.8.mlp.down_proj": {
158
+ "group_size": 64,
159
+ "bits": 8
160
+ },
161
+ "language_model.model.layers.8.mlp.up_proj": {
162
+ "group_size": 64,
163
+ "bits": 8
164
+ },
165
+ "language_model.model.layers.8.router.proj": {
166
+ "group_size": 64,
167
+ "bits": 8
168
+ },
169
+ "language_model.model.layers.9.mlp.gate_proj": {
170
+ "group_size": 64,
171
+ "bits": 8
172
+ },
173
+ "language_model.model.layers.9.mlp.down_proj": {
174
+ "group_size": 64,
175
+ "bits": 8
176
+ },
177
+ "language_model.model.layers.9.mlp.up_proj": {
178
+ "group_size": 64,
179
+ "bits": 8
180
+ },
181
+ "language_model.model.layers.9.router.proj": {
182
+ "group_size": 64,
183
+ "bits": 8
184
+ },
185
+ "language_model.model.layers.10.mlp.gate_proj": {
186
+ "group_size": 64,
187
+ "bits": 8
188
+ },
189
+ "language_model.model.layers.10.mlp.down_proj": {
190
+ "group_size": 64,
191
+ "bits": 8
192
+ },
193
+ "language_model.model.layers.10.mlp.up_proj": {
194
+ "group_size": 64,
195
+ "bits": 8
196
+ },
197
+ "language_model.model.layers.10.router.proj": {
198
+ "group_size": 64,
199
+ "bits": 8
200
+ },
201
+ "language_model.model.layers.11.mlp.gate_proj": {
202
+ "group_size": 64,
203
+ "bits": 8
204
+ },
205
+ "language_model.model.layers.11.mlp.down_proj": {
206
+ "group_size": 64,
207
+ "bits": 8
208
+ },
209
+ "language_model.model.layers.11.mlp.up_proj": {
210
+ "group_size": 64,
211
+ "bits": 8
212
+ },
213
+ "language_model.model.layers.11.router.proj": {
214
+ "group_size": 64,
215
+ "bits": 8
216
+ },
217
+ "language_model.model.layers.12.mlp.gate_proj": {
218
+ "group_size": 64,
219
+ "bits": 8
220
+ },
221
+ "language_model.model.layers.12.mlp.down_proj": {
222
+ "group_size": 64,
223
+ "bits": 8
224
+ },
225
+ "language_model.model.layers.12.mlp.up_proj": {
226
+ "group_size": 64,
227
+ "bits": 8
228
+ },
229
+ "language_model.model.layers.12.router.proj": {
230
+ "group_size": 64,
231
+ "bits": 8
232
+ },
233
+ "language_model.model.layers.13.mlp.gate_proj": {
234
+ "group_size": 64,
235
+ "bits": 8
236
+ },
237
+ "language_model.model.layers.13.mlp.down_proj": {
238
+ "group_size": 64,
239
+ "bits": 8
240
+ },
241
+ "language_model.model.layers.13.mlp.up_proj": {
242
+ "group_size": 64,
243
+ "bits": 8
244
+ },
245
+ "language_model.model.layers.13.router.proj": {
246
+ "group_size": 64,
247
+ "bits": 8
248
+ },
249
+ "language_model.model.layers.14.mlp.gate_proj": {
250
+ "group_size": 64,
251
+ "bits": 8
252
+ },
253
+ "language_model.model.layers.14.mlp.down_proj": {
254
+ "group_size": 64,
255
+ "bits": 8
256
+ },
257
+ "language_model.model.layers.14.mlp.up_proj": {
258
+ "group_size": 64,
259
+ "bits": 8
260
+ },
261
+ "language_model.model.layers.14.router.proj": {
262
+ "group_size": 64,
263
+ "bits": 8
264
+ },
265
+ "language_model.model.layers.15.mlp.gate_proj": {
266
+ "group_size": 64,
267
+ "bits": 8
268
+ },
269
+ "language_model.model.layers.15.mlp.down_proj": {
270
+ "group_size": 64,
271
+ "bits": 8
272
+ },
273
+ "language_model.model.layers.15.mlp.up_proj": {
274
+ "group_size": 64,
275
+ "bits": 8
276
+ },
277
+ "language_model.model.layers.15.router.proj": {
278
+ "group_size": 64,
279
+ "bits": 8
280
+ },
281
+ "language_model.model.layers.16.mlp.gate_proj": {
282
+ "group_size": 64,
283
+ "bits": 8
284
+ },
285
+ "language_model.model.layers.16.mlp.down_proj": {
286
+ "group_size": 64,
287
+ "bits": 8
288
+ },
289
+ "language_model.model.layers.16.mlp.up_proj": {
290
+ "group_size": 64,
291
+ "bits": 8
292
+ },
293
+ "language_model.model.layers.16.router.proj": {
294
+ "group_size": 64,
295
+ "bits": 8
296
+ },
297
+ "language_model.model.layers.17.mlp.gate_proj": {
298
+ "group_size": 64,
299
+ "bits": 8
300
+ },
301
+ "language_model.model.layers.17.mlp.down_proj": {
302
+ "group_size": 64,
303
+ "bits": 8
304
+ },
305
+ "language_model.model.layers.17.mlp.up_proj": {
306
+ "group_size": 64,
307
+ "bits": 8
308
+ },
309
+ "language_model.model.layers.17.router.proj": {
310
+ "group_size": 64,
311
+ "bits": 8
312
+ },
313
+ "language_model.model.layers.18.mlp.gate_proj": {
314
+ "group_size": 64,
315
+ "bits": 8
316
+ },
317
+ "language_model.model.layers.18.mlp.down_proj": {
318
+ "group_size": 64,
319
+ "bits": 8
320
+ },
321
+ "language_model.model.layers.18.mlp.up_proj": {
322
+ "group_size": 64,
323
+ "bits": 8
324
+ },
325
+ "language_model.model.layers.18.router.proj": {
326
+ "group_size": 64,
327
+ "bits": 8
328
+ },
329
+ "language_model.model.layers.19.mlp.gate_proj": {
330
+ "group_size": 64,
331
+ "bits": 8
332
+ },
333
+ "language_model.model.layers.19.mlp.down_proj": {
334
+ "group_size": 64,
335
+ "bits": 8
336
+ },
337
+ "language_model.model.layers.19.mlp.up_proj": {
338
+ "group_size": 64,
339
+ "bits": 8
340
+ },
341
+ "language_model.model.layers.19.router.proj": {
342
+ "group_size": 64,
343
+ "bits": 8
344
+ },
345
+ "language_model.model.layers.20.mlp.gate_proj": {
346
+ "group_size": 64,
347
+ "bits": 8
348
+ },
349
+ "language_model.model.layers.20.mlp.down_proj": {
350
+ "group_size": 64,
351
+ "bits": 8
352
+ },
353
+ "language_model.model.layers.20.mlp.up_proj": {
354
+ "group_size": 64,
355
+ "bits": 8
356
+ },
357
+ "language_model.model.layers.20.router.proj": {
358
+ "group_size": 64,
359
+ "bits": 8
360
+ },
361
+ "language_model.model.layers.21.mlp.gate_proj": {
362
+ "group_size": 64,
363
+ "bits": 8
364
+ },
365
+ "language_model.model.layers.21.mlp.down_proj": {
366
+ "group_size": 64,
367
+ "bits": 8
368
+ },
369
+ "language_model.model.layers.21.mlp.up_proj": {
370
+ "group_size": 64,
371
+ "bits": 8
372
+ },
373
+ "language_model.model.layers.21.router.proj": {
374
+ "group_size": 64,
375
+ "bits": 8
376
+ },
377
+ "language_model.model.layers.22.mlp.gate_proj": {
378
+ "group_size": 64,
379
+ "bits": 8
380
+ },
381
+ "language_model.model.layers.22.mlp.down_proj": {
382
+ "group_size": 64,
383
+ "bits": 8
384
+ },
385
+ "language_model.model.layers.22.mlp.up_proj": {
386
+ "group_size": 64,
387
+ "bits": 8
388
+ },
389
+ "language_model.model.layers.22.router.proj": {
390
+ "group_size": 64,
391
+ "bits": 8
392
+ },
393
+ "language_model.model.layers.23.mlp.gate_proj": {
394
+ "group_size": 64,
395
+ "bits": 8
396
+ },
397
+ "language_model.model.layers.23.mlp.down_proj": {
398
+ "group_size": 64,
399
+ "bits": 8
400
+ },
401
+ "language_model.model.layers.23.mlp.up_proj": {
402
+ "group_size": 64,
403
+ "bits": 8
404
+ },
405
+ "language_model.model.layers.23.router.proj": {
406
+ "group_size": 64,
407
+ "bits": 8
408
+ },
409
+ "language_model.model.layers.24.mlp.gate_proj": {
410
+ "group_size": 64,
411
+ "bits": 8
412
+ },
413
+ "language_model.model.layers.24.mlp.down_proj": {
414
+ "group_size": 64,
415
+ "bits": 8
416
+ },
417
+ "language_model.model.layers.24.mlp.up_proj": {
418
+ "group_size": 64,
419
+ "bits": 8
420
+ },
421
+ "language_model.model.layers.24.router.proj": {
422
+ "group_size": 64,
423
+ "bits": 8
424
+ },
425
+ "language_model.model.layers.25.mlp.gate_proj": {
426
+ "group_size": 64,
427
+ "bits": 8
428
+ },
429
+ "language_model.model.layers.25.mlp.down_proj": {
430
+ "group_size": 64,
431
+ "bits": 8
432
+ },
433
+ "language_model.model.layers.25.mlp.up_proj": {
434
+ "group_size": 64,
435
+ "bits": 8
436
+ },
437
+ "language_model.model.layers.25.router.proj": {
438
+ "group_size": 64,
439
+ "bits": 8
440
+ },
441
+ "language_model.model.layers.26.mlp.gate_proj": {
442
+ "group_size": 64,
443
+ "bits": 8
444
+ },
445
+ "language_model.model.layers.26.mlp.down_proj": {
446
+ "group_size": 64,
447
+ "bits": 8
448
+ },
449
+ "language_model.model.layers.26.mlp.up_proj": {
450
+ "group_size": 64,
451
+ "bits": 8
452
+ },
453
+ "language_model.model.layers.26.router.proj": {
454
+ "group_size": 64,
455
+ "bits": 8
456
+ },
457
+ "language_model.model.layers.27.mlp.gate_proj": {
458
+ "group_size": 64,
459
+ "bits": 8
460
+ },
461
+ "language_model.model.layers.27.mlp.down_proj": {
462
+ "group_size": 64,
463
+ "bits": 8
464
+ },
465
+ "language_model.model.layers.27.mlp.up_proj": {
466
+ "group_size": 64,
467
+ "bits": 8
468
+ },
469
+ "language_model.model.layers.27.router.proj": {
470
+ "group_size": 64,
471
+ "bits": 8
472
+ },
473
+ "language_model.model.layers.28.mlp.gate_proj": {
474
+ "group_size": 64,
475
+ "bits": 8
476
+ },
477
+ "language_model.model.layers.28.mlp.down_proj": {
478
+ "group_size": 64,
479
+ "bits": 8
480
+ },
481
+ "language_model.model.layers.28.mlp.up_proj": {
482
+ "group_size": 64,
483
+ "bits": 8
484
+ },
485
+ "language_model.model.layers.28.router.proj": {
486
+ "group_size": 64,
487
+ "bits": 8
488
+ },
489
+ "language_model.model.layers.29.mlp.gate_proj": {
490
+ "group_size": 64,
491
+ "bits": 8
492
+ },
493
+ "language_model.model.layers.29.mlp.down_proj": {
494
+ "group_size": 64,
495
+ "bits": 8
496
+ },
497
+ "language_model.model.layers.29.mlp.up_proj": {
498
+ "group_size": 64,
499
+ "bits": 8
500
+ },
501
+ "language_model.model.layers.29.router.proj": {
502
+ "group_size": 64,
503
+ "bits": 8
504
+ }
505
+ },
506
+ "quantization_config": {
507
+ "group_size": 64,
508
+ "bits": 4,
509
+ "mode": "affine",
510
+ "language_model.model.layers.0.mlp.gate_proj": {
511
+ "group_size": 64,
512
+ "bits": 8
513
+ },
514
+ "language_model.model.layers.0.mlp.down_proj": {
515
+ "group_size": 64,
516
+ "bits": 8
517
+ },
518
+ "language_model.model.layers.0.mlp.up_proj": {
519
+ "group_size": 64,
520
+ "bits": 8
521
+ },
522
+ "language_model.model.layers.0.router.proj": {
523
+ "group_size": 64,
524
+ "bits": 8
525
+ },
526
+ "language_model.model.layers.1.mlp.gate_proj": {
527
+ "group_size": 64,
528
+ "bits": 8
529
+ },
530
+ "language_model.model.layers.1.mlp.down_proj": {
531
+ "group_size": 64,
532
+ "bits": 8
533
+ },
534
+ "language_model.model.layers.1.mlp.up_proj": {
535
+ "group_size": 64,
536
+ "bits": 8
537
+ },
538
+ "language_model.model.layers.1.router.proj": {
539
+ "group_size": 64,
540
+ "bits": 8
541
+ },
542
+ "language_model.model.layers.2.mlp.gate_proj": {
543
+ "group_size": 64,
544
+ "bits": 8
545
+ },
546
+ "language_model.model.layers.2.mlp.down_proj": {
547
+ "group_size": 64,
548
+ "bits": 8
549
+ },
550
+ "language_model.model.layers.2.mlp.up_proj": {
551
+ "group_size": 64,
552
+ "bits": 8
553
+ },
554
+ "language_model.model.layers.2.router.proj": {
555
+ "group_size": 64,
556
+ "bits": 8
557
+ },
558
+ "language_model.model.layers.3.mlp.gate_proj": {
559
+ "group_size": 64,
560
+ "bits": 8
561
+ },
562
+ "language_model.model.layers.3.mlp.down_proj": {
563
+ "group_size": 64,
564
+ "bits": 8
565
+ },
566
+ "language_model.model.layers.3.mlp.up_proj": {
567
+ "group_size": 64,
568
+ "bits": 8
569
+ },
570
+ "language_model.model.layers.3.router.proj": {
571
+ "group_size": 64,
572
+ "bits": 8
573
+ },
574
+ "language_model.model.layers.4.mlp.gate_proj": {
575
+ "group_size": 64,
576
+ "bits": 8
577
+ },
578
+ "language_model.model.layers.4.mlp.down_proj": {
579
+ "group_size": 64,
580
+ "bits": 8
581
+ },
582
+ "language_model.model.layers.4.mlp.up_proj": {
583
+ "group_size": 64,
584
+ "bits": 8
585
+ },
586
+ "language_model.model.layers.4.router.proj": {
587
+ "group_size": 64,
588
+ "bits": 8
589
+ },
590
+ "language_model.model.layers.5.mlp.gate_proj": {
591
+ "group_size": 64,
592
+ "bits": 8
593
+ },
594
+ "language_model.model.layers.5.mlp.down_proj": {
595
+ "group_size": 64,
596
+ "bits": 8
597
+ },
598
+ "language_model.model.layers.5.mlp.up_proj": {
599
+ "group_size": 64,
600
+ "bits": 8
601
+ },
602
+ "language_model.model.layers.5.router.proj": {
603
+ "group_size": 64,
604
+ "bits": 8
605
+ },
606
+ "language_model.model.layers.6.mlp.gate_proj": {
607
+ "group_size": 64,
608
+ "bits": 8
609
+ },
610
+ "language_model.model.layers.6.mlp.down_proj": {
611
+ "group_size": 64,
612
+ "bits": 8
613
+ },
614
+ "language_model.model.layers.6.mlp.up_proj": {
615
+ "group_size": 64,
616
+ "bits": 8
617
+ },
618
+ "language_model.model.layers.6.router.proj": {
619
+ "group_size": 64,
620
+ "bits": 8
621
+ },
622
+ "language_model.model.layers.7.mlp.gate_proj": {
623
+ "group_size": 64,
624
+ "bits": 8
625
+ },
626
+ "language_model.model.layers.7.mlp.down_proj": {
627
+ "group_size": 64,
628
+ "bits": 8
629
+ },
630
+ "language_model.model.layers.7.mlp.up_proj": {
631
+ "group_size": 64,
632
+ "bits": 8
633
+ },
634
+ "language_model.model.layers.7.router.proj": {
635
+ "group_size": 64,
636
+ "bits": 8
637
+ },
638
+ "language_model.model.layers.8.mlp.gate_proj": {
639
+ "group_size": 64,
640
+ "bits": 8
641
+ },
642
+ "language_model.model.layers.8.mlp.down_proj": {
643
+ "group_size": 64,
644
+ "bits": 8
645
+ },
646
+ "language_model.model.layers.8.mlp.up_proj": {
647
+ "group_size": 64,
648
+ "bits": 8
649
+ },
650
+ "language_model.model.layers.8.router.proj": {
651
+ "group_size": 64,
652
+ "bits": 8
653
+ },
654
+ "language_model.model.layers.9.mlp.gate_proj": {
655
+ "group_size": 64,
656
+ "bits": 8
657
+ },
658
+ "language_model.model.layers.9.mlp.down_proj": {
659
+ "group_size": 64,
660
+ "bits": 8
661
+ },
662
+ "language_model.model.layers.9.mlp.up_proj": {
663
+ "group_size": 64,
664
+ "bits": 8
665
+ },
666
+ "language_model.model.layers.9.router.proj": {
667
+ "group_size": 64,
668
+ "bits": 8
669
+ },
670
+ "language_model.model.layers.10.mlp.gate_proj": {
671
+ "group_size": 64,
672
+ "bits": 8
673
+ },
674
+ "language_model.model.layers.10.mlp.down_proj": {
675
+ "group_size": 64,
676
+ "bits": 8
677
+ },
678
+ "language_model.model.layers.10.mlp.up_proj": {
679
+ "group_size": 64,
680
+ "bits": 8
681
+ },
682
+ "language_model.model.layers.10.router.proj": {
683
+ "group_size": 64,
684
+ "bits": 8
685
+ },
686
+ "language_model.model.layers.11.mlp.gate_proj": {
687
+ "group_size": 64,
688
+ "bits": 8
689
+ },
690
+ "language_model.model.layers.11.mlp.down_proj": {
691
+ "group_size": 64,
692
+ "bits": 8
693
+ },
694
+ "language_model.model.layers.11.mlp.up_proj": {
695
+ "group_size": 64,
696
+ "bits": 8
697
+ },
698
+ "language_model.model.layers.11.router.proj": {
699
+ "group_size": 64,
700
+ "bits": 8
701
+ },
702
+ "language_model.model.layers.12.mlp.gate_proj": {
703
+ "group_size": 64,
704
+ "bits": 8
705
+ },
706
+ "language_model.model.layers.12.mlp.down_proj": {
707
+ "group_size": 64,
708
+ "bits": 8
709
+ },
710
+ "language_model.model.layers.12.mlp.up_proj": {
711
+ "group_size": 64,
712
+ "bits": 8
713
+ },
714
+ "language_model.model.layers.12.router.proj": {
715
+ "group_size": 64,
716
+ "bits": 8
717
+ },
718
+ "language_model.model.layers.13.mlp.gate_proj": {
719
+ "group_size": 64,
720
+ "bits": 8
721
+ },
722
+ "language_model.model.layers.13.mlp.down_proj": {
723
+ "group_size": 64,
724
+ "bits": 8
725
+ },
726
+ "language_model.model.layers.13.mlp.up_proj": {
727
+ "group_size": 64,
728
+ "bits": 8
729
+ },
730
+ "language_model.model.layers.13.router.proj": {
731
+ "group_size": 64,
732
+ "bits": 8
733
+ },
734
+ "language_model.model.layers.14.mlp.gate_proj": {
735
+ "group_size": 64,
736
+ "bits": 8
737
+ },
738
+ "language_model.model.layers.14.mlp.down_proj": {
739
+ "group_size": 64,
740
+ "bits": 8
741
+ },
742
+ "language_model.model.layers.14.mlp.up_proj": {
743
+ "group_size": 64,
744
+ "bits": 8
745
+ },
746
+ "language_model.model.layers.14.router.proj": {
747
+ "group_size": 64,
748
+ "bits": 8
749
+ },
750
+ "language_model.model.layers.15.mlp.gate_proj": {
751
+ "group_size": 64,
752
+ "bits": 8
753
+ },
754
+ "language_model.model.layers.15.mlp.down_proj": {
755
+ "group_size": 64,
756
+ "bits": 8
757
+ },
758
+ "language_model.model.layers.15.mlp.up_proj": {
759
+ "group_size": 64,
760
+ "bits": 8
761
+ },
762
+ "language_model.model.layers.15.router.proj": {
763
+ "group_size": 64,
764
+ "bits": 8
765
+ },
766
+ "language_model.model.layers.16.mlp.gate_proj": {
767
+ "group_size": 64,
768
+ "bits": 8
769
+ },
770
+ "language_model.model.layers.16.mlp.down_proj": {
771
+ "group_size": 64,
772
+ "bits": 8
773
+ },
774
+ "language_model.model.layers.16.mlp.up_proj": {
775
+ "group_size": 64,
776
+ "bits": 8
777
+ },
778
+ "language_model.model.layers.16.router.proj": {
779
+ "group_size": 64,
780
+ "bits": 8
781
+ },
782
+ "language_model.model.layers.17.mlp.gate_proj": {
783
+ "group_size": 64,
784
+ "bits": 8
785
+ },
786
+ "language_model.model.layers.17.mlp.down_proj": {
787
+ "group_size": 64,
788
+ "bits": 8
789
+ },
790
+ "language_model.model.layers.17.mlp.up_proj": {
791
+ "group_size": 64,
792
+ "bits": 8
793
+ },
794
+ "language_model.model.layers.17.router.proj": {
795
+ "group_size": 64,
796
+ "bits": 8
797
+ },
798
+ "language_model.model.layers.18.mlp.gate_proj": {
799
+ "group_size": 64,
800
+ "bits": 8
801
+ },
802
+ "language_model.model.layers.18.mlp.down_proj": {
803
+ "group_size": 64,
804
+ "bits": 8
805
+ },
806
+ "language_model.model.layers.18.mlp.up_proj": {
807
+ "group_size": 64,
808
+ "bits": 8
809
+ },
810
+ "language_model.model.layers.18.router.proj": {
811
+ "group_size": 64,
812
+ "bits": 8
813
+ },
814
+ "language_model.model.layers.19.mlp.gate_proj": {
815
+ "group_size": 64,
816
+ "bits": 8
817
+ },
818
+ "language_model.model.layers.19.mlp.down_proj": {
819
+ "group_size": 64,
820
+ "bits": 8
821
+ },
822
+ "language_model.model.layers.19.mlp.up_proj": {
823
+ "group_size": 64,
824
+ "bits": 8
825
+ },
826
+ "language_model.model.layers.19.router.proj": {
827
+ "group_size": 64,
828
+ "bits": 8
829
+ },
830
+ "language_model.model.layers.20.mlp.gate_proj": {
831
+ "group_size": 64,
832
+ "bits": 8
833
+ },
834
+ "language_model.model.layers.20.mlp.down_proj": {
835
+ "group_size": 64,
836
+ "bits": 8
837
+ },
838
+ "language_model.model.layers.20.mlp.up_proj": {
839
+ "group_size": 64,
840
+ "bits": 8
841
+ },
842
+ "language_model.model.layers.20.router.proj": {
843
+ "group_size": 64,
844
+ "bits": 8
845
+ },
846
+ "language_model.model.layers.21.mlp.gate_proj": {
847
+ "group_size": 64,
848
+ "bits": 8
849
+ },
850
+ "language_model.model.layers.21.mlp.down_proj": {
851
+ "group_size": 64,
852
+ "bits": 8
853
+ },
854
+ "language_model.model.layers.21.mlp.up_proj": {
855
+ "group_size": 64,
856
+ "bits": 8
857
+ },
858
+ "language_model.model.layers.21.router.proj": {
859
+ "group_size": 64,
860
+ "bits": 8
861
+ },
862
+ "language_model.model.layers.22.mlp.gate_proj": {
863
+ "group_size": 64,
864
+ "bits": 8
865
+ },
866
+ "language_model.model.layers.22.mlp.down_proj": {
867
+ "group_size": 64,
868
+ "bits": 8
869
+ },
870
+ "language_model.model.layers.22.mlp.up_proj": {
871
+ "group_size": 64,
872
+ "bits": 8
873
+ },
874
+ "language_model.model.layers.22.router.proj": {
875
+ "group_size": 64,
876
+ "bits": 8
877
+ },
878
+ "language_model.model.layers.23.mlp.gate_proj": {
879
+ "group_size": 64,
880
+ "bits": 8
881
+ },
882
+ "language_model.model.layers.23.mlp.down_proj": {
883
+ "group_size": 64,
884
+ "bits": 8
885
+ },
886
+ "language_model.model.layers.23.mlp.up_proj": {
887
+ "group_size": 64,
888
+ "bits": 8
889
+ },
890
+ "language_model.model.layers.23.router.proj": {
891
+ "group_size": 64,
892
+ "bits": 8
893
+ },
894
+ "language_model.model.layers.24.mlp.gate_proj": {
895
+ "group_size": 64,
896
+ "bits": 8
897
+ },
898
+ "language_model.model.layers.24.mlp.down_proj": {
899
+ "group_size": 64,
900
+ "bits": 8
901
+ },
902
+ "language_model.model.layers.24.mlp.up_proj": {
903
+ "group_size": 64,
904
+ "bits": 8
905
+ },
906
+ "language_model.model.layers.24.router.proj": {
907
+ "group_size": 64,
908
+ "bits": 8
909
+ },
910
+ "language_model.model.layers.25.mlp.gate_proj": {
911
+ "group_size": 64,
912
+ "bits": 8
913
+ },
914
+ "language_model.model.layers.25.mlp.down_proj": {
915
+ "group_size": 64,
916
+ "bits": 8
917
+ },
918
+ "language_model.model.layers.25.mlp.up_proj": {
919
+ "group_size": 64,
920
+ "bits": 8
921
+ },
922
+ "language_model.model.layers.25.router.proj": {
923
+ "group_size": 64,
924
+ "bits": 8
925
+ },
926
+ "language_model.model.layers.26.mlp.gate_proj": {
927
+ "group_size": 64,
928
+ "bits": 8
929
+ },
930
+ "language_model.model.layers.26.mlp.down_proj": {
931
+ "group_size": 64,
932
+ "bits": 8
933
+ },
934
+ "language_model.model.layers.26.mlp.up_proj": {
935
+ "group_size": 64,
936
+ "bits": 8
937
+ },
938
+ "language_model.model.layers.26.router.proj": {
939
+ "group_size": 64,
940
+ "bits": 8
941
+ },
942
+ "language_model.model.layers.27.mlp.gate_proj": {
943
+ "group_size": 64,
944
+ "bits": 8
945
+ },
946
+ "language_model.model.layers.27.mlp.down_proj": {
947
+ "group_size": 64,
948
+ "bits": 8
949
+ },
950
+ "language_model.model.layers.27.mlp.up_proj": {
951
+ "group_size": 64,
952
+ "bits": 8
953
+ },
954
+ "language_model.model.layers.27.router.proj": {
955
+ "group_size": 64,
956
+ "bits": 8
957
+ },
958
+ "language_model.model.layers.28.mlp.gate_proj": {
959
+ "group_size": 64,
960
+ "bits": 8
961
+ },
962
+ "language_model.model.layers.28.mlp.down_proj": {
963
+ "group_size": 64,
964
+ "bits": 8
965
+ },
966
+ "language_model.model.layers.28.mlp.up_proj": {
967
+ "group_size": 64,
968
+ "bits": 8
969
+ },
970
+ "language_model.model.layers.28.router.proj": {
971
+ "group_size": 64,
972
+ "bits": 8
973
+ },
974
+ "language_model.model.layers.29.mlp.gate_proj": {
975
+ "group_size": 64,
976
+ "bits": 8
977
+ },
978
+ "language_model.model.layers.29.mlp.down_proj": {
979
+ "group_size": 64,
980
+ "bits": 8
981
+ },
982
+ "language_model.model.layers.29.mlp.up_proj": {
983
+ "group_size": 64,
984
+ "bits": 8
985
+ },
986
+ "language_model.model.layers.29.router.proj": {
987
+ "group_size": 64,
988
+ "bits": 8
989
+ }
990
+ },
991
+ "text_config": {
992
+ "attention_bias": false,
993
+ "attention_dropout": 0.0,
994
+ "attention_k_eq_v": true,
995
+ "bos_token_id": 2,
996
+ "dtype": "bfloat16",
997
+ "enable_moe_block": true,
998
+ "eos_token_id": 1,
999
+ "final_logit_softcapping": 30.0,
1000
+ "global_head_dim": 512,
1001
+ "head_dim": 256,
1002
+ "hidden_activation": "gelu_pytorch_tanh",
1003
+ "hidden_size": 2816,
1004
+ "hidden_size_per_layer_input": 0,
1005
+ "initializer_range": 0.02,
1006
+ "intermediate_size": 2112,
1007
+ "layer_types": [
1008
+ "sliding_attention",
1009
+ "sliding_attention",
1010
+ "sliding_attention",
1011
+ "sliding_attention",
1012
+ "sliding_attention",
1013
+ "full_attention",
1014
+ "sliding_attention",
1015
+ "sliding_attention",
1016
+ "sliding_attention",
1017
+ "sliding_attention",
1018
+ "sliding_attention",
1019
+ "full_attention",
1020
+ "sliding_attention",
1021
+ "sliding_attention",
1022
+ "sliding_attention",
1023
+ "sliding_attention",
1024
+ "sliding_attention",
1025
+ "full_attention",
1026
+ "sliding_attention",
1027
+ "sliding_attention",
1028
+ "sliding_attention",
1029
+ "sliding_attention",
1030
+ "sliding_attention",
1031
+ "full_attention",
1032
+ "sliding_attention",
1033
+ "sliding_attention",
1034
+ "sliding_attention",
1035
+ "sliding_attention",
1036
+ "sliding_attention",
1037
+ "full_attention"
1038
+ ],
1039
+ "max_position_embeddings": 262144,
1040
+ "model_type": "gemma4_text",
1041
+ "moe_intermediate_size": 704,
1042
+ "num_attention_heads": 16,
1043
+ "num_experts": 128,
1044
+ "num_global_key_value_heads": 2,
1045
+ "num_hidden_layers": 30,
1046
+ "num_key_value_heads": 8,
1047
+ "num_kv_shared_layers": 0,
1048
+ "pad_token_id": 0,
1049
+ "rms_norm_eps": 1e-06,
1050
+ "rope_parameters": {
1051
+ "full_attention": {
1052
+ "partial_rotary_factor": 0.25,
1053
+ "rope_theta": 1000000.0,
1054
+ "rope_type": "proportional"
1055
+ },
1056
+ "sliding_attention": {
1057
+ "rope_theta": 10000.0,
1058
+ "rope_type": "default"
1059
+ }
1060
+ },
1061
+ "sliding_window": 1024,
1062
+ "tie_word_embeddings": true,
1063
+ "top_k_experts": 8,
1064
+ "use_bidirectional_attention": "vision",
1065
+ "use_cache": true,
1066
+ "use_double_wide_mlp": false,
1067
+ "vocab_size": 262144,
1068
+ "vocab_size_per_layer_input": 262144
1069
+ },
1070
+ "tie_word_embeddings": true,
1071
+ "transformers_version": "5.6.2",
1072
+ "video_token_id": 258884,
1073
+ "vision_config": {
1074
+ "_name_or_path": "",
1075
+ "architectures": null,
1076
+ "attention_bias": false,
1077
+ "attention_dropout": 0.0,
1078
+ "chunk_size_feed_forward": 0,
1079
+ "default_output_length": 280,
1080
+ "dtype": "bfloat16",
1081
+ "global_head_dim": 72,
1082
+ "head_dim": 72,
1083
+ "hidden_activation": "gelu_pytorch_tanh",
1084
+ "hidden_size": 1152,
1085
+ "id2label": {
1086
+ "0": "LABEL_0",
1087
+ "1": "LABEL_1"
1088
+ },
1089
+ "initializer_range": 0.02,
1090
+ "intermediate_size": 4304,
1091
+ "is_encoder_decoder": false,
1092
+ "label2id": {
1093
+ "LABEL_0": 0,
1094
+ "LABEL_1": 1
1095
+ },
1096
+ "max_position_embeddings": 131072,
1097
+ "model_type": "gemma4_vision",
1098
+ "num_attention_heads": 16,
1099
+ "num_hidden_layers": 27,
1100
+ "num_key_value_heads": 16,
1101
+ "output_attentions": false,
1102
+ "output_hidden_states": false,
1103
+ "patch_size": 16,
1104
+ "pooling_kernel_size": 3,
1105
+ "position_embedding_size": 10240,
1106
+ "problem_type": null,
1107
+ "return_dict": true,
1108
+ "rms_norm_eps": 1e-06,
1109
+ "rope_parameters": {
1110
+ "rope_theta": 100.0,
1111
+ "rope_type": "default"
1112
+ },
1113
+ "standardize": true,
1114
+ "use_clipped_linears": false
1115
+ },
1116
+ "vision_soft_tokens_per_image": 280
1117
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 1,
6
+ 106,
7
+ 50
8
+ ],
9
+ "pad_token_id": 0,
10
+ "temperature": 1.0,
11
+ "top_k": 64,
12
+ "top_p": 0.95,
13
+ "transformers_version": "5.6.2"
14
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:898863f0d5eba7153a9c9b9443aac1969809f2149e88481c725b6da40783f129
3
+ size 5275612587
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2abdca76ed4a647cfe8af680908894e2709b4e1221ddbbbef1b1edb14f60e303
3
+ size 5296718232
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a554f0fdb61bc9e510a5318e723a780c31434fd3e3dcdd3c16c700f835ade7b7
3
+ size 5036507755
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
processor_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_seq_length": 750,
3
+ "image_processor": {
4
+ "do_convert_rgb": true,
5
+ "do_normalize": false,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.0,
10
+ 0.0,
11
+ 0.0
12
+ ],
13
+ "image_processor_type": "Gemma4ImageProcessor",
14
+ "image_seq_length": 280,
15
+ "image_std": [
16
+ 1.0,
17
+ 1.0,
18
+ 1.0
19
+ ],
20
+ "max_soft_tokens": 280,
21
+ "patch_size": 16,
22
+ "pooling_kernel_size": 3,
23
+ "resample": 3,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "height": 224,
27
+ "width": 224
28
+ }
29
+ },
30
+ "image_seq_length": 280,
31
+ "processor_class": "Gemma4Processor",
32
+ "feature_extractor": {
33
+ "feature_extractor_type": "Gemma4AudioFeatureExtractor",
34
+ "sampling_rate": 16000,
35
+ "num_mel_filters": 128,
36
+ "fft_length": 512,
37
+ "hop_length": 160,
38
+ "chunk_duration": 8.0,
39
+ "overlap_duration": 1.0
40
+ },
41
+ "audio_ms_per_token": 40
42
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
3
+ size 32169626
tokenizer_config.json ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_token": "<|audio|>",
3
+ "backend": "tokenizers",
4
+ "boa_token": "<|audio>",
5
+ "boi_token": "<|image>",
6
+ "bos_token": "<bos>",
7
+ "eoa_token": "<audio|>",
8
+ "eoc_token": "<channel|>",
9
+ "eoi_token": "<image|>",
10
+ "eos_token": "<eos>",
11
+ "eot_token": "<turn|>",
12
+ "escape_token": "<|\"|>",
13
+ "etc_token": "<tool_call|>",
14
+ "etd_token": "<tool|>",
15
+ "etr_token": "<tool_response|>",
16
+ "extra_special_tokens": [
17
+ "<|video|>"
18
+ ],
19
+ "image_token": "<|image|>",
20
+ "is_local": true,
21
+ "local_files_only": true,
22
+ "mask_token": "<mask>",
23
+ "model_max_length": 1000000000000000019884624838656,
24
+ "model_specific_special_tokens": {
25
+ "audio_token": "<|audio|>",
26
+ "boa_token": "<|audio>",
27
+ "boi_token": "<|image>",
28
+ "eoa_token": "<audio|>",
29
+ "eoc_token": "<channel|>",
30
+ "eoi_token": "<image|>",
31
+ "eot_token": "<turn|>",
32
+ "escape_token": "<|\"|>",
33
+ "etc_token": "<tool_call|>",
34
+ "etd_token": "<tool|>",
35
+ "etr_token": "<tool_response|>",
36
+ "image_token": "<|image|>",
37
+ "soc_token": "<|channel>",
38
+ "sot_token": "<|turn>",
39
+ "stc_token": "<|tool_call>",
40
+ "std_token": "<|tool>",
41
+ "str_token": "<|tool_response>",
42
+ "think_token": "<|think|>"
43
+ },
44
+ "pad_token": "<pad>",
45
+ "padding_side": "left",
46
+ "processor_class": "Gemma4Processor",
47
+ "response_schema": {
48
+ "properties": {
49
+ "content": {
50
+ "type": "string"
51
+ },
52
+ "role": {
53
+ "const": "assistant"
54
+ },
55
+ "thinking": {
56
+ "type": "string"
57
+ },
58
+ "tool_calls": {
59
+ "items": {
60
+ "properties": {
61
+ "function": {
62
+ "properties": {
63
+ "arguments": {
64
+ "additionalProperties": {},
65
+ "type": "object",
66
+ "x-parser": "gemma4-tool-call"
67
+ },
68
+ "name": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "type": "object",
73
+ "x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})"
74
+ },
75
+ "type": {
76
+ "const": "function"
77
+ }
78
+ },
79
+ "type": "object"
80
+ },
81
+ "type": "array",
82
+ "x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>"
83
+ }
84
+ },
85
+ "type": "object",
86
+ "x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
87
+ },
88
+ "soc_token": "<|channel>",
89
+ "sot_token": "<|turn>",
90
+ "stc_token": "<|tool_call>",
91
+ "std_token": "<|tool>",
92
+ "str_token": "<|tool_response>",
93
+ "think_token": "<|think|>",
94
+ "tokenizer_class": "GemmaTokenizer",
95
+ "unk_token": "<unk>"
96
+ }