Initial W4A16 G64 release
Browse files- .gitattributes +1 -0
- LICENSE +202 -0
- README.md +268 -0
- RELEASE_CHECKLIST.md +35 -0
- SHA256SUMS +20 -0
- UPLOAD_MANIFEST.md +28 -0
- benchmarks/functional-canary.json +23 -0
- benchmarks/perplexity.json +31 -0
- benchmarks/rtx3090-128k-validation.json +22 -0
- benchmarks/rtx3090-performance.json +339 -0
- chat_template.jinja +390 -0
- config.json +454 -0
- eval/evaluate_gemma4_ppl_vllm.py +122 -0
- examples/serve_vllm_3090_128k.sh +17 -0
- generation_config.json +13 -0
- model.safetensors +3 -0
- processor_config.json +75 -0
- provenance/artifact-audit.json +312 -0
- provenance/calibration-and-source.json +384 -0
- recipe.yaml +32 -0
- tokenizer.json +3 -0
- tokenizer_config.json +142 -0
.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,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
license_link: https://ai.google.dev/gemma/docs/gemma_4_license
|
| 4 |
+
base_model:
|
| 5 |
+
- Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic
|
| 6 |
+
base_model_relation: quantized
|
| 7 |
+
pipeline_tag: image-text-to-text
|
| 8 |
+
library_name: vllm
|
| 9 |
+
tags:
|
| 10 |
+
- gemma4
|
| 11 |
+
- gemma
|
| 12 |
+
- vision-language
|
| 13 |
+
- multimodal
|
| 14 |
+
- quantized
|
| 15 |
+
- qat
|
| 16 |
+
- heretic
|
| 17 |
+
- uncensored
|
| 18 |
+
- abliterated
|
| 19 |
+
- w4a16
|
| 20 |
+
- int4
|
| 21 |
+
- g64
|
| 22 |
+
- compressed-tensors
|
| 23 |
+
- vllm
|
| 24 |
+
- marlin
|
| 25 |
+
- ampere
|
| 26 |
+
- rtx-3090
|
| 27 |
+
- conversational
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
# Gemma 4 26B-A4B-IT QAT/Heretic — W4A16 G64, BF16 vision
|
| 31 |
+
|
| 32 |
+
This is a calibrated W4A16 (INT4 weight-only) quantization of [Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic](https://huggingface.co/Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic), a QAT/Heretic tuned Gemma 4 26B-A4B instruction checkpoint. It is **not** a stock, bit-identical conversion of the ordinary public Google IT checkpoint. The model remains a Gemma 4 26B-A4B instruction/multimodal model; useful-quants performed the W4A16 conversion and packaging, not the original model development or the parent tuning.
|
| 33 |
+
|
| 34 |
+
The language-model linear and MoE expert weights are packed with `compressed-tensors` W4A16/G64; activations remain BF16. The vision tower, routers, embeddings, and LM head remain BF16/unquantized. The packed payload is 14.58 GiB (`model.safetensors`); the full repository is approximately 14.61 GiB including tokenizer and processor files.
|
| 35 |
+
|
| 36 |
+
Text generation and real-image inference were validated on one RTX 3090 24 GB with vLLM, Ampere Marlin dense/MoE kernels, and CUDA graphs. A 131,072-token total sequence window (128K) was also validated on that reference system.
|
| 37 |
+
|
| 38 |
+
G64 is deliberate: the relevant Gemma 4 26B-A4B projection dimensions (`intermediate_size=2112`, `moe_intermediate_size=704`) divide cleanly by 64 but not by 128.
|
| 39 |
+
|
| 40 |
+
| Property | Value |
|
| 41 |
+
|---|---|
|
| 42 |
+
| Architecture | Gemma 4 26B-A4B MoE instruction/multimodal |
|
| 43 |
+
| Immediate source | [`Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic`](https://huggingface.co/Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic) at `d62fa836581401beafd08fdd624927e31dcac6ee` |
|
| 44 |
+
| Quantization | GPTQ-style W4A16, symmetric INT4, group size 64 |
|
| 45 |
+
| Runtime format | `compressed-tensors` `pack-quantized` |
|
| 46 |
+
| Precision retained | BF16 activations, vision tower, routers, embeddings, LM head |
|
| 47 |
+
| Primary runtime | vLLM (validated on a pinned main commit; see [Runtime compatibility](#runtime-compatibility)) |
|
| 48 |
+
| Reference GPU | RTX 3090 24 GB (Ampere) |
|
| 49 |
+
| Validated operational window | 131,072 total tokens, including generated tokens |
|
| 50 |
+
| Architectural context limit | 262,144 tokens |
|
| 51 |
+
| License | Apache-2.0, inherited from the Gemma parent |
|
| 52 |
+
|
| 53 |
+
## Base model and provenance
|
| 54 |
+
|
| 55 |
+
The immediate parent is [Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic](https://huggingface.co/Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic), revision `d62fa836581401beafd08fdd624927e31dcac6ee`. That parent is an uncensored/abliterated Heretic derivative of the QAT-trained `google/gemma-4-26B-A4B-it-qat-q4_0-unquantized` lineage, itself based on [Google Gemma 4 26B-A4B-IT](https://huggingface.co/google/gemma-4-26B-A4B-it). The local export was frozen before conversion, including source-file SHA256 hashes, tokenizer, processor, chat template, generation configuration, and architecture configuration. See [`provenance/calibration-and-source.json`](provenance/calibration-and-source.json).
|
| 56 |
+
|
| 57 |
+
The parent model's Apache-2.0 license and Gemma 4 license link apply. This quantization does not change the parent model's intended use, safety guidance, or license terms.
|
| 58 |
+
|
| 59 |
+
## What is quantized
|
| 60 |
+
|
| 61 |
+
The saved `quantization_config` is the source of truth:
|
| 62 |
+
|
| 63 |
+
- `Linear` language-model and MoE expert weights: 4-bit signed integer weights, W4A16, group-wise G64, symmetric, static activation ordering, `memoryless_minmax` observer, `pack-quantized` storage.
|
| 64 |
+
- Dense language-model linears and MoE experts are W4A16. The artifact audit found the expected packed expert tensors and finite weight-scale tensors.
|
| 65 |
+
- The vision tower is retained BF16.
|
| 66 |
+
- Routers and token/image embeddings are retained BF16/unquantized. This Gemma export has no separate `lm_head` tensor; output weights are tied through the BF16 token embedding.
|
| 67 |
+
- No reduced-precision KV-cache profile is claimed or recommended here.
|
| 68 |
+
|
| 69 |
+
The GPTQ modifier also used a 128-token block size and `dampening_frac=0.01`; the complete public-safe recipe is in [`provenance/calibration-and-source.json`](provenance/calibration-and-source.json).
|
| 70 |
+
|
| 71 |
+
## Calibration
|
| 72 |
+
|
| 73 |
+
Calibration was multimodal rather than text-only so the conversion observed both normal language traffic and the image-processing/template path.
|
| 74 |
+
|
| 75 |
+
- **Text:** 512 frozen 512-token windows, deterministic seed `20260812`.
|
| 76 |
+
- 192 windows from `Salesforce/wikitext`, `wikitext-103-raw-v1` train.
|
| 77 |
+
- 192 from `HuggingFaceTB/smoltalk`, `openhermes-100k`.
|
| 78 |
+
- 128 from `HuggingFaceTB/smoltalk`, `apigen-80k`.
|
| 79 |
+
- Each source is deterministically shuffled; a valid 512-token span is sampled from each selected row. Conversational rows are rendered as role-labelled text before tokenization.
|
| 80 |
+
- **Images:** 1,024 deterministically selected, SHA256-verified images from COCO 2017 validation. The source processor converts each to RGB and applies its native preprocessing.
|
| 81 |
+
- **Mixed layout:** the first 512 calibration samples pair one frozen text window with one image; the remaining 512 use image-instruction prompts. Every selected COCO image and every frozen text window is used once.
|
| 82 |
+
- **Calibration sequence cap:** 1,024 tokens, allowing the 512-token text windows and Gemma image soft tokens to coexist.
|
| 83 |
+
|
| 84 |
+
The exact datasets, sample counts, seed, selection method, image hash-manifest digest, exclusions, and software versions are in [`provenance/calibration-and-source.json`](provenance/calibration-and-source.json). Calibration media are deliberately not included in this release.
|
| 85 |
+
|
| 86 |
+
## Quality: held-out perplexity
|
| 87 |
+
|
| 88 |
+
| Model | Perplexity | Delta vs. BF16 |
|
| 89 |
+
|---|---:|---:|
|
| 90 |
+
| Tuned QAT/Heretic BF16 parent | 388.150 | — |
|
| 91 |
+
| W4A16-G64 | 432.318 | +44.168 / +11.38% |
|
| 92 |
+
|
| 93 |
+
The result uses held-out `Salesforce/wikitext` `wikitext-2-raw-v1` **test** text, which was not used for calibration. Both rows use the same frozen tokenizer, four contiguous non-empty 512-token test-corpus windows (2,044 scored next-token positions), next-token NLL arithmetic, and vLLM `prompt_logprobs=1` scorer. BF16 is executed with vLLM CPU offload because the parent checkpoint exceeds a 24 GB GPU. See [`eval/evaluate_gemma4_ppl_vllm.py`](eval/evaluate_gemma4_ppl_vllm.py) and [`benchmarks/perplexity.json`](benchmarks/perplexity.json).
|
| 94 |
+
|
| 95 |
+
This is a compact quantization sanity evaluation, not a replacement for task-specific evaluation of the tuned parent.
|
| 96 |
+
|
| 97 |
+
## Verified functional gates
|
| 98 |
+
|
| 99 |
+
The final artifact was fresh-reloaded and passed:
|
| 100 |
+
|
| 101 |
+
- deterministic short text generation;
|
| 102 |
+
- real COCO image generation through the Gemma 4 processor/template path;
|
| 103 |
+
- Marlin W4A16 dense-linear selection;
|
| 104 |
+
- Marlin W4A16 MoE selection;
|
| 105 |
+
- CUDA graph capture, without eager mode;
|
| 106 |
+
- finite weight-scale and packed-tensor audit.
|
| 107 |
+
|
| 108 |
+
For images, use the Gemma 4 processor or OpenAI-compatible multimodal request format. The source chat template emits Gemma's actual `<|image|>` placeholder semantics; do **not** manually write a raw `<image>` token into a text prompt.
|
| 109 |
+
|
| 110 |
+
Gemma 4 supports video in its broader architecture, but video was neither required nor validated for this image-focused release profile. Unrestricted renderer warmup needlessly exercises a video path, so the validated image-serving profile explicitly uses:
|
| 111 |
+
|
| 112 |
+
```bash
|
| 113 |
+
--limit-mm-per-prompt '{"image":1,"video":0}'
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
This is a runtime warmup/configuration consideration, not a text or image generation failure.
|
| 117 |
+
|
| 118 |
+
Peak observed VRAM in the full-checkpoint performance test was **23,914 MiB**; the benchmark conditions are below.
|
| 119 |
+
|
| 120 |
+
## RTX 3090 24 GB performance
|
| 121 |
+
|
| 122 |
+
Reference setup: physical CUDA:1 RTX 3090, vLLM main commit `7ca49fbe4bab019e55d57cdc4b7fd3d55c67c1a6`, CUDA graphs enabled, `max_model_len=1024`, `max_num_seqs=32`, `max_num_batched_tokens=8192`, prefix caching disabled, three repetitions per point, and fixed 128-token greedy `ignore_eos` outputs. Values are **aggregate verified output tokens/s**, not per-request rate.
|
| 123 |
+
|
| 124 |
+
| Active requests | Text aggregate output tok/s | One image/request aggregate output tok/s |
|
| 125 |
+
|---:|---:|---:|
|
| 126 |
+
| 1 | 156.6 | 127.9 |
|
| 127 |
+
| 4 | 486.9 | 262.6 |
|
| 128 |
+
| 8 | 820.4 | 429.9 |
|
| 129 |
+
| 16 | 1,269.7 | 518.5 |
|
| 130 |
+
| 32 | 1,948.3 | 461.6 |
|
| 131 |
+
|
| 132 |
+
The text test is decode-dominant. The one-image/request test includes image processing and multimodal prefill, so it is not directly comparable to the text-only decode number. B32 maximized measured text aggregate throughput. B16 is the measured image-workload knee; B32 was slower for that workload because it exceeds the efficient 8,192-token multimodal batching envelope. vLLM profiling allocated encoder cache for up to 29 maximum-size images in this configuration. Raw public-safe measurements: [`benchmarks/rtx3090-performance.json`](benchmarks/rtx3090-performance.json).
|
| 133 |
+
|
| 134 |
+
## Long-context validation
|
| 135 |
+
|
| 136 |
+
Gemma 4 advertises an architectural maximum of **262,144 tokens**. That is not the same as what this 24 GB reference deployment can serve.
|
| 137 |
+
|
| 138 |
+
The validated RTX 3090 operational maximum is **131,072 total tokens (128K)**. A near-limit request with **130,816 input tokens** plus **64 generated tokens** completed with CUDA graphs, Marlin W4A16 dense/MoE paths, no OOM, and no allocator warning.
|
| 139 |
+
|
| 140 |
+
- Validated fixed KV reservation: `6444425401` bytes.
|
| 141 |
+
- Observed cache capacity: `135083` tokens.
|
| 142 |
+
- Margin above the configured 128K window: `4011` tokens (about 3%).
|
| 143 |
+
- A conventional 132K setting does not fit this fixed cache; 128K is the recommended validated ceiling for this reference configuration.
|
| 144 |
+
|
| 145 |
+
`max_model_len` includes generation: `input_tokens + max_tokens <= 131072`. For example, with a 2,048-token generation budget, the maximum input is 129,024 tokens. The exact fixed reservation is hardware- and runtime-specific; do not assume every 24 GB GPU has the same headroom.
|
| 146 |
+
|
| 147 |
+
## Recommended serving configurations
|
| 148 |
+
|
| 149 |
+
### A. Mixed agentic/search and batch service
|
| 150 |
+
|
| 151 |
+
This is the validated 128K RTX 3090 reference profile:
|
| 152 |
+
|
| 153 |
+
```bash
|
| 154 |
+
CUDA_VISIBLE_DEVICES=1 \
|
| 155 |
+
vllm serve useful-quants/Gemma-4-26B-A4B-it-W4A16-G64-BF16Vision \
|
| 156 |
+
--quantization compressed-tensors \
|
| 157 |
+
--dtype bfloat16 \
|
| 158 |
+
--max-model-len 131072 \
|
| 159 |
+
--kv-cache-memory-bytes 6444425401 \
|
| 160 |
+
--max-num-seqs 17 \
|
| 161 |
+
--max-num-batched-tokens 8192 \
|
| 162 |
+
--enable-chunked-prefill \
|
| 163 |
+
--enable-prefix-caching \
|
| 164 |
+
--scheduling-policy priority \
|
| 165 |
+
--limit-mm-per-prompt '{"image":1,"video":0}' \
|
| 166 |
+
--host 0.0.0.0 \
|
| 167 |
+
--port 8000
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
Do not combine this exact fixed-KV profile with `--gpu-memory-utilization`: explicit cache bytes are authoritative. The byte value is a validated RTX 3090 reference setting, not a universal default.
|
| 171 |
+
|
| 172 |
+
Admission policy matters as much as priority:
|
| 173 |
+
|
| 174 |
+
- Set `max_num_seqs=17`.
|
| 175 |
+
- Cap bulk ingress at **16** active requests, normally with `priority: 100`.
|
| 176 |
+
- Submit interactive/Hermes/search traffic with `priority: -10`.
|
| 177 |
+
- The free seventeenth slot lets the interactive request enter. Once admitted, priority scheduling can preempt/requeue lower-priority cache users if the long request requires cache. Priority alone should not be expected to create an admission slot when every sequence slot is occupied.
|
| 178 |
+
|
| 179 |
+
Example OpenAI-compatible high-priority request, reserving a 2K response budget:
|
| 180 |
+
|
| 181 |
+
```bash
|
| 182 |
+
curl http://localhost:8000/v1/chat/completions \
|
| 183 |
+
-H 'Content-Type: application/json' \
|
| 184 |
+
-d '{
|
| 185 |
+
"model": "useful-quants/Gemma-4-26B-A4B-it-W4A16-G64-BF16Vision",
|
| 186 |
+
"messages": [{"role": "user", "content": "Summarize the supplied context."}],
|
| 187 |
+
"max_tokens": 2048,
|
| 188 |
+
"temperature": 0.2,
|
| 189 |
+
"priority": -10
|
| 190 |
+
}'
|
| 191 |
+
```
|
| 192 |
+
|
| 193 |
+
### B. Text-throughput batch profile
|
| 194 |
+
|
| 195 |
+
For independent text-only jobs, use up to 32 active requests. The measured B32 point reached 1,948.3 aggregate verified output tok/s under the benchmark conditions above. This is a throughput profile, not the long-context mixed-service reservation.
|
| 196 |
+
|
| 197 |
+
### C. Image-heavy batch profile
|
| 198 |
+
|
| 199 |
+
For one image per request, B16 is the measured knee (518.5 aggregate output tok/s). Retain the 8,192-token batching envelope and disable video unless it is explicitly required:
|
| 200 |
+
|
| 201 |
+
```bash
|
| 202 |
+
--max-num-seqs 16 --max-num-batched-tokens 8192 \
|
| 203 |
+
--limit-mm-per-prompt '{"image":1,"video":0}'
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
## Runtime compatibility
|
| 207 |
+
|
| 208 |
+
Known-good final validation environment:
|
| 209 |
+
|
| 210 |
+
| Component | Version |
|
| 211 |
+
|---|---|
|
| 212 |
+
| vLLM | main commit `7ca49fbe4bab019e55d57cdc4b7fd3d55c67c1a6` (`0.1.dev1+g7ca49fbe4`) |
|
| 213 |
+
| Transformers | 5.15.1 |
|
| 214 |
+
| PyTorch | 2.13.0+cu130 |
|
| 215 |
+
| CUDA runtime | 13.0 |
|
| 216 |
+
| compressed-tensors runtime | 0.17.0 |
|
| 217 |
+
| Conversion artifact metadata | compressed-tensors 0.18.0 |
|
| 218 |
+
|
| 219 |
+
vLLM 0.27.1 did not contain the necessary handling for Transformers-5.15-era heterogeneous Gemma 4 attention metadata. The artifact was not the cause. Use the pinned commit above or a later vLLM release that explicitly includes the corresponding Gemma 4 heterogeneous-config support. Transformers-native inference is not claimed as validated for this packed artifact; vLLM is the supported runtime documented here.
|
| 220 |
+
|
| 221 |
+
## Image usage
|
| 222 |
+
|
| 223 |
+
Use an OpenAI-compatible multimodal request and let vLLM/the model processor apply Gemma's chat template:
|
| 224 |
+
|
| 225 |
+
```python
|
| 226 |
+
from openai import OpenAI
|
| 227 |
+
|
| 228 |
+
client = OpenAI(base_url="http://localhost:8000/v1", api_key="unused")
|
| 229 |
+
response = client.chat.completions.create(
|
| 230 |
+
model="useful-quants/Gemma-4-26B-A4B-it-W4A16-G64-BF16Vision",
|
| 231 |
+
messages=[{
|
| 232 |
+
"role": "user",
|
| 233 |
+
"content": [
|
| 234 |
+
{"type": "image_url", "image_url": {"url": "https://example.org/image.jpg"}},
|
| 235 |
+
{"type": "text", "text": "Describe this image accurately and concisely."},
|
| 236 |
+
],
|
| 237 |
+
}],
|
| 238 |
+
max_tokens=256,
|
| 239 |
+
)
|
| 240 |
+
print(response.choices[0].message.content)
|
| 241 |
+
```
|
| 242 |
+
|
| 243 |
+
Do not hand-insert raw image-placeholder text; the Gemma 4 processor/template is responsible for the image placement.
|
| 244 |
+
|
| 245 |
+
## Limitations and caveats
|
| 246 |
+
|
| 247 |
+
- Performance and KV-cache figures are measurements from one RTX 3090 24 GB, not universal guarantees.
|
| 248 |
+
- The 128K claim means a validated 131,072-token **total** window, including output; it does not make 262K feasible on this reference card.
|
| 249 |
+
- Video was intentionally disabled and not validated for this image-focused profile.
|
| 250 |
+
- Image throughput includes processor and prefill work; do not compare it directly with text decode throughput.
|
| 251 |
+
- The long-context reference profile retained the quality-tested BF16/auto KV-cache behavior. Reduced-precision KV cache has not been validated here.
|
| 252 |
+
- This is a quantization of the linked QAT/Heretic parent, not a stock-Google checkpoint conversion.
|
| 253 |
+
|
| 254 |
+
## Reproducibility
|
| 255 |
+
|
| 256 |
+
Public-safe provenance, calibration, artifact-audit, benchmark, and perplexity files are included in this repository:
|
| 257 |
+
|
| 258 |
+
- [`provenance/calibration-and-source.json`](provenance/calibration-and-source.json)
|
| 259 |
+
- [`provenance/artifact-audit.json`](provenance/artifact-audit.json)
|
| 260 |
+
- [`benchmarks/rtx3090-performance.json`](benchmarks/rtx3090-performance.json)
|
| 261 |
+
- [`benchmarks/perplexity.json`](benchmarks/perplexity.json)
|
| 262 |
+
- [`eval/evaluate_gemma4_ppl_vllm.py`](eval/evaluate_gemma4_ppl_vllm.py)
|
| 263 |
+
|
| 264 |
+
## Citation and license
|
| 265 |
+
|
| 266 |
+
Please cite the [QAT/Heretic parent model card](https://huggingface.co/Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic), the original [Gemma 4 model card](https://huggingface.co/google/gemma-4-26B-A4B-it), and [technical report](https://arxiv.org/abs/2607.02770) for their respective methods and architecture. Google DeepMind developed Gemma; useful-quants packaged this W4A16 artifact from the QAT/Heretic parent checkpoint.
|
| 267 |
+
|
| 268 |
+
This repository inherits the parent Apache-2.0 license; see [LICENSE](LICENSE) and the [Gemma 4 license](https://ai.google.dev/gemma/docs/gemma_4_license).
|
RELEASE_CHECKLIST.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Release checklist — local staging only
|
| 2 |
+
|
| 3 |
+
Status: **not uploaded**. This checklist maps public claims to local evidence.
|
| 4 |
+
|
| 5 |
+
| Claim / release gate | Local evidence | Status |
|
| 6 |
+
|---|---|---|
|
| 7 |
+
| Immediate source is a tuned QAT/Heretic parent, not stock-Google weights | `Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic` at `d62fa836581401beafd08fdd624927e31dcac6ee`; frozen source manifest | verified |
|
| 8 |
+
| Original Gemma family base | Google `google/gemma-4-26B-A4B-it` upstream card/config | verified as inherited family lineage |
|
| 9 |
+
| Apache-2.0 parent license | upstream Google model-card metadata; parent-license instruction | verified |
|
| 10 |
+
| W4A16, G64, symmetric pack-quantized configuration | artifact `config.json`, `recipe.yaml` | verified |
|
| 11 |
+
| Vision/router/embed/LM-head exclusions | artifact `config.json`, `recipe.yaml`, safetensors audit | verified; output head is tied to BF16 token embedding |
|
| 12 |
+
| 512 text + 1,024 COCO calibration | `CALIBRATION_MANIFEST.json`, frozen manifests, conversion script | verified |
|
| 13 |
+
| COCO selections hash verified | `image_manifest.jsonl` | verified; media intentionally excluded |
|
| 14 |
+
| Fresh text and real-image inference | `gemma4-g64-full-canary.json` and corresponding vLLM log | verified |
|
| 15 |
+
| Marlin dense and MoE paths, CUDA graphs | canary and full-validation logs | verified |
|
| 16 |
+
| RTX 3090 throughput table | `gemma4-g64-full-speed.json` | verified |
|
| 17 |
+
| 23,914 MiB peak benchmark VRAM | `gemma4-g64-full-speed.json` B32 records | verified |
|
| 18 |
+
| 128K long-context claim | `gemma4-g64-128k-agent-fixed-cache.json` and log | verified |
|
| 19 |
+
| Perplexity: same BF16/W4 text/windows/scoring | `eval/evaluate_gemma4_ppl_vllm.py`, `benchmarks/perplexity.json` | verified |
|
| 20 |
+
| Readme YAML parses | local YAML parser | verified |
|
| 21 |
+
| Public-safe files contain no absolute local paths/secrets | release-tree scan | verified |
|
| 22 |
+
| Fresh staged text + image smoke | `benchmarks/functional-canary.json` | verified |
|
| 23 |
+
| Model files unchanged from final artifact | same-inode hard link and SHA256 | verified |
|
| 24 |
+
|
| 25 |
+
## Deliberate non-claims
|
| 26 |
+
|
| 27 |
+
- No stock-Google checkpoint quality claim: this is a quantization of the linked tuned QAT/Heretic parent.
|
| 28 |
+
- No video validation.
|
| 29 |
+
- No Transformers-native packed-artifact serving validation.
|
| 30 |
+
- No universal 24 GB or 128K guarantee.
|
| 31 |
+
- No reduced-precision KV-cache validation.
|
| 32 |
+
|
| 33 |
+
## Upload boundary
|
| 34 |
+
|
| 35 |
+
Do not upload calibration images, raw calibration text, source BF16 shards, offload directories, complete logs, environment caches, local paths, credentials, or host-specific artifacts. See [`UPLOAD_MANIFEST.md`](UPLOAD_MANIFEST.md).
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
|
| 2 |
+
699ef4ff4940b5c61043fb363baf919d6d7957294dbecc97c64498f203fea63b README.md
|
| 3 |
+
61aa1b3e515ab2422f28c49cb98f0b9065089a9b0c7214f5e15cfb8da0309f5a RELEASE_CHECKLIST.md
|
| 4 |
+
a5a4ad69518a25f2ab78ebee60b4a7e675ee10dd6553d94f3a19369e92831caf UPLOAD_MANIFEST.md
|
| 5 |
+
2500eb83c5bab1125296c3b578c6ab16f22d9eeb66f411deeda8570d9b77048a benchmarks/functional-canary.json
|
| 6 |
+
b8568e3f7627a3789b291da2819641d00f2c5d434e985dc4b4d8dec1d25dd417 benchmarks/perplexity.json
|
| 7 |
+
38afb77d9202ccc1aeaf24f43a99836bfe906b9097ad4a4175666af757cdcc85 benchmarks/rtx3090-128k-validation.json
|
| 8 |
+
bf975291c1c2dfbe7cbf8a4dc1c2a02c880d915652caff670fe357a839406d50 benchmarks/rtx3090-performance.json
|
| 9 |
+
ae53464bf3be25802b3a5b37def7fd89667067d7577049b3b2d74c4d8de4c6d4 chat_template.jinja
|
| 10 |
+
3eb748bdc68e1139fced21067b3b6a36473930a5ac8ff85fb0538d5140ac2cd0 config.json
|
| 11 |
+
2323e35e64bd70315112b1628e73c7f65774d2b2454b38bcb4dd6ed98b5cccda eval/evaluate_gemma4_ppl_vllm.py
|
| 12 |
+
5215a2bc388bc5fa3c0b71b1eea50c787feb13da07f3539aa64fa923d8b8ba62 examples/serve_vllm_3090_128k.sh
|
| 13 |
+
3c205a3306d3c8a54e56e529f7338161bc012f1f2516e7175432cecd9c32b92d generation_config.json
|
| 14 |
+
4475b48270e4d2072886f084442e29f5e5eb16c7668d5a2a28404428e9c0b247 model.safetensors
|
| 15 |
+
32bdf45d2ad4cc29a0822ddd157a182de76644f0419a6228d151495256e9813c processor_config.json
|
| 16 |
+
2cf5d3bf89731f262fb1873e1561cdca4dd67bbd06126faeb4fb0a4fcdc84290 provenance/artifact-audit.json
|
| 17 |
+
e14f7e86544f46a80d36cb10e4597a5589fac8e04ddadda67dcf918c6e4ffbc1 provenance/calibration-and-source.json
|
| 18 |
+
fd10b59552e882faf755509a8226ed10a6a36b9d5444372b4219dd41843f4a5c recipe.yaml
|
| 19 |
+
c2cf15ae878b9477ea6d714d02be642da51424c6b7fe0c1e2cf5a332b5c2f789 tokenizer.json
|
| 20 |
+
ae79d5349f543e549ca2721755b030dbba92614e25585f4c7e9aaa3734dfa6ae tokenizer_config.json
|
UPLOAD_MANIFEST.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Upload manifest
|
| 2 |
+
|
| 3 |
+
This local release candidate is intended to contain the following published payload.
|
| 4 |
+
|
| 5 |
+
## Upload
|
| 6 |
+
|
| 7 |
+
- `model.safetensors` — the final packed W4A16 model payload.
|
| 8 |
+
- `config.json`, `generation_config.json` — architecture/generation metadata including the compressed-tensors quantization configuration.
|
| 9 |
+
- `tokenizer.json`, `tokenizer_config.json`, `processor_config.json`, `chat_template.jinja` — inherited tokenizer, processor, and template files required for normal Gemma 4/vLLM use.
|
| 10 |
+
- `README.md` — model card.
|
| 11 |
+
- `LICENSE` — the inherited Apache-2.0 license text.
|
| 12 |
+
- `SHA256SUMS` — checksums of all uploaded payload files.
|
| 13 |
+
- `benchmarks/rtx3090-performance.json` — public-safe performance data.
|
| 14 |
+
- `benchmarks/functional-canary.json` and `benchmarks/rtx3090-128k-validation.json` — public-safe functional and near-limit validation records.
|
| 15 |
+
- `benchmarks/perplexity.json` — public-safe matched perplexity result.
|
| 16 |
+
- `provenance/calibration-and-source.json` and `provenance/artifact-audit.json` — compact reproducibility records.
|
| 17 |
+
- `eval/evaluate_gemma4_ppl_vllm.py` — perplexity implementation.
|
| 18 |
+
- `examples/` — small public client/serve examples if added.
|
| 19 |
+
|
| 20 |
+
## Keep private
|
| 21 |
+
|
| 22 |
+
- All calibration images, image manifests containing captions/prompts, and text calibration windows.
|
| 23 |
+
- The 49 GB BF16 tuned/QAT parent checkpoint and its 11 source shards.
|
| 24 |
+
- Raw conversion logs, full vLLM logs, offload directories, environment caches, and compiler caches.
|
| 25 |
+
- Original absolute-path provenance files, host/user/kernel details, and any credentials/tokens.
|
| 26 |
+
- Trace artifacts, failed attempts, and internal planning notes.
|
| 27 |
+
|
| 28 |
+
The staged `model.safetensors` must be the byte-identical final artifact; no model-weight file is modified by release packaging.
|
benchmarks/functional-canary.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "passed",
|
| 3 |
+
"artifact_loaded_from_release_stage": true,
|
| 4 |
+
"text_generation": {
|
| 5 |
+
"status": "passed",
|
| 6 |
+
"generated_token_count": 8
|
| 7 |
+
},
|
| 8 |
+
"real_image_generation": {
|
| 9 |
+
"status": "passed",
|
| 10 |
+
"input": "one held-out COCO 2017 validation image",
|
| 11 |
+
"output": "A close-up shot of a large brown bear with thick, light brown fur, looking directly at the camera against a background of green grass."
|
| 12 |
+
},
|
| 13 |
+
"runtime": {
|
| 14 |
+
"quantization": "compressed-tensors",
|
| 15 |
+
"dense_kernel": "Marlin W4A16",
|
| 16 |
+
"moe_kernel": "Marlin W4A16",
|
| 17 |
+
"cuda_graphs": true,
|
| 18 |
+
"limit_mm_per_prompt": {
|
| 19 |
+
"image": 1,
|
| 20 |
+
"video": 0
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
benchmarks/perplexity.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"methodology": {
|
| 3 |
+
"engine": "vLLM prompt_logprobs=1",
|
| 4 |
+
"dataset": "Salesforce/wikitext",
|
| 5 |
+
"dataset_config": "wikitext-2-raw-v1",
|
| 6 |
+
"split": "test",
|
| 7 |
+
"dataset_fingerprint": "a46124b21ac53738",
|
| 8 |
+
"window_selection": "first contiguous non-empty test-corpus token windows",
|
| 9 |
+
"num_windows": 4,
|
| 10 |
+
"window_tokens": 512,
|
| 11 |
+
"evaluated_next_tokens": 2044,
|
| 12 |
+
"tokenizer": "frozen Gemma 4 QAT/Heretic parent tokenizer",
|
| 13 |
+
"note": "BF16 used vLLM CPU offload on a 24 GB RTX 3090; W4A16 used the same vLLM prompt-logprob scorer without offload."
|
| 14 |
+
},
|
| 15 |
+
"results": {
|
| 16 |
+
"bf16_parent": {
|
| 17 |
+
"perplexity": 388.14988734463424,
|
| 18 |
+
"mean_nll": 5.961391572614971,
|
| 19 |
+
"nll_sum": 12185.084374425001,
|
| 20 |
+
"cpu_offload_gb": 30.0
|
| 21 |
+
},
|
| 22 |
+
"w4a16_g64": {
|
| 23 |
+
"perplexity": 432.31795682768376,
|
| 24 |
+
"mean_nll": 6.069161328695908,
|
| 25 |
+
"nll_sum": 12405.365755854436,
|
| 26 |
+
"cpu_offload_gb": 0.0
|
| 27 |
+
},
|
| 28 |
+
"delta_perplexity": 44.16806948304952,
|
| 29 |
+
"delta_percent": 11.379127219437565
|
| 30 |
+
}
|
| 31 |
+
}
|
benchmarks/rtx3090-128k-validation.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "passed",
|
| 3 |
+
"reference_gpu": "RTX 3090 24 GB",
|
| 4 |
+
"runtime": "vLLM main 7ca49fbe4bab019e55d57cdc4b7fd3d55c67c1a6",
|
| 5 |
+
"max_model_len": 131072,
|
| 6 |
+
"near_limit_input_tokens": 130816,
|
| 7 |
+
"generated_tokens": 64,
|
| 8 |
+
"max_num_seqs": 17,
|
| 9 |
+
"max_num_batched_tokens": 8192,
|
| 10 |
+
"kv_cache_memory_bytes": 6444425401,
|
| 11 |
+
"cache_capacity_tokens": 135083,
|
| 12 |
+
"cache_margin_tokens": 4011,
|
| 13 |
+
"cuda_graphs": true,
|
| 14 |
+
"quantization": "compressed-tensors W4A16 G64",
|
| 15 |
+
"limit_mm_per_prompt": {
|
| 16 |
+
"image": 1,
|
| 17 |
+
"video": 0
|
| 18 |
+
},
|
| 19 |
+
"oom": false,
|
| 20 |
+
"allocator_warning": false,
|
| 21 |
+
"wall_seconds": 92.90461822296493
|
| 22 |
+
}
|
benchmarks/rtx3090-performance.json
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"runtime": "vLLM main 7ca49fbe4bab019e55d57cdc4b7fd3d55c67c1a6",
|
| 3 |
+
"gpu": "RTX 3090 24 GB (physical CUDA:1 in the reference run)",
|
| 4 |
+
"profile": {
|
| 5 |
+
"max_model_len": 1024,
|
| 6 |
+
"max_num_seqs": 32,
|
| 7 |
+
"max_num_batched_tokens": 8192,
|
| 8 |
+
"gpu_memory_utilization": 0.96,
|
| 9 |
+
"cuda_graphs": true,
|
| 10 |
+
"prefix_caching": false,
|
| 11 |
+
"limit_mm_per_prompt": {
|
| 12 |
+
"image": 1,
|
| 13 |
+
"video": 0
|
| 14 |
+
}
|
| 15 |
+
},
|
| 16 |
+
"method": "Three repetitions per point; short unique prompts; fixed 128-token greedy ignore-EOS outputs; output tokens divided by end-to-end batch completion time after warmup.",
|
| 17 |
+
"records": [
|
| 18 |
+
{
|
| 19 |
+
"workload": "text",
|
| 20 |
+
"concurrency": 1,
|
| 21 |
+
"repeats": 3,
|
| 22 |
+
"output_tokens_per_request": 128,
|
| 23 |
+
"total_verified_output_tokens": 384,
|
| 24 |
+
"aggregate_output_tok_s": 156.57567204605067,
|
| 25 |
+
"per_request_output_tok_s": 156.57567204605067,
|
| 26 |
+
"mean_completion_seconds": 0.8174960920005105,
|
| 27 |
+
"mean_tpot_ms": 6.386688218753989,
|
| 28 |
+
"peak_observed_gpu_memory_mib": 23010,
|
| 29 |
+
"runs": [
|
| 30 |
+
{
|
| 31 |
+
"generated_tokens": 128,
|
| 32 |
+
"wall_seconds": 0.81746169104008,
|
| 33 |
+
"output_tok_s": 156.58226116644306,
|
| 34 |
+
"gpu_memory_mib_after": 23010
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"generated_tokens": 128,
|
| 38 |
+
"wall_seconds": 0.8176816419581883,
|
| 39 |
+
"output_tok_s": 156.54014158060946,
|
| 40 |
+
"gpu_memory_mib_after": 23010
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"generated_tokens": 128,
|
| 44 |
+
"wall_seconds": 0.8173449430032633,
|
| 45 |
+
"output_tok_s": 156.60462708642333,
|
| 46 |
+
"gpu_memory_mib_after": 23010
|
| 47 |
+
}
|
| 48 |
+
]
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"workload": "one_image_per_request",
|
| 52 |
+
"concurrency": 1,
|
| 53 |
+
"repeats": 3,
|
| 54 |
+
"output_tokens_per_request": 128,
|
| 55 |
+
"total_verified_output_tokens": 384,
|
| 56 |
+
"aggregate_output_tok_s": 127.90552416322762,
|
| 57 |
+
"per_request_output_tok_s": 127.90552416322762,
|
| 58 |
+
"mean_completion_seconds": 1.0007386376576808,
|
| 59 |
+
"mean_tpot_ms": 7.818270606700632,
|
| 60 |
+
"peak_observed_gpu_memory_mib": 23010,
|
| 61 |
+
"runs": [
|
| 62 |
+
{
|
| 63 |
+
"generated_tokens": 128,
|
| 64 |
+
"wall_seconds": 0.9040946460445412,
|
| 65 |
+
"output_tok_s": 141.5780975587084,
|
| 66 |
+
"gpu_memory_mib_after": 23010
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"generated_tokens": 128,
|
| 70 |
+
"wall_seconds": 1.0513607729808427,
|
| 71 |
+
"output_tok_s": 121.74698095030823,
|
| 72 |
+
"gpu_memory_mib_after": 23010
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"generated_tokens": 128,
|
| 76 |
+
"wall_seconds": 1.0467604939476587,
|
| 77 |
+
"output_tok_s": 122.28203179246121,
|
| 78 |
+
"gpu_memory_mib_after": 23010
|
| 79 |
+
}
|
| 80 |
+
]
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"workload": "text",
|
| 84 |
+
"concurrency": 4,
|
| 85 |
+
"repeats": 3,
|
| 86 |
+
"output_tokens_per_request": 128,
|
| 87 |
+
"total_verified_output_tokens": 1536,
|
| 88 |
+
"aggregate_output_tok_s": 486.91511429228393,
|
| 89 |
+
"per_request_output_tok_s": 121.72877857307098,
|
| 90 |
+
"mean_completion_seconds": 1.0515179853149068,
|
| 91 |
+
"mean_tpot_ms": 8.21498426027271,
|
| 92 |
+
"peak_observed_gpu_memory_mib": 23054,
|
| 93 |
+
"runs": [
|
| 94 |
+
{
|
| 95 |
+
"generated_tokens": 512,
|
| 96 |
+
"wall_seconds": 1.0211215899907984,
|
| 97 |
+
"output_tok_s": 501.409435486144,
|
| 98 |
+
"gpu_memory_mib_after": 23010
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"generated_tokens": 512,
|
| 102 |
+
"wall_seconds": 1.0497098179766908,
|
| 103 |
+
"output_tok_s": 487.7538451406283,
|
| 104 |
+
"gpu_memory_mib_after": 23010
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"generated_tokens": 512,
|
| 108 |
+
"wall_seconds": 1.0837225479772314,
|
| 109 |
+
"output_tok_s": 472.4456466792614,
|
| 110 |
+
"gpu_memory_mib_after": 23054
|
| 111 |
+
}
|
| 112 |
+
]
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"workload": "one_image_per_request",
|
| 116 |
+
"concurrency": 4,
|
| 117 |
+
"repeats": 3,
|
| 118 |
+
"output_tokens_per_request": 128,
|
| 119 |
+
"total_verified_output_tokens": 1536,
|
| 120 |
+
"aggregate_output_tok_s": 262.6200812679751,
|
| 121 |
+
"per_request_output_tok_s": 65.65502031699377,
|
| 122 |
+
"mean_completion_seconds": 1.949584348340674,
|
| 123 |
+
"mean_tpot_ms": 15.231127721411514,
|
| 124 |
+
"peak_observed_gpu_memory_mib": 23054,
|
| 125 |
+
"runs": [
|
| 126 |
+
{
|
| 127 |
+
"generated_tokens": 512,
|
| 128 |
+
"wall_seconds": 1.9419829859980382,
|
| 129 |
+
"output_tok_s": 263.64803589505664,
|
| 130 |
+
"gpu_memory_mib_after": 23010
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"generated_tokens": 512,
|
| 134 |
+
"wall_seconds": 1.9698979230015539,
|
| 135 |
+
"output_tok_s": 259.911944685875,
|
| 136 |
+
"gpu_memory_mib_after": 23054
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"generated_tokens": 512,
|
| 140 |
+
"wall_seconds": 1.93687213602243,
|
| 141 |
+
"output_tok_s": 264.3437274344014,
|
| 142 |
+
"gpu_memory_mib_after": 23054
|
| 143 |
+
}
|
| 144 |
+
]
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"workload": "text",
|
| 148 |
+
"concurrency": 8,
|
| 149 |
+
"repeats": 3,
|
| 150 |
+
"output_tokens_per_request": 128,
|
| 151 |
+
"total_verified_output_tokens": 3072,
|
| 152 |
+
"aggregate_output_tok_s": 820.4449600227697,
|
| 153 |
+
"per_request_output_tok_s": 102.55562000284621,
|
| 154 |
+
"mean_completion_seconds": 1.2481032243425336,
|
| 155 |
+
"mean_tpot_ms": 9.750806440176044,
|
| 156 |
+
"peak_observed_gpu_memory_mib": 23138,
|
| 157 |
+
"runs": [
|
| 158 |
+
{
|
| 159 |
+
"generated_tokens": 1024,
|
| 160 |
+
"wall_seconds": 1.2773179819923826,
|
| 161 |
+
"output_tok_s": 801.6797809444029,
|
| 162 |
+
"gpu_memory_mib_after": 23054
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"generated_tokens": 1024,
|
| 166 |
+
"wall_seconds": 1.277832499006763,
|
| 167 |
+
"output_tok_s": 801.3569859867684,
|
| 168 |
+
"gpu_memory_mib_after": 23138
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"generated_tokens": 1024,
|
| 172 |
+
"wall_seconds": 1.1891591920284554,
|
| 173 |
+
"output_tok_s": 861.1126305581269,
|
| 174 |
+
"gpu_memory_mib_after": 23138
|
| 175 |
+
}
|
| 176 |
+
]
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"workload": "one_image_per_request",
|
| 180 |
+
"concurrency": 8,
|
| 181 |
+
"repeats": 3,
|
| 182 |
+
"output_tokens_per_request": 128,
|
| 183 |
+
"total_verified_output_tokens": 3072,
|
| 184 |
+
"aggregate_output_tok_s": 429.9295467387298,
|
| 185 |
+
"per_request_output_tok_s": 53.74119334234123,
|
| 186 |
+
"mean_completion_seconds": 2.3817855920060538,
|
| 187 |
+
"mean_tpot_ms": 18.607699937547295,
|
| 188 |
+
"peak_observed_gpu_memory_mib": 23138,
|
| 189 |
+
"runs": [
|
| 190 |
+
{
|
| 191 |
+
"generated_tokens": 1024,
|
| 192 |
+
"wall_seconds": 1.7241748640080914,
|
| 193 |
+
"output_tok_s": 593.9072778381453,
|
| 194 |
+
"gpu_memory_mib_after": 23138
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"generated_tokens": 1024,
|
| 198 |
+
"wall_seconds": 2.370788298023399,
|
| 199 |
+
"output_tok_s": 431.92384611217335,
|
| 200 |
+
"gpu_memory_mib_after": 23138
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"generated_tokens": 1024,
|
| 204 |
+
"wall_seconds": 3.050393613986671,
|
| 205 |
+
"output_tok_s": 335.6943822937319,
|
| 206 |
+
"gpu_memory_mib_after": 23138
|
| 207 |
+
}
|
| 208 |
+
]
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"workload": "text",
|
| 212 |
+
"concurrency": 16,
|
| 213 |
+
"repeats": 3,
|
| 214 |
+
"output_tokens_per_request": 128,
|
| 215 |
+
"total_verified_output_tokens": 6144,
|
| 216 |
+
"aggregate_output_tok_s": 1269.7205057297842,
|
| 217 |
+
"per_request_output_tok_s": 79.35753160811151,
|
| 218 |
+
"mean_completion_seconds": 1.6129533946708154,
|
| 219 |
+
"mean_tpot_ms": 12.601198395865746,
|
| 220 |
+
"peak_observed_gpu_memory_mib": 23430,
|
| 221 |
+
"runs": [
|
| 222 |
+
{
|
| 223 |
+
"generated_tokens": 2048,
|
| 224 |
+
"wall_seconds": 1.631988351000473,
|
| 225 |
+
"output_tok_s": 1254.9109181719928,
|
| 226 |
+
"gpu_memory_mib_after": 23138
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
"generated_tokens": 2048,
|
| 230 |
+
"wall_seconds": 1.5828196799848229,
|
| 231 |
+
"output_tok_s": 1293.8934395986519,
|
| 232 |
+
"gpu_memory_mib_after": 23430
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"generated_tokens": 2048,
|
| 236 |
+
"wall_seconds": 1.6240521530271508,
|
| 237 |
+
"output_tok_s": 1261.0432467840592,
|
| 238 |
+
"gpu_memory_mib_after": 23430
|
| 239 |
+
}
|
| 240 |
+
]
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"workload": "one_image_per_request",
|
| 244 |
+
"concurrency": 16,
|
| 245 |
+
"repeats": 3,
|
| 246 |
+
"output_tokens_per_request": 128,
|
| 247 |
+
"total_verified_output_tokens": 6144,
|
| 248 |
+
"aggregate_output_tok_s": 518.5347963568223,
|
| 249 |
+
"per_request_output_tok_s": 32.408424772301395,
|
| 250 |
+
"mean_completion_seconds": 3.9495902963293097,
|
| 251 |
+
"mean_tpot_ms": 30.856174190072732,
|
| 252 |
+
"peak_observed_gpu_memory_mib": 23522,
|
| 253 |
+
"runs": [
|
| 254 |
+
{
|
| 255 |
+
"generated_tokens": 2048,
|
| 256 |
+
"wall_seconds": 2.9401068949955516,
|
| 257 |
+
"output_tok_s": 696.5733128567418,
|
| 258 |
+
"gpu_memory_mib_after": 23430
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"generated_tokens": 2048,
|
| 262 |
+
"wall_seconds": 3.787013527995441,
|
| 263 |
+
"output_tok_s": 540.7955331715059,
|
| 264 |
+
"gpu_memory_mib_after": 23430
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"generated_tokens": 2048,
|
| 268 |
+
"wall_seconds": 5.121650465996936,
|
| 269 |
+
"output_tok_s": 399.8710988961161,
|
| 270 |
+
"gpu_memory_mib_after": 23522
|
| 271 |
+
}
|
| 272 |
+
]
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"workload": "text",
|
| 276 |
+
"concurrency": 32,
|
| 277 |
+
"repeats": 3,
|
| 278 |
+
"output_tokens_per_request": 128,
|
| 279 |
+
"total_verified_output_tokens": 12288,
|
| 280 |
+
"aggregate_output_tok_s": 1948.2966906600047,
|
| 281 |
+
"per_request_output_tok_s": 60.88427158312515,
|
| 282 |
+
"mean_completion_seconds": 2.1023492056604787,
|
| 283 |
+
"mean_tpot_ms": 16.42460316922249,
|
| 284 |
+
"peak_observed_gpu_memory_mib": 23914,
|
| 285 |
+
"runs": [
|
| 286 |
+
{
|
| 287 |
+
"generated_tokens": 4096,
|
| 288 |
+
"wall_seconds": 2.0827834619558416,
|
| 289 |
+
"output_tok_s": 1966.5990607365604,
|
| 290 |
+
"gpu_memory_mib_after": 23522
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"generated_tokens": 4096,
|
| 294 |
+
"wall_seconds": 2.070148140017409,
|
| 295 |
+
"output_tok_s": 1978.602362227833,
|
| 296 |
+
"gpu_memory_mib_after": 23914
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"generated_tokens": 4096,
|
| 300 |
+
"wall_seconds": 2.154116015008185,
|
| 301 |
+
"output_tok_s": 1901.4760446801824,
|
| 302 |
+
"gpu_memory_mib_after": 23914
|
| 303 |
+
}
|
| 304 |
+
]
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"workload": "one_image_per_request",
|
| 308 |
+
"concurrency": 32,
|
| 309 |
+
"repeats": 3,
|
| 310 |
+
"output_tokens_per_request": 128,
|
| 311 |
+
"total_verified_output_tokens": 12288,
|
| 312 |
+
"aggregate_output_tok_s": 461.6294772584143,
|
| 313 |
+
"per_request_output_tok_s": 14.425921164325446,
|
| 314 |
+
"mean_completion_seconds": 8.872916921003101,
|
| 315 |
+
"mean_tpot_ms": 69.31966344533672,
|
| 316 |
+
"peak_observed_gpu_memory_mib": 23914,
|
| 317 |
+
"runs": [
|
| 318 |
+
{
|
| 319 |
+
"generated_tokens": 4096,
|
| 320 |
+
"wall_seconds": 8.780865803011693,
|
| 321 |
+
"output_tok_s": 466.46880750587707,
|
| 322 |
+
"gpu_memory_mib_after": 23914
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"generated_tokens": 4096,
|
| 326 |
+
"wall_seconds": 8.837103814992588,
|
| 327 |
+
"output_tok_s": 463.5002695171388,
|
| 328 |
+
"gpu_memory_mib_after": 23914
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"generated_tokens": 4096,
|
| 332 |
+
"wall_seconds": 9.000781145005021,
|
| 333 |
+
"output_tok_s": 455.07161367578334,
|
| 334 |
+
"gpu_memory_mib_after": 23914
|
| 335 |
+
}
|
| 336 |
+
]
|
| 337 |
+
}
|
| 338 |
+
]
|
| 339 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{#
|
| 2 |
+
Template: Google Gemma 4 Canonical Chat Template
|
| 3 |
+
Author: Google Gemma Engineering Team
|
| 4 |
+
Published: 2026-07-09
|
| 5 |
+
Context: Fixed tool-calling loops, turn closures, and thinking content-ordering.
|
| 6 |
+
#}
|
| 7 |
+
{%- macro format_parameters(properties, required, filter_keys=false) -%}
|
| 8 |
+
{%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
|
| 9 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 10 |
+
{%- for key, value in properties | dictsort -%}
|
| 11 |
+
{%- set add_comma = false -%}
|
| 12 |
+
{%- if not filter_keys or key not in standard_keys -%}
|
| 13 |
+
{%- if ns.found_first %},{% endif -%}
|
| 14 |
+
{%- set ns.found_first = true -%}
|
| 15 |
+
{{ key }}:{
|
| 16 |
+
{%- if value['description'] -%}
|
| 17 |
+
description:<|"|>{{ value['description'] }}<|"|>
|
| 18 |
+
{%- set add_comma = true -%}
|
| 19 |
+
{%- endif -%}
|
| 20 |
+
{%- if value['type'] | upper == 'STRING' -%}
|
| 21 |
+
{%- if value['enum'] -%}
|
| 22 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 23 |
+
enum:{{ format_argument(value['enum']) }}
|
| 24 |
+
{%- endif -%}
|
| 25 |
+
{%- elif value['type'] | upper == 'ARRAY' -%}
|
| 26 |
+
{%- if value['items'] is mapping and value['items'] -%}
|
| 27 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 28 |
+
items:{
|
| 29 |
+
{%- set ns_items = namespace(found_first=false) -%}
|
| 30 |
+
{%- for item_key, item_value in value['items'] | dictsort -%}
|
| 31 |
+
{%- if item_value is not none -%}
|
| 32 |
+
{%- if ns_items.found_first %},{% endif -%}
|
| 33 |
+
{%- set ns_items.found_first = true -%}
|
| 34 |
+
{%- if item_key == 'properties' -%}
|
| 35 |
+
properties:{
|
| 36 |
+
{%- if item_value is mapping -%}
|
| 37 |
+
{{- format_parameters(item_value, value['items']['required'] | default([])) -}}
|
| 38 |
+
{%- endif -%}
|
| 39 |
+
}
|
| 40 |
+
{%- elif item_key == 'required' -%}
|
| 41 |
+
required:[
|
| 42 |
+
{%- for req_item in item_value -%}
|
| 43 |
+
<|"|>{{- req_item -}}<|"|>
|
| 44 |
+
{%- if not loop.last %},{% endif -%}
|
| 45 |
+
{%- endfor -%}
|
| 46 |
+
]
|
| 47 |
+
{%- elif item_key == 'type' -%}
|
| 48 |
+
{%- if item_value is string -%}
|
| 49 |
+
type:{{ format_argument(item_value | upper) }}
|
| 50 |
+
{%- else -%}
|
| 51 |
+
type:{{ format_argument(item_value | map('upper') | list) }}
|
| 52 |
+
{%- endif -%}
|
| 53 |
+
{%- else -%}
|
| 54 |
+
{{ item_key }}:{{ format_argument(item_value) }}
|
| 55 |
+
{%- endif -%}
|
| 56 |
+
{%- endif -%}
|
| 57 |
+
{%- endfor -%}
|
| 58 |
+
}
|
| 59 |
+
{%- endif -%}
|
| 60 |
+
{%- endif -%}
|
| 61 |
+
{%- if value['nullable'] %}
|
| 62 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 63 |
+
nullable:true
|
| 64 |
+
{%- endif -%}
|
| 65 |
+
{%- if value['type'] | upper == 'OBJECT' -%}
|
| 66 |
+
{%- if value['properties'] is defined and value['properties'] is mapping -%}
|
| 67 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 68 |
+
properties:{
|
| 69 |
+
{{- format_parameters(value['properties'], value['required'] | default([])) -}}
|
| 70 |
+
}
|
| 71 |
+
{%- elif value is mapping -%}
|
| 72 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 73 |
+
properties:{
|
| 74 |
+
{{- format_parameters(value, value['required'] | default([]), filter_keys=true) -}}
|
| 75 |
+
}
|
| 76 |
+
{%- endif -%}
|
| 77 |
+
{%- if value['required'] -%}
|
| 78 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 79 |
+
required:[
|
| 80 |
+
{%- for item in value['required'] | default([]) -%}
|
| 81 |
+
<|"|>{{- item -}}<|"|>
|
| 82 |
+
{%- if not loop.last %},{% endif -%}
|
| 83 |
+
{%- endfor -%}
|
| 84 |
+
]
|
| 85 |
+
{%- endif -%}
|
| 86 |
+
{%- endif -%}
|
| 87 |
+
{%- if add_comma %},{%- else -%} {%- set add_comma = true -%} {% endif -%}
|
| 88 |
+
type:<|"|>{{ value['type'] | upper }}<|"|>}
|
| 89 |
+
{%- endif -%}
|
| 90 |
+
{%- endfor -%}
|
| 91 |
+
{%- endmacro -%}
|
| 92 |
+
{%- macro format_function_declaration(tool_data) -%}
|
| 93 |
+
declaration:{{- tool_data['function']['name'] -}}{description:<|"|>{{- tool_data['function']['description'] -}}<|"|>
|
| 94 |
+
{%- set params = tool_data['function']['parameters'] -%}
|
| 95 |
+
{%- if params -%}
|
| 96 |
+
,parameters:{
|
| 97 |
+
{%- if params['properties'] -%}
|
| 98 |
+
properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
|
| 99 |
+
{%- endif -%}
|
| 100 |
+
{%- if params['required'] -%}
|
| 101 |
+
required:[
|
| 102 |
+
{%- for item in params['required'] -%}
|
| 103 |
+
<|"|>{{- item -}}<|"|>
|
| 104 |
+
{{- ',' if not loop.last -}}
|
| 105 |
+
{%- endfor -%}
|
| 106 |
+
],
|
| 107 |
+
{%- endif -%}
|
| 108 |
+
{%- if params['type'] -%}
|
| 109 |
+
type:<|"|>{{- params['type'] | upper -}}<|"|>}
|
| 110 |
+
{%- endif -%}
|
| 111 |
+
{%- endif -%}
|
| 112 |
+
{%- if 'response' in tool_data['function'] -%}
|
| 113 |
+
{%- set response_declaration = tool_data['function']['response'] -%}
|
| 114 |
+
,response:{
|
| 115 |
+
{%- if response_declaration['description'] -%}
|
| 116 |
+
description:<|"|>{{- response_declaration['description'] -}}<|"|>,
|
| 117 |
+
{%- endif -%}
|
| 118 |
+
{%- if response_declaration['type'] | upper == 'OBJECT' -%}
|
| 119 |
+
type:<|"|>{{- response_declaration['type'] | upper -}}<|"|>}
|
| 120 |
+
{%- endif -%}
|
| 121 |
+
{%- endif -%}
|
| 122 |
+
}
|
| 123 |
+
{%- endmacro -%}
|
| 124 |
+
{%- macro format_argument(argument, escape_keys=True) -%}
|
| 125 |
+
{%- if argument is none -%}
|
| 126 |
+
{{- 'null' -}}
|
| 127 |
+
{%- elif argument is string -%}
|
| 128 |
+
{{- '<|"|>' + argument + '<|"|>' -}}
|
| 129 |
+
{%- elif argument is boolean -%}
|
| 130 |
+
{{- 'true' if argument else 'false' -}}
|
| 131 |
+
{%- elif argument is mapping -%}
|
| 132 |
+
{{- '{' -}}
|
| 133 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 134 |
+
{%- for key, value in argument | dictsort -%}
|
| 135 |
+
{%- if ns.found_first %},{% endif -%}
|
| 136 |
+
{%- set ns.found_first = true -%}
|
| 137 |
+
{%- if escape_keys -%}
|
| 138 |
+
{{- '<|"|>' + key + '<|"|>' -}}
|
| 139 |
+
{%- else -%}
|
| 140 |
+
{{- key -}}
|
| 141 |
+
{%- endif -%}
|
| 142 |
+
:{{- format_argument(value, escape_keys=escape_keys) -}}
|
| 143 |
+
{%- endfor -%}
|
| 144 |
+
{{- '}' -}}
|
| 145 |
+
{%- elif argument is sequence -%}
|
| 146 |
+
{{- '[' -}}
|
| 147 |
+
{%- for item in argument -%}
|
| 148 |
+
{{- format_argument(item, escape_keys=escape_keys) -}}
|
| 149 |
+
{%- if not loop.last %},{% endif -%}
|
| 150 |
+
{%- endfor -%}
|
| 151 |
+
{{- ']' -}}
|
| 152 |
+
{%- else -%}
|
| 153 |
+
{{- argument -}}
|
| 154 |
+
{%- endif -%}
|
| 155 |
+
{%- endmacro -%}
|
| 156 |
+
{%- macro strip_thinking(text) -%}
|
| 157 |
+
{%- set ns = namespace(result='') -%}
|
| 158 |
+
{%- for part in text.split('<channel|>') -%}
|
| 159 |
+
{%- if '<|channel>' in part -%}
|
| 160 |
+
{%- set ns.result = ns.result + part.split('<|channel>')[0] -%}
|
| 161 |
+
{%- else -%}
|
| 162 |
+
{%- set ns.result = ns.result + part -%}
|
| 163 |
+
{%- endif -%}
|
| 164 |
+
{%- endfor -%}
|
| 165 |
+
{{- ns.result | trim -}}
|
| 166 |
+
{%- endmacro -%}
|
| 167 |
+
|
| 168 |
+
{%- macro format_tool_response_block(tool_name, response) -%}
|
| 169 |
+
{{- '<|tool_response>' -}}
|
| 170 |
+
{%- if response is mapping -%}
|
| 171 |
+
{{- 'response:' + tool_name + '{' -}}
|
| 172 |
+
{%- for key, value in response | dictsort -%}
|
| 173 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 174 |
+
{%- if not loop.last %},{% endif -%}
|
| 175 |
+
{%- endfor -%}
|
| 176 |
+
{{- '}' -}}
|
| 177 |
+
{%- else -%}
|
| 178 |
+
{{- 'response:' + tool_name + '{value:' + format_argument(response, escape_keys=False) + '}' -}}
|
| 179 |
+
{%- endif -%}
|
| 180 |
+
{{- '<tool_response|>' -}}
|
| 181 |
+
{%- endmacro -%}
|
| 182 |
+
|
| 183 |
+
{#- ===== SETUP ===== -#}
|
| 184 |
+
{%- set ns = namespace(prev_message_type=None, prev_non_tool_role=None) -%}
|
| 185 |
+
{%- set loop_messages = messages -%}
|
| 186 |
+
{%- set enable_thinking = enable_thinking | default(false) -%}
|
| 187 |
+
{%- set preserve_thinking = preserve_thinking | default(false) -%}
|
| 188 |
+
{{- bos_token -}}
|
| 189 |
+
{#- Handle System/Tool Definitions Block -#}
|
| 190 |
+
{%- if enable_thinking or tools or (messages and messages[0]['role'] in ['system', 'developer']) -%}
|
| 191 |
+
{{- '<|turn>system\n' -}}
|
| 192 |
+
{#- Inject Thinking token at the very top of the FIRST system turn -#}
|
| 193 |
+
{%- if enable_thinking -%}
|
| 194 |
+
{{- '<|think|>\n' -}}
|
| 195 |
+
{%- set ns.prev_message_type = 'think' -%}
|
| 196 |
+
{%- endif -%}
|
| 197 |
+
{%- if messages and messages[0]['role'] in ['system', 'developer'] -%}
|
| 198 |
+
{%- if messages[0]['content'] is string -%}
|
| 199 |
+
{{- messages[0]['content'] | trim -}}
|
| 200 |
+
{%- elif messages[0]['content'] is sequence -%}
|
| 201 |
+
{%- for item in messages[0]['content'] -%}
|
| 202 |
+
{{- item['text'] | trim + ' '-}}
|
| 203 |
+
{%- endfor -%}
|
| 204 |
+
{%- endif -%}
|
| 205 |
+
{%- set loop_messages = messages[1:] -%}
|
| 206 |
+
{%- endif -%}
|
| 207 |
+
{%- if tools -%}
|
| 208 |
+
{%- for tool in tools %}
|
| 209 |
+
{{- '<|tool>' -}}
|
| 210 |
+
{{- format_function_declaration(tool) | trim -}}
|
| 211 |
+
{{- '<tool|>' -}}
|
| 212 |
+
{%- endfor %}
|
| 213 |
+
{%- set ns.prev_message_type = 'tool' -%}
|
| 214 |
+
{%- endif -%}
|
| 215 |
+
{{- '<turn|>\n' -}}
|
| 216 |
+
{%- endif %}
|
| 217 |
+
|
| 218 |
+
{#- Pre-scan: find last user message index for reasoning guard -#}
|
| 219 |
+
{%- set ns_turn = namespace(last_user_idx=-1) -%}
|
| 220 |
+
{%- for i in range(loop_messages | length) -%}
|
| 221 |
+
{%- if loop_messages[i]['role'] == 'user' -%}
|
| 222 |
+
{%- set ns_turn.last_user_idx = i -%}
|
| 223 |
+
{%- endif -%}
|
| 224 |
+
{%- endfor -%}
|
| 225 |
+
|
| 226 |
+
{#- Loop through messages -#}
|
| 227 |
+
{%- for message in loop_messages -%}
|
| 228 |
+
{%- if message['role'] != 'tool' -%}
|
| 229 |
+
{%- set ns.prev_message_type = None -%}
|
| 230 |
+
{%- set role = 'model' if message['role'] == 'assistant' else message['role'] -%}
|
| 231 |
+
{#- Detect continuation using tracked state — O(1) instead of O(n) backward scan -#}
|
| 232 |
+
{%- set continue_same_model_turn = (role == 'model' and ns.prev_non_tool_role == 'assistant') -%}
|
| 233 |
+
{%- if not continue_same_model_turn -%}
|
| 234 |
+
{{- '<|turn>' + role + '\n' }}
|
| 235 |
+
|
| 236 |
+
{%- endif -%}
|
| 237 |
+
|
| 238 |
+
{#- Render reasoning/reasoning_content as thinking channel -#}
|
| 239 |
+
{%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
|
| 240 |
+
{%- set thinking_gate = (loop.index0 > ns_turn.last_user_idx) or (preserve_thinking and message.get('tool_calls')) -%}
|
| 241 |
+
{%- if thinking_text and thinking_gate -%}
|
| 242 |
+
{{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
|
| 243 |
+
{%- endif -%}
|
| 244 |
+
|
| 245 |
+
{%- if message.get('tool_calls') -%}
|
| 246 |
+
{%- for tool_call in message.get('tool_calls') -%}
|
| 247 |
+
{%- set function = tool_call['function'] -%}
|
| 248 |
+
{{- '<|tool_call>call:' + function['name'] + '{' -}}
|
| 249 |
+
{%- if function['arguments'] is mapping -%}
|
| 250 |
+
{%- set ns_args = namespace(found_first=false) -%}
|
| 251 |
+
{%- for key, value in function['arguments'] | dictsort -%}
|
| 252 |
+
{%- if ns_args.found_first %},{% endif -%}
|
| 253 |
+
{%- set ns_args.found_first = true -%}
|
| 254 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 255 |
+
{%- endfor -%}
|
| 256 |
+
{%- elif function['arguments'] is none -%}
|
| 257 |
+
{%- else -%}
|
| 258 |
+
{{- raise_exception(
|
| 259 |
+
"chat_template: tool_calls[].function.arguments must be a "
|
| 260 |
+
"JSON object (mapping), not a string. Deserialize arguments "
|
| 261 |
+
"before passing to the template."
|
| 262 |
+
) -}}
|
| 263 |
+
{%- endif -%}
|
| 264 |
+
{{- '}<tool_call|>' -}}
|
| 265 |
+
{%- endfor -%}
|
| 266 |
+
{%- set ns.prev_message_type = 'tool_call' -%}
|
| 267 |
+
{%- endif -%}
|
| 268 |
+
|
| 269 |
+
{%- set ns_tr_out = namespace(flag=false) -%}
|
| 270 |
+
{%- if message.get('tool_responses') -%}
|
| 271 |
+
{#- Legacy: tool_responses embedded on the assistant message (Google/Gemma native) -#}
|
| 272 |
+
{%- for tool_response in message.get('tool_responses') -%}
|
| 273 |
+
{{- format_tool_response_block(tool_response['name'] | default('unknown', true), tool_response['response']) -}}
|
| 274 |
+
{%- set ns_tr_out.flag = true -%}
|
| 275 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 276 |
+
{%- endfor -%}
|
| 277 |
+
{%- elif message.get('tool_calls') -%}
|
| 278 |
+
{#- OpenAI Chat Completions: forward-scan consecutive role:tool messages -#}
|
| 279 |
+
{%- set ns_tool_scan = namespace(stopped=false) -%}
|
| 280 |
+
{%- for k in range(loop.index0 + 1, loop_messages | length) -%}
|
| 281 |
+
{%- if ns_tool_scan.stopped -%}
|
| 282 |
+
{%- elif loop_messages[k]['role'] != 'tool' -%}
|
| 283 |
+
{%- set ns_tool_scan.stopped = true -%}
|
| 284 |
+
{%- else -%}
|
| 285 |
+
{%- set follow = loop_messages[k] -%}
|
| 286 |
+
{#- Resolve tool_call_id to function name -#}
|
| 287 |
+
{%- set ns_tname = namespace(name=follow.get('name') or 'unknown') -%}
|
| 288 |
+
{%- for tc in message.get('tool_calls') -%}
|
| 289 |
+
{%- if tc.get('id') == follow.get('tool_call_id') -%}
|
| 290 |
+
{%- set ns_tname.name = tc['function']['name'] -%}
|
| 291 |
+
{%- endif -%}
|
| 292 |
+
{%- endfor -%}
|
| 293 |
+
{#- Handle content as string or content-parts array -#}
|
| 294 |
+
{%- set tool_body = follow.get('content') -%}
|
| 295 |
+
{%- if tool_body is string -%}
|
| 296 |
+
{{- format_tool_response_block(ns_tname.name, tool_body) -}}
|
| 297 |
+
{%- elif tool_body is sequence and tool_body is not string -%}
|
| 298 |
+
{%- set ns_txt = namespace(s='') -%}
|
| 299 |
+
{%- for part in tool_body -%}
|
| 300 |
+
{%- if part.get('type') == 'text' -%}
|
| 301 |
+
{%- set ns_txt.s = ns_txt.s + (part.get('text') | default('')) -%}
|
| 302 |
+
{%- endif -%}
|
| 303 |
+
{%- endfor -%}
|
| 304 |
+
{{- format_tool_response_block(ns_tname.name, ns_txt.s) -}}
|
| 305 |
+
{%- for part in tool_body -%}
|
| 306 |
+
{%- if part.get('type') in ['image', 'image_url'] -%}
|
| 307 |
+
{{- '<|image|>' -}}
|
| 308 |
+
{%- elif part.get('type') in ['audio', 'input_audio'] -%}
|
| 309 |
+
{{- '<|audio|>' -}}
|
| 310 |
+
{%- elif part.get('type') == 'video' -%}
|
| 311 |
+
{{- '<|video|>' -}}
|
| 312 |
+
{%- endif -%}
|
| 313 |
+
{%- endfor -%}
|
| 314 |
+
{%- else -%}
|
| 315 |
+
{{- format_tool_response_block(ns_tname.name, tool_body) -}}
|
| 316 |
+
{%- endif -%}
|
| 317 |
+
{%- set ns_tr_out.flag = true -%}
|
| 318 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 319 |
+
{%- endif -%}
|
| 320 |
+
{%- endfor -%}
|
| 321 |
+
{%- endif -%}
|
| 322 |
+
|
| 323 |
+
{%- set captured_content -%}
|
| 324 |
+
{%- if message.get('content') is string -%}
|
| 325 |
+
{%- if role == 'model' -%}
|
| 326 |
+
{{- strip_thinking(message['content']) -}}
|
| 327 |
+
{%- else -%}
|
| 328 |
+
{{- message['content'] | trim -}}
|
| 329 |
+
{%- endif -%}
|
| 330 |
+
{%- elif message.get('content') is sequence -%}
|
| 331 |
+
{%- for item in message['content'] -%}
|
| 332 |
+
{%- if item.get('type') == 'text' -%}
|
| 333 |
+
{%- if role == 'model' -%}
|
| 334 |
+
{{- strip_thinking(item['text']) -}}
|
| 335 |
+
{%- else -%}
|
| 336 |
+
{{- item['text'] | trim -}}
|
| 337 |
+
{%- endif -%}
|
| 338 |
+
{%- elif item.get('type') in ['image', 'image_url'] -%}
|
| 339 |
+
{{- '<|image|>' -}}
|
| 340 |
+
{%- elif item.get('type') in ['audio', 'input_audio'] -%}
|
| 341 |
+
{{- '<|audio|>' -}}
|
| 342 |
+
{%- elif item.get('type') == 'video' -%}
|
| 343 |
+
{{- '<|video|>' -}}
|
| 344 |
+
{%- endif -%}
|
| 345 |
+
{%- endfor -%}
|
| 346 |
+
{%- endif -%}
|
| 347 |
+
{%- endset -%}
|
| 348 |
+
|
| 349 |
+
{{- captured_content -}}
|
| 350 |
+
{%- set has_content = captured_content | trim | length > 0 -%}
|
| 351 |
+
|
| 352 |
+
{#- Forward-scan: find next non-tool message role for continuation detection -#}
|
| 353 |
+
{%- set next_nt = namespace(role=None, found=false) -%}
|
| 354 |
+
{%- for j in range(loop.index0 + 1, loop_messages | length) -%}
|
| 355 |
+
{%- if not next_nt.found -%}
|
| 356 |
+
{%- if loop_messages[j]['role'] != 'tool' -%}
|
| 357 |
+
{%- set next_nt.role = loop_messages[j]['role'] -%}
|
| 358 |
+
{%- set next_nt.found = true -%}
|
| 359 |
+
{%- endif -%}
|
| 360 |
+
{%- endif -%}
|
| 361 |
+
{%- endfor -%}
|
| 362 |
+
|
| 363 |
+
{%- set continues_into_next = (
|
| 364 |
+
role == 'model'
|
| 365 |
+
and next_nt.role == 'assistant'
|
| 366 |
+
and (not message.get('tool_calls') or ns_tr_out.flag)
|
| 367 |
+
) -%}
|
| 368 |
+
|
| 369 |
+
{%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
|
| 370 |
+
{{- '<|tool_response>' -}}
|
| 371 |
+
{%- elif continues_into_next -%}
|
| 372 |
+
{%- elif not (ns_tr_out.flag and not has_content and not next_nt.found) -%}
|
| 373 |
+
{{- '<turn|>\n' -}}
|
| 374 |
+
{%- endif -%}
|
| 375 |
+
|
| 376 |
+
{#- Track previous non-tool role for next iteration (avoids O(n) backward scan) -#}
|
| 377 |
+
{%- set ns.prev_non_tool_role = message['role'] -%}
|
| 378 |
+
{%- endif -%}
|
| 379 |
+
{%- endfor -%}
|
| 380 |
+
|
| 381 |
+
{%- if add_generation_prompt -%}
|
| 382 |
+
{%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
|
| 383 |
+
{{- '<|turn>model\n' -}}
|
| 384 |
+
{%- if not enable_thinking -%}
|
| 385 |
+
{{- '<|channel>thought\n<channel|>' -}}
|
| 386 |
+
{%- endif -%}
|
| 387 |
+
{%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}
|
| 388 |
+
{{- '<|channel>thought\n' -}}
|
| 389 |
+
{%- endif -%}
|
| 390 |
+
{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,454 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
],
|
| 17 |
+
"image_token_id": 258880,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"model_type": "gemma4",
|
| 20 |
+
"quantization_config": {
|
| 21 |
+
"config_groups": {
|
| 22 |
+
"group_0": {
|
| 23 |
+
"format": "pack-quantized",
|
| 24 |
+
"input_activations": null,
|
| 25 |
+
"output_activations": null,
|
| 26 |
+
"targets": [
|
| 27 |
+
"Linear"
|
| 28 |
+
],
|
| 29 |
+
"weights": {
|
| 30 |
+
"actorder": "static",
|
| 31 |
+
"block_structure": null,
|
| 32 |
+
"dynamic": false,
|
| 33 |
+
"group_size": 64,
|
| 34 |
+
"num_bits": 4,
|
| 35 |
+
"observer": "memoryless_minmax",
|
| 36 |
+
"observer_kwargs": {},
|
| 37 |
+
"scale_dtype": null,
|
| 38 |
+
"strategy": "group",
|
| 39 |
+
"symmetric": true,
|
| 40 |
+
"type": "int",
|
| 41 |
+
"zp_dtype": null
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"format": "pack-quantized",
|
| 46 |
+
"global_compression_ratio": null,
|
| 47 |
+
"ignore": [
|
| 48 |
+
"model.vision_tower.patch_embedder.input_proj",
|
| 49 |
+
"model.vision_tower.encoder.layers.0.self_attn.q_proj.linear",
|
| 50 |
+
"model.vision_tower.encoder.layers.0.self_attn.k_proj.linear",
|
| 51 |
+
"model.vision_tower.encoder.layers.0.self_attn.v_proj.linear",
|
| 52 |
+
"model.vision_tower.encoder.layers.0.self_attn.o_proj.linear",
|
| 53 |
+
"model.vision_tower.encoder.layers.0.mlp.gate_proj.linear",
|
| 54 |
+
"model.vision_tower.encoder.layers.0.mlp.up_proj.linear",
|
| 55 |
+
"model.vision_tower.encoder.layers.0.mlp.down_proj.linear",
|
| 56 |
+
"model.vision_tower.encoder.layers.1.self_attn.q_proj.linear",
|
| 57 |
+
"model.vision_tower.encoder.layers.1.self_attn.k_proj.linear",
|
| 58 |
+
"model.vision_tower.encoder.layers.1.self_attn.v_proj.linear",
|
| 59 |
+
"model.vision_tower.encoder.layers.1.self_attn.o_proj.linear",
|
| 60 |
+
"model.vision_tower.encoder.layers.1.mlp.gate_proj.linear",
|
| 61 |
+
"model.vision_tower.encoder.layers.1.mlp.up_proj.linear",
|
| 62 |
+
"model.vision_tower.encoder.layers.1.mlp.down_proj.linear",
|
| 63 |
+
"model.vision_tower.encoder.layers.2.self_attn.q_proj.linear",
|
| 64 |
+
"model.vision_tower.encoder.layers.2.self_attn.k_proj.linear",
|
| 65 |
+
"model.vision_tower.encoder.layers.2.self_attn.v_proj.linear",
|
| 66 |
+
"model.vision_tower.encoder.layers.2.self_attn.o_proj.linear",
|
| 67 |
+
"model.vision_tower.encoder.layers.2.mlp.gate_proj.linear",
|
| 68 |
+
"model.vision_tower.encoder.layers.2.mlp.up_proj.linear",
|
| 69 |
+
"model.vision_tower.encoder.layers.2.mlp.down_proj.linear",
|
| 70 |
+
"model.vision_tower.encoder.layers.3.self_attn.q_proj.linear",
|
| 71 |
+
"model.vision_tower.encoder.layers.3.self_attn.k_proj.linear",
|
| 72 |
+
"model.vision_tower.encoder.layers.3.self_attn.v_proj.linear",
|
| 73 |
+
"model.vision_tower.encoder.layers.3.self_attn.o_proj.linear",
|
| 74 |
+
"model.vision_tower.encoder.layers.3.mlp.gate_proj.linear",
|
| 75 |
+
"model.vision_tower.encoder.layers.3.mlp.up_proj.linear",
|
| 76 |
+
"model.vision_tower.encoder.layers.3.mlp.down_proj.linear",
|
| 77 |
+
"model.vision_tower.encoder.layers.4.self_attn.q_proj.linear",
|
| 78 |
+
"model.vision_tower.encoder.layers.4.self_attn.k_proj.linear",
|
| 79 |
+
"model.vision_tower.encoder.layers.4.self_attn.v_proj.linear",
|
| 80 |
+
"model.vision_tower.encoder.layers.4.self_attn.o_proj.linear",
|
| 81 |
+
"model.vision_tower.encoder.layers.4.mlp.gate_proj.linear",
|
| 82 |
+
"model.vision_tower.encoder.layers.4.mlp.up_proj.linear",
|
| 83 |
+
"model.vision_tower.encoder.layers.4.mlp.down_proj.linear",
|
| 84 |
+
"model.vision_tower.encoder.layers.5.self_attn.q_proj.linear",
|
| 85 |
+
"model.vision_tower.encoder.layers.5.self_attn.k_proj.linear",
|
| 86 |
+
"model.vision_tower.encoder.layers.5.self_attn.v_proj.linear",
|
| 87 |
+
"model.vision_tower.encoder.layers.5.self_attn.o_proj.linear",
|
| 88 |
+
"model.vision_tower.encoder.layers.5.mlp.gate_proj.linear",
|
| 89 |
+
"model.vision_tower.encoder.layers.5.mlp.up_proj.linear",
|
| 90 |
+
"model.vision_tower.encoder.layers.5.mlp.down_proj.linear",
|
| 91 |
+
"model.vision_tower.encoder.layers.6.self_attn.q_proj.linear",
|
| 92 |
+
"model.vision_tower.encoder.layers.6.self_attn.k_proj.linear",
|
| 93 |
+
"model.vision_tower.encoder.layers.6.self_attn.v_proj.linear",
|
| 94 |
+
"model.vision_tower.encoder.layers.6.self_attn.o_proj.linear",
|
| 95 |
+
"model.vision_tower.encoder.layers.6.mlp.gate_proj.linear",
|
| 96 |
+
"model.vision_tower.encoder.layers.6.mlp.up_proj.linear",
|
| 97 |
+
"model.vision_tower.encoder.layers.6.mlp.down_proj.linear",
|
| 98 |
+
"model.vision_tower.encoder.layers.7.self_attn.q_proj.linear",
|
| 99 |
+
"model.vision_tower.encoder.layers.7.self_attn.k_proj.linear",
|
| 100 |
+
"model.vision_tower.encoder.layers.7.self_attn.v_proj.linear",
|
| 101 |
+
"model.vision_tower.encoder.layers.7.self_attn.o_proj.linear",
|
| 102 |
+
"model.vision_tower.encoder.layers.7.mlp.gate_proj.linear",
|
| 103 |
+
"model.vision_tower.encoder.layers.7.mlp.up_proj.linear",
|
| 104 |
+
"model.vision_tower.encoder.layers.7.mlp.down_proj.linear",
|
| 105 |
+
"model.vision_tower.encoder.layers.8.self_attn.q_proj.linear",
|
| 106 |
+
"model.vision_tower.encoder.layers.8.self_attn.k_proj.linear",
|
| 107 |
+
"model.vision_tower.encoder.layers.8.self_attn.v_proj.linear",
|
| 108 |
+
"model.vision_tower.encoder.layers.8.self_attn.o_proj.linear",
|
| 109 |
+
"model.vision_tower.encoder.layers.8.mlp.gate_proj.linear",
|
| 110 |
+
"model.vision_tower.encoder.layers.8.mlp.up_proj.linear",
|
| 111 |
+
"model.vision_tower.encoder.layers.8.mlp.down_proj.linear",
|
| 112 |
+
"model.vision_tower.encoder.layers.9.self_attn.q_proj.linear",
|
| 113 |
+
"model.vision_tower.encoder.layers.9.self_attn.k_proj.linear",
|
| 114 |
+
"model.vision_tower.encoder.layers.9.self_attn.v_proj.linear",
|
| 115 |
+
"model.vision_tower.encoder.layers.9.self_attn.o_proj.linear",
|
| 116 |
+
"model.vision_tower.encoder.layers.9.mlp.gate_proj.linear",
|
| 117 |
+
"model.vision_tower.encoder.layers.9.mlp.up_proj.linear",
|
| 118 |
+
"model.vision_tower.encoder.layers.9.mlp.down_proj.linear",
|
| 119 |
+
"model.vision_tower.encoder.layers.10.self_attn.q_proj.linear",
|
| 120 |
+
"model.vision_tower.encoder.layers.10.self_attn.k_proj.linear",
|
| 121 |
+
"model.vision_tower.encoder.layers.10.self_attn.v_proj.linear",
|
| 122 |
+
"model.vision_tower.encoder.layers.10.self_attn.o_proj.linear",
|
| 123 |
+
"model.vision_tower.encoder.layers.10.mlp.gate_proj.linear",
|
| 124 |
+
"model.vision_tower.encoder.layers.10.mlp.up_proj.linear",
|
| 125 |
+
"model.vision_tower.encoder.layers.10.mlp.down_proj.linear",
|
| 126 |
+
"model.vision_tower.encoder.layers.11.self_attn.q_proj.linear",
|
| 127 |
+
"model.vision_tower.encoder.layers.11.self_attn.k_proj.linear",
|
| 128 |
+
"model.vision_tower.encoder.layers.11.self_attn.v_proj.linear",
|
| 129 |
+
"model.vision_tower.encoder.layers.11.self_attn.o_proj.linear",
|
| 130 |
+
"model.vision_tower.encoder.layers.11.mlp.gate_proj.linear",
|
| 131 |
+
"model.vision_tower.encoder.layers.11.mlp.up_proj.linear",
|
| 132 |
+
"model.vision_tower.encoder.layers.11.mlp.down_proj.linear",
|
| 133 |
+
"model.vision_tower.encoder.layers.12.self_attn.q_proj.linear",
|
| 134 |
+
"model.vision_tower.encoder.layers.12.self_attn.k_proj.linear",
|
| 135 |
+
"model.vision_tower.encoder.layers.12.self_attn.v_proj.linear",
|
| 136 |
+
"model.vision_tower.encoder.layers.12.self_attn.o_proj.linear",
|
| 137 |
+
"model.vision_tower.encoder.layers.12.mlp.gate_proj.linear",
|
| 138 |
+
"model.vision_tower.encoder.layers.12.mlp.up_proj.linear",
|
| 139 |
+
"model.vision_tower.encoder.layers.12.mlp.down_proj.linear",
|
| 140 |
+
"model.vision_tower.encoder.layers.13.self_attn.q_proj.linear",
|
| 141 |
+
"model.vision_tower.encoder.layers.13.self_attn.k_proj.linear",
|
| 142 |
+
"model.vision_tower.encoder.layers.13.self_attn.v_proj.linear",
|
| 143 |
+
"model.vision_tower.encoder.layers.13.self_attn.o_proj.linear",
|
| 144 |
+
"model.vision_tower.encoder.layers.13.mlp.gate_proj.linear",
|
| 145 |
+
"model.vision_tower.encoder.layers.13.mlp.up_proj.linear",
|
| 146 |
+
"model.vision_tower.encoder.layers.13.mlp.down_proj.linear",
|
| 147 |
+
"model.vision_tower.encoder.layers.14.self_attn.q_proj.linear",
|
| 148 |
+
"model.vision_tower.encoder.layers.14.self_attn.k_proj.linear",
|
| 149 |
+
"model.vision_tower.encoder.layers.14.self_attn.v_proj.linear",
|
| 150 |
+
"model.vision_tower.encoder.layers.14.self_attn.o_proj.linear",
|
| 151 |
+
"model.vision_tower.encoder.layers.14.mlp.gate_proj.linear",
|
| 152 |
+
"model.vision_tower.encoder.layers.14.mlp.up_proj.linear",
|
| 153 |
+
"model.vision_tower.encoder.layers.14.mlp.down_proj.linear",
|
| 154 |
+
"model.vision_tower.encoder.layers.15.self_attn.q_proj.linear",
|
| 155 |
+
"model.vision_tower.encoder.layers.15.self_attn.k_proj.linear",
|
| 156 |
+
"model.vision_tower.encoder.layers.15.self_attn.v_proj.linear",
|
| 157 |
+
"model.vision_tower.encoder.layers.15.self_attn.o_proj.linear",
|
| 158 |
+
"model.vision_tower.encoder.layers.15.mlp.gate_proj.linear",
|
| 159 |
+
"model.vision_tower.encoder.layers.15.mlp.up_proj.linear",
|
| 160 |
+
"model.vision_tower.encoder.layers.15.mlp.down_proj.linear",
|
| 161 |
+
"model.vision_tower.encoder.layers.16.self_attn.q_proj.linear",
|
| 162 |
+
"model.vision_tower.encoder.layers.16.self_attn.k_proj.linear",
|
| 163 |
+
"model.vision_tower.encoder.layers.16.self_attn.v_proj.linear",
|
| 164 |
+
"model.vision_tower.encoder.layers.16.self_attn.o_proj.linear",
|
| 165 |
+
"model.vision_tower.encoder.layers.16.mlp.gate_proj.linear",
|
| 166 |
+
"model.vision_tower.encoder.layers.16.mlp.up_proj.linear",
|
| 167 |
+
"model.vision_tower.encoder.layers.16.mlp.down_proj.linear",
|
| 168 |
+
"model.vision_tower.encoder.layers.17.self_attn.q_proj.linear",
|
| 169 |
+
"model.vision_tower.encoder.layers.17.self_attn.k_proj.linear",
|
| 170 |
+
"model.vision_tower.encoder.layers.17.self_attn.v_proj.linear",
|
| 171 |
+
"model.vision_tower.encoder.layers.17.self_attn.o_proj.linear",
|
| 172 |
+
"model.vision_tower.encoder.layers.17.mlp.gate_proj.linear",
|
| 173 |
+
"model.vision_tower.encoder.layers.17.mlp.up_proj.linear",
|
| 174 |
+
"model.vision_tower.encoder.layers.17.mlp.down_proj.linear",
|
| 175 |
+
"model.vision_tower.encoder.layers.18.self_attn.q_proj.linear",
|
| 176 |
+
"model.vision_tower.encoder.layers.18.self_attn.k_proj.linear",
|
| 177 |
+
"model.vision_tower.encoder.layers.18.self_attn.v_proj.linear",
|
| 178 |
+
"model.vision_tower.encoder.layers.18.self_attn.o_proj.linear",
|
| 179 |
+
"model.vision_tower.encoder.layers.18.mlp.gate_proj.linear",
|
| 180 |
+
"model.vision_tower.encoder.layers.18.mlp.up_proj.linear",
|
| 181 |
+
"model.vision_tower.encoder.layers.18.mlp.down_proj.linear",
|
| 182 |
+
"model.vision_tower.encoder.layers.19.self_attn.q_proj.linear",
|
| 183 |
+
"model.vision_tower.encoder.layers.19.self_attn.k_proj.linear",
|
| 184 |
+
"model.vision_tower.encoder.layers.19.self_attn.v_proj.linear",
|
| 185 |
+
"model.vision_tower.encoder.layers.19.self_attn.o_proj.linear",
|
| 186 |
+
"model.vision_tower.encoder.layers.19.mlp.gate_proj.linear",
|
| 187 |
+
"model.vision_tower.encoder.layers.19.mlp.up_proj.linear",
|
| 188 |
+
"model.vision_tower.encoder.layers.19.mlp.down_proj.linear",
|
| 189 |
+
"model.vision_tower.encoder.layers.20.self_attn.q_proj.linear",
|
| 190 |
+
"model.vision_tower.encoder.layers.20.self_attn.k_proj.linear",
|
| 191 |
+
"model.vision_tower.encoder.layers.20.self_attn.v_proj.linear",
|
| 192 |
+
"model.vision_tower.encoder.layers.20.self_attn.o_proj.linear",
|
| 193 |
+
"model.vision_tower.encoder.layers.20.mlp.gate_proj.linear",
|
| 194 |
+
"model.vision_tower.encoder.layers.20.mlp.up_proj.linear",
|
| 195 |
+
"model.vision_tower.encoder.layers.20.mlp.down_proj.linear",
|
| 196 |
+
"model.vision_tower.encoder.layers.21.self_attn.q_proj.linear",
|
| 197 |
+
"model.vision_tower.encoder.layers.21.self_attn.k_proj.linear",
|
| 198 |
+
"model.vision_tower.encoder.layers.21.self_attn.v_proj.linear",
|
| 199 |
+
"model.vision_tower.encoder.layers.21.self_attn.o_proj.linear",
|
| 200 |
+
"model.vision_tower.encoder.layers.21.mlp.gate_proj.linear",
|
| 201 |
+
"model.vision_tower.encoder.layers.21.mlp.up_proj.linear",
|
| 202 |
+
"model.vision_tower.encoder.layers.21.mlp.down_proj.linear",
|
| 203 |
+
"model.vision_tower.encoder.layers.22.self_attn.q_proj.linear",
|
| 204 |
+
"model.vision_tower.encoder.layers.22.self_attn.k_proj.linear",
|
| 205 |
+
"model.vision_tower.encoder.layers.22.self_attn.v_proj.linear",
|
| 206 |
+
"model.vision_tower.encoder.layers.22.self_attn.o_proj.linear",
|
| 207 |
+
"model.vision_tower.encoder.layers.22.mlp.gate_proj.linear",
|
| 208 |
+
"model.vision_tower.encoder.layers.22.mlp.up_proj.linear",
|
| 209 |
+
"model.vision_tower.encoder.layers.22.mlp.down_proj.linear",
|
| 210 |
+
"model.vision_tower.encoder.layers.23.self_attn.q_proj.linear",
|
| 211 |
+
"model.vision_tower.encoder.layers.23.self_attn.k_proj.linear",
|
| 212 |
+
"model.vision_tower.encoder.layers.23.self_attn.v_proj.linear",
|
| 213 |
+
"model.vision_tower.encoder.layers.23.self_attn.o_proj.linear",
|
| 214 |
+
"model.vision_tower.encoder.layers.23.mlp.gate_proj.linear",
|
| 215 |
+
"model.vision_tower.encoder.layers.23.mlp.up_proj.linear",
|
| 216 |
+
"model.vision_tower.encoder.layers.23.mlp.down_proj.linear",
|
| 217 |
+
"model.vision_tower.encoder.layers.24.self_attn.q_proj.linear",
|
| 218 |
+
"model.vision_tower.encoder.layers.24.self_attn.k_proj.linear",
|
| 219 |
+
"model.vision_tower.encoder.layers.24.self_attn.v_proj.linear",
|
| 220 |
+
"model.vision_tower.encoder.layers.24.self_attn.o_proj.linear",
|
| 221 |
+
"model.vision_tower.encoder.layers.24.mlp.gate_proj.linear",
|
| 222 |
+
"model.vision_tower.encoder.layers.24.mlp.up_proj.linear",
|
| 223 |
+
"model.vision_tower.encoder.layers.24.mlp.down_proj.linear",
|
| 224 |
+
"model.vision_tower.encoder.layers.25.self_attn.q_proj.linear",
|
| 225 |
+
"model.vision_tower.encoder.layers.25.self_attn.k_proj.linear",
|
| 226 |
+
"model.vision_tower.encoder.layers.25.self_attn.v_proj.linear",
|
| 227 |
+
"model.vision_tower.encoder.layers.25.self_attn.o_proj.linear",
|
| 228 |
+
"model.vision_tower.encoder.layers.25.mlp.gate_proj.linear",
|
| 229 |
+
"model.vision_tower.encoder.layers.25.mlp.up_proj.linear",
|
| 230 |
+
"model.vision_tower.encoder.layers.25.mlp.down_proj.linear",
|
| 231 |
+
"model.vision_tower.encoder.layers.26.self_attn.q_proj.linear",
|
| 232 |
+
"model.vision_tower.encoder.layers.26.self_attn.k_proj.linear",
|
| 233 |
+
"model.vision_tower.encoder.layers.26.self_attn.v_proj.linear",
|
| 234 |
+
"model.vision_tower.encoder.layers.26.self_attn.o_proj.linear",
|
| 235 |
+
"model.vision_tower.encoder.layers.26.mlp.gate_proj.linear",
|
| 236 |
+
"model.vision_tower.encoder.layers.26.mlp.up_proj.linear",
|
| 237 |
+
"model.vision_tower.encoder.layers.26.mlp.down_proj.linear",
|
| 238 |
+
"model.language_model.layers.0.router",
|
| 239 |
+
"model.language_model.layers.0.router.proj",
|
| 240 |
+
"model.language_model.layers.1.router",
|
| 241 |
+
"model.language_model.layers.1.router.proj",
|
| 242 |
+
"model.language_model.layers.2.router",
|
| 243 |
+
"model.language_model.layers.2.router.proj",
|
| 244 |
+
"model.language_model.layers.3.router",
|
| 245 |
+
"model.language_model.layers.3.router.proj",
|
| 246 |
+
"model.language_model.layers.4.router",
|
| 247 |
+
"model.language_model.layers.4.router.proj",
|
| 248 |
+
"model.language_model.layers.5.router",
|
| 249 |
+
"model.language_model.layers.5.router.proj",
|
| 250 |
+
"model.language_model.layers.6.router",
|
| 251 |
+
"model.language_model.layers.6.router.proj",
|
| 252 |
+
"model.language_model.layers.7.router",
|
| 253 |
+
"model.language_model.layers.7.router.proj",
|
| 254 |
+
"model.language_model.layers.8.router",
|
| 255 |
+
"model.language_model.layers.8.router.proj",
|
| 256 |
+
"model.language_model.layers.9.router",
|
| 257 |
+
"model.language_model.layers.9.router.proj",
|
| 258 |
+
"model.language_model.layers.10.router",
|
| 259 |
+
"model.language_model.layers.10.router.proj",
|
| 260 |
+
"model.language_model.layers.11.router",
|
| 261 |
+
"model.language_model.layers.11.router.proj",
|
| 262 |
+
"model.language_model.layers.12.router",
|
| 263 |
+
"model.language_model.layers.12.router.proj",
|
| 264 |
+
"model.language_model.layers.13.router",
|
| 265 |
+
"model.language_model.layers.13.router.proj",
|
| 266 |
+
"model.language_model.layers.14.router",
|
| 267 |
+
"model.language_model.layers.14.router.proj",
|
| 268 |
+
"model.language_model.layers.15.router",
|
| 269 |
+
"model.language_model.layers.15.router.proj",
|
| 270 |
+
"model.language_model.layers.16.router",
|
| 271 |
+
"model.language_model.layers.16.router.proj",
|
| 272 |
+
"model.language_model.layers.17.router",
|
| 273 |
+
"model.language_model.layers.17.router.proj",
|
| 274 |
+
"model.language_model.layers.18.router",
|
| 275 |
+
"model.language_model.layers.18.router.proj",
|
| 276 |
+
"model.language_model.layers.19.router",
|
| 277 |
+
"model.language_model.layers.19.router.proj",
|
| 278 |
+
"model.language_model.layers.20.router",
|
| 279 |
+
"model.language_model.layers.20.router.proj",
|
| 280 |
+
"model.language_model.layers.21.router",
|
| 281 |
+
"model.language_model.layers.21.router.proj",
|
| 282 |
+
"model.language_model.layers.22.router",
|
| 283 |
+
"model.language_model.layers.22.router.proj",
|
| 284 |
+
"model.language_model.layers.23.router",
|
| 285 |
+
"model.language_model.layers.23.router.proj",
|
| 286 |
+
"model.language_model.layers.24.router",
|
| 287 |
+
"model.language_model.layers.24.router.proj",
|
| 288 |
+
"model.language_model.layers.25.router",
|
| 289 |
+
"model.language_model.layers.25.router.proj",
|
| 290 |
+
"model.language_model.layers.26.router",
|
| 291 |
+
"model.language_model.layers.26.router.proj",
|
| 292 |
+
"model.language_model.layers.27.router",
|
| 293 |
+
"model.language_model.layers.27.router.proj",
|
| 294 |
+
"model.language_model.layers.28.router",
|
| 295 |
+
"model.language_model.layers.28.router.proj",
|
| 296 |
+
"model.language_model.layers.29.router",
|
| 297 |
+
"model.language_model.layers.29.router.proj",
|
| 298 |
+
"model.embed_vision.embedding_projection",
|
| 299 |
+
"lm_head"
|
| 300 |
+
],
|
| 301 |
+
"kv_cache_scheme": null,
|
| 302 |
+
"quant_method": "compressed-tensors",
|
| 303 |
+
"quantization_status": "compressed",
|
| 304 |
+
"sparsity_config": {},
|
| 305 |
+
"transform_config": {},
|
| 306 |
+
"version": "0.18.0"
|
| 307 |
+
},
|
| 308 |
+
"text_config": {
|
| 309 |
+
"attention_bias": false,
|
| 310 |
+
"attention_dropout": 0.0,
|
| 311 |
+
"attention_k_eq_v": true,
|
| 312 |
+
"bos_token_id": 2,
|
| 313 |
+
"dtype": "bfloat16",
|
| 314 |
+
"enable_moe_block": true,
|
| 315 |
+
"eos_token_id": 1,
|
| 316 |
+
"final_logit_softcapping": 30.0,
|
| 317 |
+
"head_dim": 256,
|
| 318 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 319 |
+
"hidden_size": 2816,
|
| 320 |
+
"hidden_size_per_layer_input": 0,
|
| 321 |
+
"initializer_range": 0.02,
|
| 322 |
+
"intermediate_size": 2112,
|
| 323 |
+
"layer_types": [
|
| 324 |
+
"sliding_attention",
|
| 325 |
+
"sliding_attention",
|
| 326 |
+
"sliding_attention",
|
| 327 |
+
"sliding_attention",
|
| 328 |
+
"sliding_attention",
|
| 329 |
+
"full_attention",
|
| 330 |
+
"sliding_attention",
|
| 331 |
+
"sliding_attention",
|
| 332 |
+
"sliding_attention",
|
| 333 |
+
"sliding_attention",
|
| 334 |
+
"sliding_attention",
|
| 335 |
+
"full_attention",
|
| 336 |
+
"sliding_attention",
|
| 337 |
+
"sliding_attention",
|
| 338 |
+
"sliding_attention",
|
| 339 |
+
"sliding_attention",
|
| 340 |
+
"sliding_attention",
|
| 341 |
+
"full_attention",
|
| 342 |
+
"sliding_attention",
|
| 343 |
+
"sliding_attention",
|
| 344 |
+
"sliding_attention",
|
| 345 |
+
"sliding_attention",
|
| 346 |
+
"sliding_attention",
|
| 347 |
+
"full_attention",
|
| 348 |
+
"sliding_attention",
|
| 349 |
+
"sliding_attention",
|
| 350 |
+
"sliding_attention",
|
| 351 |
+
"sliding_attention",
|
| 352 |
+
"sliding_attention",
|
| 353 |
+
"full_attention"
|
| 354 |
+
],
|
| 355 |
+
"max_position_embeddings": 262144,
|
| 356 |
+
"model_type": "gemma4_text",
|
| 357 |
+
"moe_intermediate_size": 704,
|
| 358 |
+
"num_attention_heads": 16,
|
| 359 |
+
"num_experts": 128,
|
| 360 |
+
"num_hidden_layers": 30,
|
| 361 |
+
"num_key_value_heads": 8,
|
| 362 |
+
"num_kv_shared_layers": 0,
|
| 363 |
+
"pad_token_id": 0,
|
| 364 |
+
"per_layer_config": {
|
| 365 |
+
"05": {
|
| 366 |
+
"head_dim": 512,
|
| 367 |
+
"num_key_value_heads": 2
|
| 368 |
+
},
|
| 369 |
+
"11": {
|
| 370 |
+
"head_dim": 512,
|
| 371 |
+
"num_key_value_heads": 2
|
| 372 |
+
},
|
| 373 |
+
"17": {
|
| 374 |
+
"head_dim": 512,
|
| 375 |
+
"num_key_value_heads": 2
|
| 376 |
+
},
|
| 377 |
+
"23": {
|
| 378 |
+
"head_dim": 512,
|
| 379 |
+
"num_key_value_heads": 2
|
| 380 |
+
},
|
| 381 |
+
"29": {
|
| 382 |
+
"head_dim": 512,
|
| 383 |
+
"num_key_value_heads": 2
|
| 384 |
+
}
|
| 385 |
+
},
|
| 386 |
+
"rms_norm_eps": 1e-06,
|
| 387 |
+
"rope_parameters": {
|
| 388 |
+
"full_attention": {
|
| 389 |
+
"partial_rotary_factor": 0.25,
|
| 390 |
+
"rope_theta": 1000000.0,
|
| 391 |
+
"rope_type": "proportional"
|
| 392 |
+
},
|
| 393 |
+
"sliding_attention": {
|
| 394 |
+
"rope_theta": 10000.0,
|
| 395 |
+
"rope_type": "default"
|
| 396 |
+
}
|
| 397 |
+
},
|
| 398 |
+
"sliding_window": 1024,
|
| 399 |
+
"tie_word_embeddings": true,
|
| 400 |
+
"top_k_experts": 8,
|
| 401 |
+
"use_bidirectional_attention": "vision",
|
| 402 |
+
"use_cache": true,
|
| 403 |
+
"use_double_wide_mlp": false,
|
| 404 |
+
"vocab_size": 262144,
|
| 405 |
+
"vocab_size_per_layer_input": 262144
|
| 406 |
+
},
|
| 407 |
+
"tie_word_embeddings": true,
|
| 408 |
+
"transformers_version": "5.15.1",
|
| 409 |
+
"video_token_id": 258884,
|
| 410 |
+
"vision_config": {
|
| 411 |
+
"_name_or_path": "",
|
| 412 |
+
"architectures": null,
|
| 413 |
+
"attention_bias": false,
|
| 414 |
+
"attention_dropout": 0.0,
|
| 415 |
+
"chunk_size_feed_forward": 0,
|
| 416 |
+
"default_output_length": 280,
|
| 417 |
+
"dtype": "bfloat16",
|
| 418 |
+
"global_head_dim": 72,
|
| 419 |
+
"head_dim": 72,
|
| 420 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 421 |
+
"hidden_size": 1152,
|
| 422 |
+
"id2label": {
|
| 423 |
+
"0": "LABEL_0",
|
| 424 |
+
"1": "LABEL_1"
|
| 425 |
+
},
|
| 426 |
+
"initializer_range": 0.02,
|
| 427 |
+
"intermediate_size": 4304,
|
| 428 |
+
"is_encoder_decoder": false,
|
| 429 |
+
"label2id": {
|
| 430 |
+
"LABEL_0": 0,
|
| 431 |
+
"LABEL_1": 1
|
| 432 |
+
},
|
| 433 |
+
"max_position_embeddings": 131072,
|
| 434 |
+
"model_type": "gemma4_vision",
|
| 435 |
+
"num_attention_heads": 16,
|
| 436 |
+
"num_hidden_layers": 27,
|
| 437 |
+
"num_key_value_heads": 16,
|
| 438 |
+
"output_attentions": false,
|
| 439 |
+
"output_hidden_states": false,
|
| 440 |
+
"patch_size": 16,
|
| 441 |
+
"pooling_kernel_size": 3,
|
| 442 |
+
"position_embedding_size": 10240,
|
| 443 |
+
"problem_type": null,
|
| 444 |
+
"return_dict": true,
|
| 445 |
+
"rms_norm_eps": 1e-06,
|
| 446 |
+
"rope_parameters": {
|
| 447 |
+
"rope_theta": 100.0,
|
| 448 |
+
"rope_type": "default"
|
| 449 |
+
},
|
| 450 |
+
"standardize": true,
|
| 451 |
+
"use_clipped_linears": false
|
| 452 |
+
},
|
| 453 |
+
"vision_soft_tokens_per_image": 280
|
| 454 |
+
}
|
eval/evaluate_gemma4_ppl_vllm.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Perplexity via vLLM prompt logprobs for a Gemma 4 text-only path.
|
| 3 |
+
|
| 4 |
+
This is intentionally shared by BF16 and compressed-tensors W4A16 runs. It
|
| 5 |
+
scores the observed next token at every noninitial position in deterministic,
|
| 6 |
+
contiguous held-out WikiText-2 test windows. ``--cpu-offload-gb`` makes the
|
| 7 |
+
otherwise too-large BF16 parent testable on a 24 GB card without changing the
|
| 8 |
+
model or scoring implementation.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from __future__ import annotations
|
| 12 |
+
|
| 13 |
+
import argparse
|
| 14 |
+
import json
|
| 15 |
+
import math
|
| 16 |
+
from datetime import datetime, timezone
|
| 17 |
+
from pathlib import Path
|
| 18 |
+
|
| 19 |
+
from datasets import load_dataset
|
| 20 |
+
from transformers import AutoTokenizer
|
| 21 |
+
from vllm import LLM, SamplingParams
|
| 22 |
+
from vllm.inputs import TokensPrompt
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def parse_args() -> argparse.Namespace:
|
| 26 |
+
parser = argparse.ArgumentParser()
|
| 27 |
+
parser.add_argument("--model", type=Path, required=True)
|
| 28 |
+
parser.add_argument("--tokenizer", type=Path, required=True)
|
| 29 |
+
parser.add_argument("--label", required=True)
|
| 30 |
+
parser.add_argument("--output", type=Path, required=True)
|
| 31 |
+
parser.add_argument("--cache-dir", type=Path, required=True)
|
| 32 |
+
parser.add_argument("--num-windows", type=int, default=4)
|
| 33 |
+
parser.add_argument("--window-tokens", type=int, default=512)
|
| 34 |
+
parser.add_argument("--quantization", default=None)
|
| 35 |
+
parser.add_argument("--cpu-offload-gb", type=float, default=0.0)
|
| 36 |
+
return parser.parse_args()
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def held_out_windows(tokenizer, cache_dir: Path, num_windows: int, size: int):
|
| 40 |
+
dataset = load_dataset(
|
| 41 |
+
"Salesforce/wikitext",
|
| 42 |
+
"wikitext-2-raw-v1",
|
| 43 |
+
split="test",
|
| 44 |
+
cache_dir=str(cache_dir),
|
| 45 |
+
)
|
| 46 |
+
text = "\n\n".join(row["text"] for row in dataset if row["text"].strip())
|
| 47 |
+
ids = tokenizer(text, add_special_tokens=False)["input_ids"]
|
| 48 |
+
needed = num_windows * size
|
| 49 |
+
if len(ids) < needed:
|
| 50 |
+
raise RuntimeError(f"Need {needed} tokens, corpus yielded {len(ids)}")
|
| 51 |
+
return dataset, [ids[i * size : (i + 1) * size] for i in range(num_windows)]
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def main() -> None:
|
| 55 |
+
args = parse_args()
|
| 56 |
+
if args.window_tokens < 2:
|
| 57 |
+
raise ValueError("--window-tokens must be at least 2")
|
| 58 |
+
tokenizer = AutoTokenizer.from_pretrained(args.tokenizer, local_files_only=True)
|
| 59 |
+
dataset, windows = held_out_windows(
|
| 60 |
+
tokenizer, args.cache_dir, args.num_windows, args.window_tokens
|
| 61 |
+
)
|
| 62 |
+
llm = LLM(
|
| 63 |
+
model=str(args.model),
|
| 64 |
+
tokenizer=str(args.tokenizer),
|
| 65 |
+
dtype="bfloat16",
|
| 66 |
+
quantization=args.quantization,
|
| 67 |
+
max_model_len=args.window_tokens + 1,
|
| 68 |
+
max_num_seqs=1,
|
| 69 |
+
max_num_batched_tokens=args.window_tokens + 1,
|
| 70 |
+
gpu_memory_utilization=0.80,
|
| 71 |
+
cpu_offload_gb=args.cpu_offload_gb,
|
| 72 |
+
language_model_only=True,
|
| 73 |
+
limit_mm_per_prompt={"image": 0, "video": 0},
|
| 74 |
+
)
|
| 75 |
+
params = SamplingParams(
|
| 76 |
+
temperature=0.0,
|
| 77 |
+
max_tokens=1,
|
| 78 |
+
ignore_eos=True,
|
| 79 |
+
prompt_logprobs=1,
|
| 80 |
+
detokenize=False,
|
| 81 |
+
)
|
| 82 |
+
outputs = llm.generate(
|
| 83 |
+
[TokensPrompt(prompt_token_ids=ids) for ids in windows], params, use_tqdm=False
|
| 84 |
+
)
|
| 85 |
+
nll = 0.0
|
| 86 |
+
token_count = 0
|
| 87 |
+
for window, output in zip(windows, outputs, strict=True):
|
| 88 |
+
values = output.prompt_logprobs
|
| 89 |
+
if values is None or len(values) != len(window):
|
| 90 |
+
raise RuntimeError("vLLM did not return one prompt-logprob entry per prompt token")
|
| 91 |
+
for token_id, entry in zip(window[1:], values[1:], strict=True):
|
| 92 |
+
if entry is None or token_id not in entry:
|
| 93 |
+
raise RuntimeError("observed token missing from prompt-logprob response")
|
| 94 |
+
nll -= entry[token_id].logprob
|
| 95 |
+
token_count += 1
|
| 96 |
+
result = {
|
| 97 |
+
"label": args.label,
|
| 98 |
+
"model": args.model.name,
|
| 99 |
+
"tokenizer": args.tokenizer.name,
|
| 100 |
+
"dataset": "Salesforce/wikitext",
|
| 101 |
+
"dataset_config": "wikitext-2-raw-v1",
|
| 102 |
+
"split": "test",
|
| 103 |
+
"dataset_fingerprint": dataset._fingerprint,
|
| 104 |
+
"window_selection": "first contiguous non-empty test-corpus token windows",
|
| 105 |
+
"num_windows": args.num_windows,
|
| 106 |
+
"window_tokens": args.window_tokens,
|
| 107 |
+
"evaluated_next_tokens": token_count,
|
| 108 |
+
"nll_sum": nll,
|
| 109 |
+
"mean_nll": nll / token_count,
|
| 110 |
+
"perplexity": math.exp(nll / token_count),
|
| 111 |
+
"engine": "vLLM prompt_logprobs=1",
|
| 112 |
+
"quantization": args.quantization,
|
| 113 |
+
"cpu_offload_gb": args.cpu_offload_gb,
|
| 114 |
+
"utc": datetime.now(timezone.utc).isoformat(),
|
| 115 |
+
}
|
| 116 |
+
args.output.parent.mkdir(parents=True, exist_ok=True)
|
| 117 |
+
args.output.write_text(json.dumps(result, indent=2) + "\n")
|
| 118 |
+
print(json.dumps(result, indent=2))
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
if __name__ == "__main__":
|
| 122 |
+
main()
|
examples/serve_vllm_3090_128k.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Validated reference profile: one RTX 3090 24 GB, image-focused Gemma 4 use.
|
| 3 |
+
set -euo pipefail
|
| 4 |
+
|
| 5 |
+
CUDA_VISIBLE_DEVICES=1 vllm serve useful-quants/Gemma-4-26B-A4B-it-W4A16-G64-BF16Vision \
|
| 6 |
+
--quantization compressed-tensors \
|
| 7 |
+
--dtype bfloat16 \
|
| 8 |
+
--max-model-len 131072 \
|
| 9 |
+
--kv-cache-memory-bytes 6444425401 \
|
| 10 |
+
--max-num-seqs 17 \
|
| 11 |
+
--max-num-batched-tokens 8192 \
|
| 12 |
+
--enable-chunked-prefill \
|
| 13 |
+
--enable-prefix-caching \
|
| 14 |
+
--scheduling-policy priority \
|
| 15 |
+
--limit-mm-per-prompt '{"image":1,"video":0}' \
|
| 16 |
+
--host 0.0.0.0 \
|
| 17 |
+
--port 8000
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 2,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
1,
|
| 6 |
+
106
|
| 7 |
+
],
|
| 8 |
+
"output_attentions": false,
|
| 9 |
+
"output_hidden_states": false,
|
| 10 |
+
"pad_token_id": 0,
|
| 11 |
+
"transformers_version": "5.15.1",
|
| 12 |
+
"use_cache": true
|
| 13 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4475b48270e4d2072886f084442e29f5e5eb16c7668d5a2a28404428e9c0b247
|
| 3 |
+
size 15656878852
|
processor_config.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_ms_per_token": 40,
|
| 3 |
+
"audio_seq_length": 750,
|
| 4 |
+
"feature_extractor": {
|
| 5 |
+
"dither": 0.0,
|
| 6 |
+
"feature_extractor_type": "Gemma4AudioFeatureExtractor",
|
| 7 |
+
"feature_size": 128,
|
| 8 |
+
"fft_length": 512,
|
| 9 |
+
"fft_overdrive": false,
|
| 10 |
+
"frame_length": 320,
|
| 11 |
+
"hop_length": 160,
|
| 12 |
+
"input_scale_factor": 1.0,
|
| 13 |
+
"max_frequency": 8000.0,
|
| 14 |
+
"mel_floor": 0.001,
|
| 15 |
+
"min_frequency": 0.0,
|
| 16 |
+
"padding_side": "right",
|
| 17 |
+
"padding_value": 0.0,
|
| 18 |
+
"per_bin_mean": null,
|
| 19 |
+
"per_bin_stddev": null,
|
| 20 |
+
"preemphasis": 0.0,
|
| 21 |
+
"preemphasis_htk_flavor": true,
|
| 22 |
+
"return_attention_mask": true,
|
| 23 |
+
"sampling_rate": 16000
|
| 24 |
+
},
|
| 25 |
+
"image_processor": {
|
| 26 |
+
"do_convert_rgb": true,
|
| 27 |
+
"do_normalize": false,
|
| 28 |
+
"do_rescale": true,
|
| 29 |
+
"do_resize": true,
|
| 30 |
+
"image_mean": [
|
| 31 |
+
0.0,
|
| 32 |
+
0.0,
|
| 33 |
+
0.0
|
| 34 |
+
],
|
| 35 |
+
"image_processor_type": "Gemma4ImageProcessor",
|
| 36 |
+
"image_seq_length": 280,
|
| 37 |
+
"image_std": [
|
| 38 |
+
1.0,
|
| 39 |
+
1.0,
|
| 40 |
+
1.0
|
| 41 |
+
],
|
| 42 |
+
"max_soft_tokens": 280,
|
| 43 |
+
"patch_size": 16,
|
| 44 |
+
"pooling_kernel_size": 3,
|
| 45 |
+
"resample": 3,
|
| 46 |
+
"rescale_factor": 0.00392156862745098
|
| 47 |
+
},
|
| 48 |
+
"image_seq_length": 280,
|
| 49 |
+
"processor_class": "Gemma4Processor",
|
| 50 |
+
"video_processor": {
|
| 51 |
+
"do_convert_rgb": true,
|
| 52 |
+
"do_normalize": true,
|
| 53 |
+
"do_rescale": true,
|
| 54 |
+
"do_resize": true,
|
| 55 |
+
"do_sample_frames": true,
|
| 56 |
+
"image_mean": [
|
| 57 |
+
0.0,
|
| 58 |
+
0.0,
|
| 59 |
+
0.0
|
| 60 |
+
],
|
| 61 |
+
"image_std": [
|
| 62 |
+
1.0,
|
| 63 |
+
1.0,
|
| 64 |
+
1.0
|
| 65 |
+
],
|
| 66 |
+
"max_soft_tokens": 70,
|
| 67 |
+
"num_frames": 32,
|
| 68 |
+
"patch_size": 16,
|
| 69 |
+
"pooling_kernel_size": 3,
|
| 70 |
+
"resample": 3,
|
| 71 |
+
"rescale_factor": 0.00392156862745098,
|
| 72 |
+
"return_metadata": false,
|
| 73 |
+
"video_processor_type": "Gemma4VideoProcessor"
|
| 74 |
+
}
|
| 75 |
+
}
|
provenance/artifact-audit.json
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_file": "model.safetensors",
|
| 3 |
+
"model_file_bytes": 15656878852,
|
| 4 |
+
"model_file_sha256": "4475b48270e4d2072886f084442e29f5e5eb16c7668d5a2a28404428e9c0b247",
|
| 5 |
+
"total_tensor_count": 35923,
|
| 6 |
+
"weight_packed_tensor_count": 11725,
|
| 7 |
+
"weight_scale_tensor_count": 11725,
|
| 8 |
+
"weight_scale_nonfinite_tensor_count": 0,
|
| 9 |
+
"weight_scale_nonfinite_value_count": 0,
|
| 10 |
+
"packed_exclusion_counts": {
|
| 11 |
+
"vision_tower": 0,
|
| 12 |
+
"router": 0,
|
| 13 |
+
"token_embedding": 0,
|
| 14 |
+
"vision_embedding": 0,
|
| 15 |
+
"lm_head": 0
|
| 16 |
+
},
|
| 17 |
+
"representative_excluded_weight_dtypes": {
|
| 18 |
+
"token_embedding": "bfloat16",
|
| 19 |
+
"vision_projection": "bfloat16",
|
| 20 |
+
"router": "bfloat16",
|
| 21 |
+
"vision_mlp": "bfloat16"
|
| 22 |
+
},
|
| 23 |
+
"separate_lm_head_tensor_present": false,
|
| 24 |
+
"quantization_config": {
|
| 25 |
+
"config_groups": {
|
| 26 |
+
"group_0": {
|
| 27 |
+
"format": "pack-quantized",
|
| 28 |
+
"input_activations": null,
|
| 29 |
+
"output_activations": null,
|
| 30 |
+
"targets": [
|
| 31 |
+
"Linear"
|
| 32 |
+
],
|
| 33 |
+
"weights": {
|
| 34 |
+
"actorder": "static",
|
| 35 |
+
"block_structure": null,
|
| 36 |
+
"dynamic": false,
|
| 37 |
+
"group_size": 64,
|
| 38 |
+
"num_bits": 4,
|
| 39 |
+
"observer": "memoryless_minmax",
|
| 40 |
+
"observer_kwargs": {},
|
| 41 |
+
"scale_dtype": null,
|
| 42 |
+
"strategy": "group",
|
| 43 |
+
"symmetric": true,
|
| 44 |
+
"type": "int",
|
| 45 |
+
"zp_dtype": null
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
},
|
| 49 |
+
"format": "pack-quantized",
|
| 50 |
+
"global_compression_ratio": null,
|
| 51 |
+
"ignore": [
|
| 52 |
+
"model.vision_tower.patch_embedder.input_proj",
|
| 53 |
+
"model.vision_tower.encoder.layers.0.self_attn.q_proj.linear",
|
| 54 |
+
"model.vision_tower.encoder.layers.0.self_attn.k_proj.linear",
|
| 55 |
+
"model.vision_tower.encoder.layers.0.self_attn.v_proj.linear",
|
| 56 |
+
"model.vision_tower.encoder.layers.0.self_attn.o_proj.linear",
|
| 57 |
+
"model.vision_tower.encoder.layers.0.mlp.gate_proj.linear",
|
| 58 |
+
"model.vision_tower.encoder.layers.0.mlp.up_proj.linear",
|
| 59 |
+
"model.vision_tower.encoder.layers.0.mlp.down_proj.linear",
|
| 60 |
+
"model.vision_tower.encoder.layers.1.self_attn.q_proj.linear",
|
| 61 |
+
"model.vision_tower.encoder.layers.1.self_attn.k_proj.linear",
|
| 62 |
+
"model.vision_tower.encoder.layers.1.self_attn.v_proj.linear",
|
| 63 |
+
"model.vision_tower.encoder.layers.1.self_attn.o_proj.linear",
|
| 64 |
+
"model.vision_tower.encoder.layers.1.mlp.gate_proj.linear",
|
| 65 |
+
"model.vision_tower.encoder.layers.1.mlp.up_proj.linear",
|
| 66 |
+
"model.vision_tower.encoder.layers.1.mlp.down_proj.linear",
|
| 67 |
+
"model.vision_tower.encoder.layers.2.self_attn.q_proj.linear",
|
| 68 |
+
"model.vision_tower.encoder.layers.2.self_attn.k_proj.linear",
|
| 69 |
+
"model.vision_tower.encoder.layers.2.self_attn.v_proj.linear",
|
| 70 |
+
"model.vision_tower.encoder.layers.2.self_attn.o_proj.linear",
|
| 71 |
+
"model.vision_tower.encoder.layers.2.mlp.gate_proj.linear",
|
| 72 |
+
"model.vision_tower.encoder.layers.2.mlp.up_proj.linear",
|
| 73 |
+
"model.vision_tower.encoder.layers.2.mlp.down_proj.linear",
|
| 74 |
+
"model.vision_tower.encoder.layers.3.self_attn.q_proj.linear",
|
| 75 |
+
"model.vision_tower.encoder.layers.3.self_attn.k_proj.linear",
|
| 76 |
+
"model.vision_tower.encoder.layers.3.self_attn.v_proj.linear",
|
| 77 |
+
"model.vision_tower.encoder.layers.3.self_attn.o_proj.linear",
|
| 78 |
+
"model.vision_tower.encoder.layers.3.mlp.gate_proj.linear",
|
| 79 |
+
"model.vision_tower.encoder.layers.3.mlp.up_proj.linear",
|
| 80 |
+
"model.vision_tower.encoder.layers.3.mlp.down_proj.linear",
|
| 81 |
+
"model.vision_tower.encoder.layers.4.self_attn.q_proj.linear",
|
| 82 |
+
"model.vision_tower.encoder.layers.4.self_attn.k_proj.linear",
|
| 83 |
+
"model.vision_tower.encoder.layers.4.self_attn.v_proj.linear",
|
| 84 |
+
"model.vision_tower.encoder.layers.4.self_attn.o_proj.linear",
|
| 85 |
+
"model.vision_tower.encoder.layers.4.mlp.gate_proj.linear",
|
| 86 |
+
"model.vision_tower.encoder.layers.4.mlp.up_proj.linear",
|
| 87 |
+
"model.vision_tower.encoder.layers.4.mlp.down_proj.linear",
|
| 88 |
+
"model.vision_tower.encoder.layers.5.self_attn.q_proj.linear",
|
| 89 |
+
"model.vision_tower.encoder.layers.5.self_attn.k_proj.linear",
|
| 90 |
+
"model.vision_tower.encoder.layers.5.self_attn.v_proj.linear",
|
| 91 |
+
"model.vision_tower.encoder.layers.5.self_attn.o_proj.linear",
|
| 92 |
+
"model.vision_tower.encoder.layers.5.mlp.gate_proj.linear",
|
| 93 |
+
"model.vision_tower.encoder.layers.5.mlp.up_proj.linear",
|
| 94 |
+
"model.vision_tower.encoder.layers.5.mlp.down_proj.linear",
|
| 95 |
+
"model.vision_tower.encoder.layers.6.self_attn.q_proj.linear",
|
| 96 |
+
"model.vision_tower.encoder.layers.6.self_attn.k_proj.linear",
|
| 97 |
+
"model.vision_tower.encoder.layers.6.self_attn.v_proj.linear",
|
| 98 |
+
"model.vision_tower.encoder.layers.6.self_attn.o_proj.linear",
|
| 99 |
+
"model.vision_tower.encoder.layers.6.mlp.gate_proj.linear",
|
| 100 |
+
"model.vision_tower.encoder.layers.6.mlp.up_proj.linear",
|
| 101 |
+
"model.vision_tower.encoder.layers.6.mlp.down_proj.linear",
|
| 102 |
+
"model.vision_tower.encoder.layers.7.self_attn.q_proj.linear",
|
| 103 |
+
"model.vision_tower.encoder.layers.7.self_attn.k_proj.linear",
|
| 104 |
+
"model.vision_tower.encoder.layers.7.self_attn.v_proj.linear",
|
| 105 |
+
"model.vision_tower.encoder.layers.7.self_attn.o_proj.linear",
|
| 106 |
+
"model.vision_tower.encoder.layers.7.mlp.gate_proj.linear",
|
| 107 |
+
"model.vision_tower.encoder.layers.7.mlp.up_proj.linear",
|
| 108 |
+
"model.vision_tower.encoder.layers.7.mlp.down_proj.linear",
|
| 109 |
+
"model.vision_tower.encoder.layers.8.self_attn.q_proj.linear",
|
| 110 |
+
"model.vision_tower.encoder.layers.8.self_attn.k_proj.linear",
|
| 111 |
+
"model.vision_tower.encoder.layers.8.self_attn.v_proj.linear",
|
| 112 |
+
"model.vision_tower.encoder.layers.8.self_attn.o_proj.linear",
|
| 113 |
+
"model.vision_tower.encoder.layers.8.mlp.gate_proj.linear",
|
| 114 |
+
"model.vision_tower.encoder.layers.8.mlp.up_proj.linear",
|
| 115 |
+
"model.vision_tower.encoder.layers.8.mlp.down_proj.linear",
|
| 116 |
+
"model.vision_tower.encoder.layers.9.self_attn.q_proj.linear",
|
| 117 |
+
"model.vision_tower.encoder.layers.9.self_attn.k_proj.linear",
|
| 118 |
+
"model.vision_tower.encoder.layers.9.self_attn.v_proj.linear",
|
| 119 |
+
"model.vision_tower.encoder.layers.9.self_attn.o_proj.linear",
|
| 120 |
+
"model.vision_tower.encoder.layers.9.mlp.gate_proj.linear",
|
| 121 |
+
"model.vision_tower.encoder.layers.9.mlp.up_proj.linear",
|
| 122 |
+
"model.vision_tower.encoder.layers.9.mlp.down_proj.linear",
|
| 123 |
+
"model.vision_tower.encoder.layers.10.self_attn.q_proj.linear",
|
| 124 |
+
"model.vision_tower.encoder.layers.10.self_attn.k_proj.linear",
|
| 125 |
+
"model.vision_tower.encoder.layers.10.self_attn.v_proj.linear",
|
| 126 |
+
"model.vision_tower.encoder.layers.10.self_attn.o_proj.linear",
|
| 127 |
+
"model.vision_tower.encoder.layers.10.mlp.gate_proj.linear",
|
| 128 |
+
"model.vision_tower.encoder.layers.10.mlp.up_proj.linear",
|
| 129 |
+
"model.vision_tower.encoder.layers.10.mlp.down_proj.linear",
|
| 130 |
+
"model.vision_tower.encoder.layers.11.self_attn.q_proj.linear",
|
| 131 |
+
"model.vision_tower.encoder.layers.11.self_attn.k_proj.linear",
|
| 132 |
+
"model.vision_tower.encoder.layers.11.self_attn.v_proj.linear",
|
| 133 |
+
"model.vision_tower.encoder.layers.11.self_attn.o_proj.linear",
|
| 134 |
+
"model.vision_tower.encoder.layers.11.mlp.gate_proj.linear",
|
| 135 |
+
"model.vision_tower.encoder.layers.11.mlp.up_proj.linear",
|
| 136 |
+
"model.vision_tower.encoder.layers.11.mlp.down_proj.linear",
|
| 137 |
+
"model.vision_tower.encoder.layers.12.self_attn.q_proj.linear",
|
| 138 |
+
"model.vision_tower.encoder.layers.12.self_attn.k_proj.linear",
|
| 139 |
+
"model.vision_tower.encoder.layers.12.self_attn.v_proj.linear",
|
| 140 |
+
"model.vision_tower.encoder.layers.12.self_attn.o_proj.linear",
|
| 141 |
+
"model.vision_tower.encoder.layers.12.mlp.gate_proj.linear",
|
| 142 |
+
"model.vision_tower.encoder.layers.12.mlp.up_proj.linear",
|
| 143 |
+
"model.vision_tower.encoder.layers.12.mlp.down_proj.linear",
|
| 144 |
+
"model.vision_tower.encoder.layers.13.self_attn.q_proj.linear",
|
| 145 |
+
"model.vision_tower.encoder.layers.13.self_attn.k_proj.linear",
|
| 146 |
+
"model.vision_tower.encoder.layers.13.self_attn.v_proj.linear",
|
| 147 |
+
"model.vision_tower.encoder.layers.13.self_attn.o_proj.linear",
|
| 148 |
+
"model.vision_tower.encoder.layers.13.mlp.gate_proj.linear",
|
| 149 |
+
"model.vision_tower.encoder.layers.13.mlp.up_proj.linear",
|
| 150 |
+
"model.vision_tower.encoder.layers.13.mlp.down_proj.linear",
|
| 151 |
+
"model.vision_tower.encoder.layers.14.self_attn.q_proj.linear",
|
| 152 |
+
"model.vision_tower.encoder.layers.14.self_attn.k_proj.linear",
|
| 153 |
+
"model.vision_tower.encoder.layers.14.self_attn.v_proj.linear",
|
| 154 |
+
"model.vision_tower.encoder.layers.14.self_attn.o_proj.linear",
|
| 155 |
+
"model.vision_tower.encoder.layers.14.mlp.gate_proj.linear",
|
| 156 |
+
"model.vision_tower.encoder.layers.14.mlp.up_proj.linear",
|
| 157 |
+
"model.vision_tower.encoder.layers.14.mlp.down_proj.linear",
|
| 158 |
+
"model.vision_tower.encoder.layers.15.self_attn.q_proj.linear",
|
| 159 |
+
"model.vision_tower.encoder.layers.15.self_attn.k_proj.linear",
|
| 160 |
+
"model.vision_tower.encoder.layers.15.self_attn.v_proj.linear",
|
| 161 |
+
"model.vision_tower.encoder.layers.15.self_attn.o_proj.linear",
|
| 162 |
+
"model.vision_tower.encoder.layers.15.mlp.gate_proj.linear",
|
| 163 |
+
"model.vision_tower.encoder.layers.15.mlp.up_proj.linear",
|
| 164 |
+
"model.vision_tower.encoder.layers.15.mlp.down_proj.linear",
|
| 165 |
+
"model.vision_tower.encoder.layers.16.self_attn.q_proj.linear",
|
| 166 |
+
"model.vision_tower.encoder.layers.16.self_attn.k_proj.linear",
|
| 167 |
+
"model.vision_tower.encoder.layers.16.self_attn.v_proj.linear",
|
| 168 |
+
"model.vision_tower.encoder.layers.16.self_attn.o_proj.linear",
|
| 169 |
+
"model.vision_tower.encoder.layers.16.mlp.gate_proj.linear",
|
| 170 |
+
"model.vision_tower.encoder.layers.16.mlp.up_proj.linear",
|
| 171 |
+
"model.vision_tower.encoder.layers.16.mlp.down_proj.linear",
|
| 172 |
+
"model.vision_tower.encoder.layers.17.self_attn.q_proj.linear",
|
| 173 |
+
"model.vision_tower.encoder.layers.17.self_attn.k_proj.linear",
|
| 174 |
+
"model.vision_tower.encoder.layers.17.self_attn.v_proj.linear",
|
| 175 |
+
"model.vision_tower.encoder.layers.17.self_attn.o_proj.linear",
|
| 176 |
+
"model.vision_tower.encoder.layers.17.mlp.gate_proj.linear",
|
| 177 |
+
"model.vision_tower.encoder.layers.17.mlp.up_proj.linear",
|
| 178 |
+
"model.vision_tower.encoder.layers.17.mlp.down_proj.linear",
|
| 179 |
+
"model.vision_tower.encoder.layers.18.self_attn.q_proj.linear",
|
| 180 |
+
"model.vision_tower.encoder.layers.18.self_attn.k_proj.linear",
|
| 181 |
+
"model.vision_tower.encoder.layers.18.self_attn.v_proj.linear",
|
| 182 |
+
"model.vision_tower.encoder.layers.18.self_attn.o_proj.linear",
|
| 183 |
+
"model.vision_tower.encoder.layers.18.mlp.gate_proj.linear",
|
| 184 |
+
"model.vision_tower.encoder.layers.18.mlp.up_proj.linear",
|
| 185 |
+
"model.vision_tower.encoder.layers.18.mlp.down_proj.linear",
|
| 186 |
+
"model.vision_tower.encoder.layers.19.self_attn.q_proj.linear",
|
| 187 |
+
"model.vision_tower.encoder.layers.19.self_attn.k_proj.linear",
|
| 188 |
+
"model.vision_tower.encoder.layers.19.self_attn.v_proj.linear",
|
| 189 |
+
"model.vision_tower.encoder.layers.19.self_attn.o_proj.linear",
|
| 190 |
+
"model.vision_tower.encoder.layers.19.mlp.gate_proj.linear",
|
| 191 |
+
"model.vision_tower.encoder.layers.19.mlp.up_proj.linear",
|
| 192 |
+
"model.vision_tower.encoder.layers.19.mlp.down_proj.linear",
|
| 193 |
+
"model.vision_tower.encoder.layers.20.self_attn.q_proj.linear",
|
| 194 |
+
"model.vision_tower.encoder.layers.20.self_attn.k_proj.linear",
|
| 195 |
+
"model.vision_tower.encoder.layers.20.self_attn.v_proj.linear",
|
| 196 |
+
"model.vision_tower.encoder.layers.20.self_attn.o_proj.linear",
|
| 197 |
+
"model.vision_tower.encoder.layers.20.mlp.gate_proj.linear",
|
| 198 |
+
"model.vision_tower.encoder.layers.20.mlp.up_proj.linear",
|
| 199 |
+
"model.vision_tower.encoder.layers.20.mlp.down_proj.linear",
|
| 200 |
+
"model.vision_tower.encoder.layers.21.self_attn.q_proj.linear",
|
| 201 |
+
"model.vision_tower.encoder.layers.21.self_attn.k_proj.linear",
|
| 202 |
+
"model.vision_tower.encoder.layers.21.self_attn.v_proj.linear",
|
| 203 |
+
"model.vision_tower.encoder.layers.21.self_attn.o_proj.linear",
|
| 204 |
+
"model.vision_tower.encoder.layers.21.mlp.gate_proj.linear",
|
| 205 |
+
"model.vision_tower.encoder.layers.21.mlp.up_proj.linear",
|
| 206 |
+
"model.vision_tower.encoder.layers.21.mlp.down_proj.linear",
|
| 207 |
+
"model.vision_tower.encoder.layers.22.self_attn.q_proj.linear",
|
| 208 |
+
"model.vision_tower.encoder.layers.22.self_attn.k_proj.linear",
|
| 209 |
+
"model.vision_tower.encoder.layers.22.self_attn.v_proj.linear",
|
| 210 |
+
"model.vision_tower.encoder.layers.22.self_attn.o_proj.linear",
|
| 211 |
+
"model.vision_tower.encoder.layers.22.mlp.gate_proj.linear",
|
| 212 |
+
"model.vision_tower.encoder.layers.22.mlp.up_proj.linear",
|
| 213 |
+
"model.vision_tower.encoder.layers.22.mlp.down_proj.linear",
|
| 214 |
+
"model.vision_tower.encoder.layers.23.self_attn.q_proj.linear",
|
| 215 |
+
"model.vision_tower.encoder.layers.23.self_attn.k_proj.linear",
|
| 216 |
+
"model.vision_tower.encoder.layers.23.self_attn.v_proj.linear",
|
| 217 |
+
"model.vision_tower.encoder.layers.23.self_attn.o_proj.linear",
|
| 218 |
+
"model.vision_tower.encoder.layers.23.mlp.gate_proj.linear",
|
| 219 |
+
"model.vision_tower.encoder.layers.23.mlp.up_proj.linear",
|
| 220 |
+
"model.vision_tower.encoder.layers.23.mlp.down_proj.linear",
|
| 221 |
+
"model.vision_tower.encoder.layers.24.self_attn.q_proj.linear",
|
| 222 |
+
"model.vision_tower.encoder.layers.24.self_attn.k_proj.linear",
|
| 223 |
+
"model.vision_tower.encoder.layers.24.self_attn.v_proj.linear",
|
| 224 |
+
"model.vision_tower.encoder.layers.24.self_attn.o_proj.linear",
|
| 225 |
+
"model.vision_tower.encoder.layers.24.mlp.gate_proj.linear",
|
| 226 |
+
"model.vision_tower.encoder.layers.24.mlp.up_proj.linear",
|
| 227 |
+
"model.vision_tower.encoder.layers.24.mlp.down_proj.linear",
|
| 228 |
+
"model.vision_tower.encoder.layers.25.self_attn.q_proj.linear",
|
| 229 |
+
"model.vision_tower.encoder.layers.25.self_attn.k_proj.linear",
|
| 230 |
+
"model.vision_tower.encoder.layers.25.self_attn.v_proj.linear",
|
| 231 |
+
"model.vision_tower.encoder.layers.25.self_attn.o_proj.linear",
|
| 232 |
+
"model.vision_tower.encoder.layers.25.mlp.gate_proj.linear",
|
| 233 |
+
"model.vision_tower.encoder.layers.25.mlp.up_proj.linear",
|
| 234 |
+
"model.vision_tower.encoder.layers.25.mlp.down_proj.linear",
|
| 235 |
+
"model.vision_tower.encoder.layers.26.self_attn.q_proj.linear",
|
| 236 |
+
"model.vision_tower.encoder.layers.26.self_attn.k_proj.linear",
|
| 237 |
+
"model.vision_tower.encoder.layers.26.self_attn.v_proj.linear",
|
| 238 |
+
"model.vision_tower.encoder.layers.26.self_attn.o_proj.linear",
|
| 239 |
+
"model.vision_tower.encoder.layers.26.mlp.gate_proj.linear",
|
| 240 |
+
"model.vision_tower.encoder.layers.26.mlp.up_proj.linear",
|
| 241 |
+
"model.vision_tower.encoder.layers.26.mlp.down_proj.linear",
|
| 242 |
+
"model.language_model.layers.0.router",
|
| 243 |
+
"model.language_model.layers.0.router.proj",
|
| 244 |
+
"model.language_model.layers.1.router",
|
| 245 |
+
"model.language_model.layers.1.router.proj",
|
| 246 |
+
"model.language_model.layers.2.router",
|
| 247 |
+
"model.language_model.layers.2.router.proj",
|
| 248 |
+
"model.language_model.layers.3.router",
|
| 249 |
+
"model.language_model.layers.3.router.proj",
|
| 250 |
+
"model.language_model.layers.4.router",
|
| 251 |
+
"model.language_model.layers.4.router.proj",
|
| 252 |
+
"model.language_model.layers.5.router",
|
| 253 |
+
"model.language_model.layers.5.router.proj",
|
| 254 |
+
"model.language_model.layers.6.router",
|
| 255 |
+
"model.language_model.layers.6.router.proj",
|
| 256 |
+
"model.language_model.layers.7.router",
|
| 257 |
+
"model.language_model.layers.7.router.proj",
|
| 258 |
+
"model.language_model.layers.8.router",
|
| 259 |
+
"model.language_model.layers.8.router.proj",
|
| 260 |
+
"model.language_model.layers.9.router",
|
| 261 |
+
"model.language_model.layers.9.router.proj",
|
| 262 |
+
"model.language_model.layers.10.router",
|
| 263 |
+
"model.language_model.layers.10.router.proj",
|
| 264 |
+
"model.language_model.layers.11.router",
|
| 265 |
+
"model.language_model.layers.11.router.proj",
|
| 266 |
+
"model.language_model.layers.12.router",
|
| 267 |
+
"model.language_model.layers.12.router.proj",
|
| 268 |
+
"model.language_model.layers.13.router",
|
| 269 |
+
"model.language_model.layers.13.router.proj",
|
| 270 |
+
"model.language_model.layers.14.router",
|
| 271 |
+
"model.language_model.layers.14.router.proj",
|
| 272 |
+
"model.language_model.layers.15.router",
|
| 273 |
+
"model.language_model.layers.15.router.proj",
|
| 274 |
+
"model.language_model.layers.16.router",
|
| 275 |
+
"model.language_model.layers.16.router.proj",
|
| 276 |
+
"model.language_model.layers.17.router",
|
| 277 |
+
"model.language_model.layers.17.router.proj",
|
| 278 |
+
"model.language_model.layers.18.router",
|
| 279 |
+
"model.language_model.layers.18.router.proj",
|
| 280 |
+
"model.language_model.layers.19.router",
|
| 281 |
+
"model.language_model.layers.19.router.proj",
|
| 282 |
+
"model.language_model.layers.20.router",
|
| 283 |
+
"model.language_model.layers.20.router.proj",
|
| 284 |
+
"model.language_model.layers.21.router",
|
| 285 |
+
"model.language_model.layers.21.router.proj",
|
| 286 |
+
"model.language_model.layers.22.router",
|
| 287 |
+
"model.language_model.layers.22.router.proj",
|
| 288 |
+
"model.language_model.layers.23.router",
|
| 289 |
+
"model.language_model.layers.23.router.proj",
|
| 290 |
+
"model.language_model.layers.24.router",
|
| 291 |
+
"model.language_model.layers.24.router.proj",
|
| 292 |
+
"model.language_model.layers.25.router",
|
| 293 |
+
"model.language_model.layers.25.router.proj",
|
| 294 |
+
"model.language_model.layers.26.router",
|
| 295 |
+
"model.language_model.layers.26.router.proj",
|
| 296 |
+
"model.language_model.layers.27.router",
|
| 297 |
+
"model.language_model.layers.27.router.proj",
|
| 298 |
+
"model.language_model.layers.28.router",
|
| 299 |
+
"model.language_model.layers.28.router.proj",
|
| 300 |
+
"model.language_model.layers.29.router",
|
| 301 |
+
"model.language_model.layers.29.router.proj",
|
| 302 |
+
"model.embed_vision.embedding_projection",
|
| 303 |
+
"lm_head"
|
| 304 |
+
],
|
| 305 |
+
"kv_cache_scheme": null,
|
| 306 |
+
"quant_method": "compressed-tensors",
|
| 307 |
+
"quantization_status": "compressed",
|
| 308 |
+
"sparsity_config": {},
|
| 309 |
+
"transform_config": {},
|
| 310 |
+
"version": "0.18.0"
|
| 311 |
+
}
|
| 312 |
+
}
|
provenance/calibration-and-source.json
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"lineage": {
|
| 3 |
+
"original_model_family": "google/gemma-4-26B-A4B-it",
|
| 4 |
+
"qat_parent_lineage": "google/gemma-4-26B-A4B-it-qat-q4_0-unquantized",
|
| 5 |
+
"immediate_quantization_parent": "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic",
|
| 6 |
+
"immediate_parent_revision": "d62fa836581401beafd08fdd624927e31dcac6ee",
|
| 7 |
+
"immediate_parent_relation": "QAT/Heretic tuned and uncensored derivative; this W4A16 artifact quantizes that parent, not stock Google IT weights.",
|
| 8 |
+
"license": "Apache-2.0 inherited from the parent"
|
| 9 |
+
},
|
| 10 |
+
"source_file_sha256": {
|
| 11 |
+
"model-00001-of-00011.safetensors": "0a8ef8c2e3a967601b62b2bd052f9327c5e80d844bff495cdabba0a32c988fd9",
|
| 12 |
+
"model-00002-of-00011.safetensors": "b643e01d2a56cffd216f4cb4025bf312142af46127a3f3701fe1548758edfdfe",
|
| 13 |
+
"model-00003-of-00011.safetensors": "724dd311e180744593e7cff6dc4a3dbd51cccf39c3fe23e8589121f7a125576e",
|
| 14 |
+
"model-00004-of-00011.safetensors": "01e459f49f7b5c7dfa9f4fba53a78af0f9978ca49b56b0404008116a6b171abf",
|
| 15 |
+
"model-00005-of-00011.safetensors": "e800b4e729edc6f54672006150ad9bcec046b0b5b2d620cabe277242b52acaab",
|
| 16 |
+
"model-00006-of-00011.safetensors": "0a90f287557e40ebedee1d595035b760642217c8960f8cf1b494034c6d4cee86",
|
| 17 |
+
"model-00007-of-00011.safetensors": "3b796785e6f9f67d74d75facaf1ec95651d3409def2c67afc1a3b4237a9f544b",
|
| 18 |
+
"model-00008-of-00011.safetensors": "5dd1bf454448f1e1f7f58e68eb4908b557d89e6cfd04cc13731b490635dc64e6",
|
| 19 |
+
"model-00009-of-00011.safetensors": "1887636919fe8d0326964a3645a867bbe9ecf8c4c9202c2a8d2927cfa2725b46",
|
| 20 |
+
"model-00010-of-00011.safetensors": "36498727d58f158cb29e7d93dbbf457bf8fb0e883859888f6db2cd3f5fe585b2",
|
| 21 |
+
"model-00011-of-00011.safetensors": "33918a3f3e04864eba494e5515fd9b0575c2a923d0cf080d12b6fb922d41bbeb",
|
| 22 |
+
"config.json": "fb61827d95f23593a13dbc03023ac4892f31495b0348f2f5ef9a720c7568f772",
|
| 23 |
+
"generation_config.json": "4985d1a588cdbd922d99c3ccad042b0493773a499937fa248d5849ef4afb4101",
|
| 24 |
+
"model.safetensors.index.json": "1e9e4718c49193ff47e2ca0847dfad3cfa5e57e6799463994284fc3284f93c7d",
|
| 25 |
+
"processor_config.json": "32bdf45d2ad4cc29a0822ddd157a182de76644f0419a6228d151495256e9813c",
|
| 26 |
+
"tokenizer.json": "cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f",
|
| 27 |
+
"tokenizer_config.json": "b8045a4576903e86903291d5cbdd4adfc8859e9ce3c98621bdbd957f73ed394b",
|
| 28 |
+
"chat_template.jinja": "ae53464bf3be25802b3a5b37def7fd89667067d7577049b3b2d74c4d8de4c6d4"
|
| 29 |
+
},
|
| 30 |
+
"source_architecture": {
|
| 31 |
+
"model_type": "gemma4",
|
| 32 |
+
"architectures": [
|
| 33 |
+
"Gemma4ForConditionalGeneration"
|
| 34 |
+
],
|
| 35 |
+
"text_max_position_embeddings": 262144,
|
| 36 |
+
"intermediate_size": 2112,
|
| 37 |
+
"moe_intermediate_size": 704
|
| 38 |
+
},
|
| 39 |
+
"calibration": {
|
| 40 |
+
"seed": 20260812,
|
| 41 |
+
"text_windows": 512,
|
| 42 |
+
"tokens_per_text_window": 512,
|
| 43 |
+
"image_samples": 1024,
|
| 44 |
+
"image_source": "COCO 2017 validation",
|
| 45 |
+
"source_urls": [
|
| 46 |
+
"https://s3.amazonaws.com/images.cocodataset.org/zips/val2017.zip",
|
| 47 |
+
"https://s3.amazonaws.com/images.cocodataset.org/annotations/annotations_trainval2017.zip"
|
| 48 |
+
],
|
| 49 |
+
"text_sources": [
|
| 50 |
+
{
|
| 51 |
+
"dataset": "Salesforce/wikitext",
|
| 52 |
+
"config": "wikitext-103-raw-v1",
|
| 53 |
+
"count": 192
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"dataset": "HuggingFaceTB/smoltalk",
|
| 57 |
+
"config": "openhermes-100k",
|
| 58 |
+
"count": 192
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"dataset": "HuggingFaceTB/smoltalk",
|
| 62 |
+
"config": "apigen-80k",
|
| 63 |
+
"count": 128
|
| 64 |
+
}
|
| 65 |
+
]
|
| 66 |
+
},
|
| 67 |
+
"quantization_run": {
|
| 68 |
+
"weight_bits": 4,
|
| 69 |
+
"activation_bits": 16,
|
| 70 |
+
"group_size": 64,
|
| 71 |
+
"algorithm": "GPTQ",
|
| 72 |
+
"pipeline": "sequential",
|
| 73 |
+
"max_seq_length": 1024,
|
| 74 |
+
"moe_calibrate_all_experts": true,
|
| 75 |
+
"ignore": [
|
| 76 |
+
"re:.*lm_head$",
|
| 77 |
+
"re:.*vision_tower.*",
|
| 78 |
+
"re:.*router.*",
|
| 79 |
+
"re:.*embed_tokens.*",
|
| 80 |
+
"re:.*embed_vision.*"
|
| 81 |
+
],
|
| 82 |
+
"sample_layout": "first 512 image+text, remaining 512 image-instruction",
|
| 83 |
+
"limit_mm_per_prompt": {
|
| 84 |
+
"image": 1,
|
| 85 |
+
"video": 0
|
| 86 |
+
}
|
| 87 |
+
},
|
| 88 |
+
"conversion_recipe": {
|
| 89 |
+
"config_groups": {
|
| 90 |
+
"group_0": {
|
| 91 |
+
"format": "pack-quantized",
|
| 92 |
+
"input_activations": null,
|
| 93 |
+
"output_activations": null,
|
| 94 |
+
"targets": [
|
| 95 |
+
"Linear"
|
| 96 |
+
],
|
| 97 |
+
"weights": {
|
| 98 |
+
"actorder": "static",
|
| 99 |
+
"block_structure": null,
|
| 100 |
+
"dynamic": false,
|
| 101 |
+
"group_size": 64,
|
| 102 |
+
"num_bits": 4,
|
| 103 |
+
"observer": "memoryless_minmax",
|
| 104 |
+
"observer_kwargs": {},
|
| 105 |
+
"scale_dtype": null,
|
| 106 |
+
"strategy": "group",
|
| 107 |
+
"symmetric": true,
|
| 108 |
+
"type": "int",
|
| 109 |
+
"zp_dtype": null
|
| 110 |
+
}
|
| 111 |
+
}
|
| 112 |
+
},
|
| 113 |
+
"format": "pack-quantized",
|
| 114 |
+
"global_compression_ratio": null,
|
| 115 |
+
"ignore": [
|
| 116 |
+
"model.vision_tower.patch_embedder.input_proj",
|
| 117 |
+
"model.vision_tower.encoder.layers.0.self_attn.q_proj.linear",
|
| 118 |
+
"model.vision_tower.encoder.layers.0.self_attn.k_proj.linear",
|
| 119 |
+
"model.vision_tower.encoder.layers.0.self_attn.v_proj.linear",
|
| 120 |
+
"model.vision_tower.encoder.layers.0.self_attn.o_proj.linear",
|
| 121 |
+
"model.vision_tower.encoder.layers.0.mlp.gate_proj.linear",
|
| 122 |
+
"model.vision_tower.encoder.layers.0.mlp.up_proj.linear",
|
| 123 |
+
"model.vision_tower.encoder.layers.0.mlp.down_proj.linear",
|
| 124 |
+
"model.vision_tower.encoder.layers.1.self_attn.q_proj.linear",
|
| 125 |
+
"model.vision_tower.encoder.layers.1.self_attn.k_proj.linear",
|
| 126 |
+
"model.vision_tower.encoder.layers.1.self_attn.v_proj.linear",
|
| 127 |
+
"model.vision_tower.encoder.layers.1.self_attn.o_proj.linear",
|
| 128 |
+
"model.vision_tower.encoder.layers.1.mlp.gate_proj.linear",
|
| 129 |
+
"model.vision_tower.encoder.layers.1.mlp.up_proj.linear",
|
| 130 |
+
"model.vision_tower.encoder.layers.1.mlp.down_proj.linear",
|
| 131 |
+
"model.vision_tower.encoder.layers.2.self_attn.q_proj.linear",
|
| 132 |
+
"model.vision_tower.encoder.layers.2.self_attn.k_proj.linear",
|
| 133 |
+
"model.vision_tower.encoder.layers.2.self_attn.v_proj.linear",
|
| 134 |
+
"model.vision_tower.encoder.layers.2.self_attn.o_proj.linear",
|
| 135 |
+
"model.vision_tower.encoder.layers.2.mlp.gate_proj.linear",
|
| 136 |
+
"model.vision_tower.encoder.layers.2.mlp.up_proj.linear",
|
| 137 |
+
"model.vision_tower.encoder.layers.2.mlp.down_proj.linear",
|
| 138 |
+
"model.vision_tower.encoder.layers.3.self_attn.q_proj.linear",
|
| 139 |
+
"model.vision_tower.encoder.layers.3.self_attn.k_proj.linear",
|
| 140 |
+
"model.vision_tower.encoder.layers.3.self_attn.v_proj.linear",
|
| 141 |
+
"model.vision_tower.encoder.layers.3.self_attn.o_proj.linear",
|
| 142 |
+
"model.vision_tower.encoder.layers.3.mlp.gate_proj.linear",
|
| 143 |
+
"model.vision_tower.encoder.layers.3.mlp.up_proj.linear",
|
| 144 |
+
"model.vision_tower.encoder.layers.3.mlp.down_proj.linear",
|
| 145 |
+
"model.vision_tower.encoder.layers.4.self_attn.q_proj.linear",
|
| 146 |
+
"model.vision_tower.encoder.layers.4.self_attn.k_proj.linear",
|
| 147 |
+
"model.vision_tower.encoder.layers.4.self_attn.v_proj.linear",
|
| 148 |
+
"model.vision_tower.encoder.layers.4.self_attn.o_proj.linear",
|
| 149 |
+
"model.vision_tower.encoder.layers.4.mlp.gate_proj.linear",
|
| 150 |
+
"model.vision_tower.encoder.layers.4.mlp.up_proj.linear",
|
| 151 |
+
"model.vision_tower.encoder.layers.4.mlp.down_proj.linear",
|
| 152 |
+
"model.vision_tower.encoder.layers.5.self_attn.q_proj.linear",
|
| 153 |
+
"model.vision_tower.encoder.layers.5.self_attn.k_proj.linear",
|
| 154 |
+
"model.vision_tower.encoder.layers.5.self_attn.v_proj.linear",
|
| 155 |
+
"model.vision_tower.encoder.layers.5.self_attn.o_proj.linear",
|
| 156 |
+
"model.vision_tower.encoder.layers.5.mlp.gate_proj.linear",
|
| 157 |
+
"model.vision_tower.encoder.layers.5.mlp.up_proj.linear",
|
| 158 |
+
"model.vision_tower.encoder.layers.5.mlp.down_proj.linear",
|
| 159 |
+
"model.vision_tower.encoder.layers.6.self_attn.q_proj.linear",
|
| 160 |
+
"model.vision_tower.encoder.layers.6.self_attn.k_proj.linear",
|
| 161 |
+
"model.vision_tower.encoder.layers.6.self_attn.v_proj.linear",
|
| 162 |
+
"model.vision_tower.encoder.layers.6.self_attn.o_proj.linear",
|
| 163 |
+
"model.vision_tower.encoder.layers.6.mlp.gate_proj.linear",
|
| 164 |
+
"model.vision_tower.encoder.layers.6.mlp.up_proj.linear",
|
| 165 |
+
"model.vision_tower.encoder.layers.6.mlp.down_proj.linear",
|
| 166 |
+
"model.vision_tower.encoder.layers.7.self_attn.q_proj.linear",
|
| 167 |
+
"model.vision_tower.encoder.layers.7.self_attn.k_proj.linear",
|
| 168 |
+
"model.vision_tower.encoder.layers.7.self_attn.v_proj.linear",
|
| 169 |
+
"model.vision_tower.encoder.layers.7.self_attn.o_proj.linear",
|
| 170 |
+
"model.vision_tower.encoder.layers.7.mlp.gate_proj.linear",
|
| 171 |
+
"model.vision_tower.encoder.layers.7.mlp.up_proj.linear",
|
| 172 |
+
"model.vision_tower.encoder.layers.7.mlp.down_proj.linear",
|
| 173 |
+
"model.vision_tower.encoder.layers.8.self_attn.q_proj.linear",
|
| 174 |
+
"model.vision_tower.encoder.layers.8.self_attn.k_proj.linear",
|
| 175 |
+
"model.vision_tower.encoder.layers.8.self_attn.v_proj.linear",
|
| 176 |
+
"model.vision_tower.encoder.layers.8.self_attn.o_proj.linear",
|
| 177 |
+
"model.vision_tower.encoder.layers.8.mlp.gate_proj.linear",
|
| 178 |
+
"model.vision_tower.encoder.layers.8.mlp.up_proj.linear",
|
| 179 |
+
"model.vision_tower.encoder.layers.8.mlp.down_proj.linear",
|
| 180 |
+
"model.vision_tower.encoder.layers.9.self_attn.q_proj.linear",
|
| 181 |
+
"model.vision_tower.encoder.layers.9.self_attn.k_proj.linear",
|
| 182 |
+
"model.vision_tower.encoder.layers.9.self_attn.v_proj.linear",
|
| 183 |
+
"model.vision_tower.encoder.layers.9.self_attn.o_proj.linear",
|
| 184 |
+
"model.vision_tower.encoder.layers.9.mlp.gate_proj.linear",
|
| 185 |
+
"model.vision_tower.encoder.layers.9.mlp.up_proj.linear",
|
| 186 |
+
"model.vision_tower.encoder.layers.9.mlp.down_proj.linear",
|
| 187 |
+
"model.vision_tower.encoder.layers.10.self_attn.q_proj.linear",
|
| 188 |
+
"model.vision_tower.encoder.layers.10.self_attn.k_proj.linear",
|
| 189 |
+
"model.vision_tower.encoder.layers.10.self_attn.v_proj.linear",
|
| 190 |
+
"model.vision_tower.encoder.layers.10.self_attn.o_proj.linear",
|
| 191 |
+
"model.vision_tower.encoder.layers.10.mlp.gate_proj.linear",
|
| 192 |
+
"model.vision_tower.encoder.layers.10.mlp.up_proj.linear",
|
| 193 |
+
"model.vision_tower.encoder.layers.10.mlp.down_proj.linear",
|
| 194 |
+
"model.vision_tower.encoder.layers.11.self_attn.q_proj.linear",
|
| 195 |
+
"model.vision_tower.encoder.layers.11.self_attn.k_proj.linear",
|
| 196 |
+
"model.vision_tower.encoder.layers.11.self_attn.v_proj.linear",
|
| 197 |
+
"model.vision_tower.encoder.layers.11.self_attn.o_proj.linear",
|
| 198 |
+
"model.vision_tower.encoder.layers.11.mlp.gate_proj.linear",
|
| 199 |
+
"model.vision_tower.encoder.layers.11.mlp.up_proj.linear",
|
| 200 |
+
"model.vision_tower.encoder.layers.11.mlp.down_proj.linear",
|
| 201 |
+
"model.vision_tower.encoder.layers.12.self_attn.q_proj.linear",
|
| 202 |
+
"model.vision_tower.encoder.layers.12.self_attn.k_proj.linear",
|
| 203 |
+
"model.vision_tower.encoder.layers.12.self_attn.v_proj.linear",
|
| 204 |
+
"model.vision_tower.encoder.layers.12.self_attn.o_proj.linear",
|
| 205 |
+
"model.vision_tower.encoder.layers.12.mlp.gate_proj.linear",
|
| 206 |
+
"model.vision_tower.encoder.layers.12.mlp.up_proj.linear",
|
| 207 |
+
"model.vision_tower.encoder.layers.12.mlp.down_proj.linear",
|
| 208 |
+
"model.vision_tower.encoder.layers.13.self_attn.q_proj.linear",
|
| 209 |
+
"model.vision_tower.encoder.layers.13.self_attn.k_proj.linear",
|
| 210 |
+
"model.vision_tower.encoder.layers.13.self_attn.v_proj.linear",
|
| 211 |
+
"model.vision_tower.encoder.layers.13.self_attn.o_proj.linear",
|
| 212 |
+
"model.vision_tower.encoder.layers.13.mlp.gate_proj.linear",
|
| 213 |
+
"model.vision_tower.encoder.layers.13.mlp.up_proj.linear",
|
| 214 |
+
"model.vision_tower.encoder.layers.13.mlp.down_proj.linear",
|
| 215 |
+
"model.vision_tower.encoder.layers.14.self_attn.q_proj.linear",
|
| 216 |
+
"model.vision_tower.encoder.layers.14.self_attn.k_proj.linear",
|
| 217 |
+
"model.vision_tower.encoder.layers.14.self_attn.v_proj.linear",
|
| 218 |
+
"model.vision_tower.encoder.layers.14.self_attn.o_proj.linear",
|
| 219 |
+
"model.vision_tower.encoder.layers.14.mlp.gate_proj.linear",
|
| 220 |
+
"model.vision_tower.encoder.layers.14.mlp.up_proj.linear",
|
| 221 |
+
"model.vision_tower.encoder.layers.14.mlp.down_proj.linear",
|
| 222 |
+
"model.vision_tower.encoder.layers.15.self_attn.q_proj.linear",
|
| 223 |
+
"model.vision_tower.encoder.layers.15.self_attn.k_proj.linear",
|
| 224 |
+
"model.vision_tower.encoder.layers.15.self_attn.v_proj.linear",
|
| 225 |
+
"model.vision_tower.encoder.layers.15.self_attn.o_proj.linear",
|
| 226 |
+
"model.vision_tower.encoder.layers.15.mlp.gate_proj.linear",
|
| 227 |
+
"model.vision_tower.encoder.layers.15.mlp.up_proj.linear",
|
| 228 |
+
"model.vision_tower.encoder.layers.15.mlp.down_proj.linear",
|
| 229 |
+
"model.vision_tower.encoder.layers.16.self_attn.q_proj.linear",
|
| 230 |
+
"model.vision_tower.encoder.layers.16.self_attn.k_proj.linear",
|
| 231 |
+
"model.vision_tower.encoder.layers.16.self_attn.v_proj.linear",
|
| 232 |
+
"model.vision_tower.encoder.layers.16.self_attn.o_proj.linear",
|
| 233 |
+
"model.vision_tower.encoder.layers.16.mlp.gate_proj.linear",
|
| 234 |
+
"model.vision_tower.encoder.layers.16.mlp.up_proj.linear",
|
| 235 |
+
"model.vision_tower.encoder.layers.16.mlp.down_proj.linear",
|
| 236 |
+
"model.vision_tower.encoder.layers.17.self_attn.q_proj.linear",
|
| 237 |
+
"model.vision_tower.encoder.layers.17.self_attn.k_proj.linear",
|
| 238 |
+
"model.vision_tower.encoder.layers.17.self_attn.v_proj.linear",
|
| 239 |
+
"model.vision_tower.encoder.layers.17.self_attn.o_proj.linear",
|
| 240 |
+
"model.vision_tower.encoder.layers.17.mlp.gate_proj.linear",
|
| 241 |
+
"model.vision_tower.encoder.layers.17.mlp.up_proj.linear",
|
| 242 |
+
"model.vision_tower.encoder.layers.17.mlp.down_proj.linear",
|
| 243 |
+
"model.vision_tower.encoder.layers.18.self_attn.q_proj.linear",
|
| 244 |
+
"model.vision_tower.encoder.layers.18.self_attn.k_proj.linear",
|
| 245 |
+
"model.vision_tower.encoder.layers.18.self_attn.v_proj.linear",
|
| 246 |
+
"model.vision_tower.encoder.layers.18.self_attn.o_proj.linear",
|
| 247 |
+
"model.vision_tower.encoder.layers.18.mlp.gate_proj.linear",
|
| 248 |
+
"model.vision_tower.encoder.layers.18.mlp.up_proj.linear",
|
| 249 |
+
"model.vision_tower.encoder.layers.18.mlp.down_proj.linear",
|
| 250 |
+
"model.vision_tower.encoder.layers.19.self_attn.q_proj.linear",
|
| 251 |
+
"model.vision_tower.encoder.layers.19.self_attn.k_proj.linear",
|
| 252 |
+
"model.vision_tower.encoder.layers.19.self_attn.v_proj.linear",
|
| 253 |
+
"model.vision_tower.encoder.layers.19.self_attn.o_proj.linear",
|
| 254 |
+
"model.vision_tower.encoder.layers.19.mlp.gate_proj.linear",
|
| 255 |
+
"model.vision_tower.encoder.layers.19.mlp.up_proj.linear",
|
| 256 |
+
"model.vision_tower.encoder.layers.19.mlp.down_proj.linear",
|
| 257 |
+
"model.vision_tower.encoder.layers.20.self_attn.q_proj.linear",
|
| 258 |
+
"model.vision_tower.encoder.layers.20.self_attn.k_proj.linear",
|
| 259 |
+
"model.vision_tower.encoder.layers.20.self_attn.v_proj.linear",
|
| 260 |
+
"model.vision_tower.encoder.layers.20.self_attn.o_proj.linear",
|
| 261 |
+
"model.vision_tower.encoder.layers.20.mlp.gate_proj.linear",
|
| 262 |
+
"model.vision_tower.encoder.layers.20.mlp.up_proj.linear",
|
| 263 |
+
"model.vision_tower.encoder.layers.20.mlp.down_proj.linear",
|
| 264 |
+
"model.vision_tower.encoder.layers.21.self_attn.q_proj.linear",
|
| 265 |
+
"model.vision_tower.encoder.layers.21.self_attn.k_proj.linear",
|
| 266 |
+
"model.vision_tower.encoder.layers.21.self_attn.v_proj.linear",
|
| 267 |
+
"model.vision_tower.encoder.layers.21.self_attn.o_proj.linear",
|
| 268 |
+
"model.vision_tower.encoder.layers.21.mlp.gate_proj.linear",
|
| 269 |
+
"model.vision_tower.encoder.layers.21.mlp.up_proj.linear",
|
| 270 |
+
"model.vision_tower.encoder.layers.21.mlp.down_proj.linear",
|
| 271 |
+
"model.vision_tower.encoder.layers.22.self_attn.q_proj.linear",
|
| 272 |
+
"model.vision_tower.encoder.layers.22.self_attn.k_proj.linear",
|
| 273 |
+
"model.vision_tower.encoder.layers.22.self_attn.v_proj.linear",
|
| 274 |
+
"model.vision_tower.encoder.layers.22.self_attn.o_proj.linear",
|
| 275 |
+
"model.vision_tower.encoder.layers.22.mlp.gate_proj.linear",
|
| 276 |
+
"model.vision_tower.encoder.layers.22.mlp.up_proj.linear",
|
| 277 |
+
"model.vision_tower.encoder.layers.22.mlp.down_proj.linear",
|
| 278 |
+
"model.vision_tower.encoder.layers.23.self_attn.q_proj.linear",
|
| 279 |
+
"model.vision_tower.encoder.layers.23.self_attn.k_proj.linear",
|
| 280 |
+
"model.vision_tower.encoder.layers.23.self_attn.v_proj.linear",
|
| 281 |
+
"model.vision_tower.encoder.layers.23.self_attn.o_proj.linear",
|
| 282 |
+
"model.vision_tower.encoder.layers.23.mlp.gate_proj.linear",
|
| 283 |
+
"model.vision_tower.encoder.layers.23.mlp.up_proj.linear",
|
| 284 |
+
"model.vision_tower.encoder.layers.23.mlp.down_proj.linear",
|
| 285 |
+
"model.vision_tower.encoder.layers.24.self_attn.q_proj.linear",
|
| 286 |
+
"model.vision_tower.encoder.layers.24.self_attn.k_proj.linear",
|
| 287 |
+
"model.vision_tower.encoder.layers.24.self_attn.v_proj.linear",
|
| 288 |
+
"model.vision_tower.encoder.layers.24.self_attn.o_proj.linear",
|
| 289 |
+
"model.vision_tower.encoder.layers.24.mlp.gate_proj.linear",
|
| 290 |
+
"model.vision_tower.encoder.layers.24.mlp.up_proj.linear",
|
| 291 |
+
"model.vision_tower.encoder.layers.24.mlp.down_proj.linear",
|
| 292 |
+
"model.vision_tower.encoder.layers.25.self_attn.q_proj.linear",
|
| 293 |
+
"model.vision_tower.encoder.layers.25.self_attn.k_proj.linear",
|
| 294 |
+
"model.vision_tower.encoder.layers.25.self_attn.v_proj.linear",
|
| 295 |
+
"model.vision_tower.encoder.layers.25.self_attn.o_proj.linear",
|
| 296 |
+
"model.vision_tower.encoder.layers.25.mlp.gate_proj.linear",
|
| 297 |
+
"model.vision_tower.encoder.layers.25.mlp.up_proj.linear",
|
| 298 |
+
"model.vision_tower.encoder.layers.25.mlp.down_proj.linear",
|
| 299 |
+
"model.vision_tower.encoder.layers.26.self_attn.q_proj.linear",
|
| 300 |
+
"model.vision_tower.encoder.layers.26.self_attn.k_proj.linear",
|
| 301 |
+
"model.vision_tower.encoder.layers.26.self_attn.v_proj.linear",
|
| 302 |
+
"model.vision_tower.encoder.layers.26.self_attn.o_proj.linear",
|
| 303 |
+
"model.vision_tower.encoder.layers.26.mlp.gate_proj.linear",
|
| 304 |
+
"model.vision_tower.encoder.layers.26.mlp.up_proj.linear",
|
| 305 |
+
"model.vision_tower.encoder.layers.26.mlp.down_proj.linear",
|
| 306 |
+
"model.language_model.layers.0.router",
|
| 307 |
+
"model.language_model.layers.0.router.proj",
|
| 308 |
+
"model.language_model.layers.1.router",
|
| 309 |
+
"model.language_model.layers.1.router.proj",
|
| 310 |
+
"model.language_model.layers.2.router",
|
| 311 |
+
"model.language_model.layers.2.router.proj",
|
| 312 |
+
"model.language_model.layers.3.router",
|
| 313 |
+
"model.language_model.layers.3.router.proj",
|
| 314 |
+
"model.language_model.layers.4.router",
|
| 315 |
+
"model.language_model.layers.4.router.proj",
|
| 316 |
+
"model.language_model.layers.5.router",
|
| 317 |
+
"model.language_model.layers.5.router.proj",
|
| 318 |
+
"model.language_model.layers.6.router",
|
| 319 |
+
"model.language_model.layers.6.router.proj",
|
| 320 |
+
"model.language_model.layers.7.router",
|
| 321 |
+
"model.language_model.layers.7.router.proj",
|
| 322 |
+
"model.language_model.layers.8.router",
|
| 323 |
+
"model.language_model.layers.8.router.proj",
|
| 324 |
+
"model.language_model.layers.9.router",
|
| 325 |
+
"model.language_model.layers.9.router.proj",
|
| 326 |
+
"model.language_model.layers.10.router",
|
| 327 |
+
"model.language_model.layers.10.router.proj",
|
| 328 |
+
"model.language_model.layers.11.router",
|
| 329 |
+
"model.language_model.layers.11.router.proj",
|
| 330 |
+
"model.language_model.layers.12.router",
|
| 331 |
+
"model.language_model.layers.12.router.proj",
|
| 332 |
+
"model.language_model.layers.13.router",
|
| 333 |
+
"model.language_model.layers.13.router.proj",
|
| 334 |
+
"model.language_model.layers.14.router",
|
| 335 |
+
"model.language_model.layers.14.router.proj",
|
| 336 |
+
"model.language_model.layers.15.router",
|
| 337 |
+
"model.language_model.layers.15.router.proj",
|
| 338 |
+
"model.language_model.layers.16.router",
|
| 339 |
+
"model.language_model.layers.16.router.proj",
|
| 340 |
+
"model.language_model.layers.17.router",
|
| 341 |
+
"model.language_model.layers.17.router.proj",
|
| 342 |
+
"model.language_model.layers.18.router",
|
| 343 |
+
"model.language_model.layers.18.router.proj",
|
| 344 |
+
"model.language_model.layers.19.router",
|
| 345 |
+
"model.language_model.layers.19.router.proj",
|
| 346 |
+
"model.language_model.layers.20.router",
|
| 347 |
+
"model.language_model.layers.20.router.proj",
|
| 348 |
+
"model.language_model.layers.21.router",
|
| 349 |
+
"model.language_model.layers.21.router.proj",
|
| 350 |
+
"model.language_model.layers.22.router",
|
| 351 |
+
"model.language_model.layers.22.router.proj",
|
| 352 |
+
"model.language_model.layers.23.router",
|
| 353 |
+
"model.language_model.layers.23.router.proj",
|
| 354 |
+
"model.language_model.layers.24.router",
|
| 355 |
+
"model.language_model.layers.24.router.proj",
|
| 356 |
+
"model.language_model.layers.25.router",
|
| 357 |
+
"model.language_model.layers.25.router.proj",
|
| 358 |
+
"model.language_model.layers.26.router",
|
| 359 |
+
"model.language_model.layers.26.router.proj",
|
| 360 |
+
"model.language_model.layers.27.router",
|
| 361 |
+
"model.language_model.layers.27.router.proj",
|
| 362 |
+
"model.language_model.layers.28.router",
|
| 363 |
+
"model.language_model.layers.28.router.proj",
|
| 364 |
+
"model.language_model.layers.29.router",
|
| 365 |
+
"model.language_model.layers.29.router.proj",
|
| 366 |
+
"model.embed_vision.embedding_projection",
|
| 367 |
+
"lm_head"
|
| 368 |
+
],
|
| 369 |
+
"kv_cache_scheme": null,
|
| 370 |
+
"quant_method": "compressed-tensors",
|
| 371 |
+
"quantization_status": "compressed",
|
| 372 |
+
"sparsity_config": {},
|
| 373 |
+
"transform_config": {},
|
| 374 |
+
"version": "0.18.0"
|
| 375 |
+
},
|
| 376 |
+
"software": {
|
| 377 |
+
"conversion_artifact_compressed_tensors_version": "0.18.0",
|
| 378 |
+
"validated_vllm_commit": "7ca49fbe4bab019e55d57cdc4b7fd3d55c67c1a6",
|
| 379 |
+
"validated_transformers": "5.15.1",
|
| 380 |
+
"validated_pytorch": "2.13.0+cu130",
|
| 381 |
+
"validated_cuda_runtime": "13.0",
|
| 382 |
+
"validated_compressed_tensors_runtime": "0.17.0"
|
| 383 |
+
}
|
| 384 |
+
}
|
recipe.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_stage:
|
| 2 |
+
default_modifiers:
|
| 3 |
+
GPTQModifier:
|
| 4 |
+
config_groups:
|
| 5 |
+
w4a16_g64:
|
| 6 |
+
targets: [Linear]
|
| 7 |
+
weights:
|
| 8 |
+
num_bits: 4
|
| 9 |
+
type: int
|
| 10 |
+
symmetric: true
|
| 11 |
+
group_size: 64
|
| 12 |
+
strategy: group
|
| 13 |
+
block_structure: null
|
| 14 |
+
dynamic: false
|
| 15 |
+
actorder: !!python/object/apply:compressed_tensors.quantization.quant_args.ActivationOrdering [
|
| 16 |
+
static]
|
| 17 |
+
scale_dtype: null
|
| 18 |
+
zp_dtype: null
|
| 19 |
+
observer: memoryless_minmax
|
| 20 |
+
observer_kwargs: {}
|
| 21 |
+
input_activations: null
|
| 22 |
+
output_activations: null
|
| 23 |
+
format: null
|
| 24 |
+
targets: [Linear]
|
| 25 |
+
ignore: ['re:.*lm_head$', 're:.*vision_tower.*', 're:.*router.*', 're:.*embed_tokens.*',
|
| 26 |
+
're:.*embed_vision.*']
|
| 27 |
+
bypass_divisibility_checks: false
|
| 28 |
+
requires_calibration_data: true
|
| 29 |
+
block_size: 128
|
| 30 |
+
dampening_frac: 0.01
|
| 31 |
+
actorder: static
|
| 32 |
+
offload_hessians: false
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c2cf15ae878b9477ea6d714d02be642da51424c6b7fe0c1e2cf5a332b5c2f789
|
| 3 |
+
size 32169879
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"response_template": {
|
| 89 |
+
"defaults": {
|
| 90 |
+
"role": "assistant"
|
| 91 |
+
},
|
| 92 |
+
"fields": {
|
| 93 |
+
"content": {
|
| 94 |
+
"close": [
|
| 95 |
+
"<turn|>",
|
| 96 |
+
"<|tool_response>",
|
| 97 |
+
"<eos>"
|
| 98 |
+
],
|
| 99 |
+
"content": "text"
|
| 100 |
+
},
|
| 101 |
+
"thinking": {
|
| 102 |
+
"close": "<channel|>",
|
| 103 |
+
"content": "text",
|
| 104 |
+
"open": "<|channel>thought\n"
|
| 105 |
+
},
|
| 106 |
+
"tool_calls": {
|
| 107 |
+
"close": "<tool_call|>",
|
| 108 |
+
"content": "json",
|
| 109 |
+
"content_args": {
|
| 110 |
+
"string_delims": [
|
| 111 |
+
[
|
| 112 |
+
"<|\"|>",
|
| 113 |
+
"<|\"|>"
|
| 114 |
+
]
|
| 115 |
+
],
|
| 116 |
+
"unquoted_keys": true
|
| 117 |
+
},
|
| 118 |
+
"open_pattern": "<\\|tool_call>call:(?P<name>\\w+)",
|
| 119 |
+
"repeats": true,
|
| 120 |
+
"transform": {
|
| 121 |
+
"function": {
|
| 122 |
+
"arguments": "{content}",
|
| 123 |
+
"name": "{name}"
|
| 124 |
+
},
|
| 125 |
+
"type": "function"
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
},
|
| 129 |
+
"start_anchor": [
|
| 130 |
+
"<|turn>model\n",
|
| 131 |
+
"<tool_response|>"
|
| 132 |
+
]
|
| 133 |
+
},
|
| 134 |
+
"soc_token": "<|channel>",
|
| 135 |
+
"sot_token": "<|turn>",
|
| 136 |
+
"stc_token": "<|tool_call>",
|
| 137 |
+
"std_token": "<|tool>",
|
| 138 |
+
"str_token": "<|tool_response>",
|
| 139 |
+
"think_token": "<|think|>",
|
| 140 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 141 |
+
"unk_token": "<unk>"
|
| 142 |
+
}
|