Zhan-Lun commited on
Commit
e8491df
·
verified ·
1 Parent(s): 9b39f61

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
LICENSE.md ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ All model weights, parameters, and binary model files are licensed under the webAI Non-Commercial License ver. 1.0 described below.
2
+ All source code files are licensed under the Apache 2.0 License.
3
+
4
+ --------------
5
+
6
+ # webAI Non-Commercial License ver. 1.0
7
+
8
+ ## 1. Definitions
9
+
10
+ “Licensor” means any person or entity that distributes its Work.
11
+ “Work” means (a) the original work of authorship made available under this license, which may include software, documentation, or other files, and (b) any additions to or derivative works thereof that are made available under this license.
12
+ The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this license, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work.
13
+ Works are “made available” under this license by including in or with the Work either (a) a copyright notice referencing the applicability of this license to the Work, or (b) a copy of this license.
14
+
15
+ ## 2. License Grant
16
+
17
+ 2.1 Copyright Grant. Subject to the terms and conditions of this license, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form.
18
+
19
+ ## 3. Limitations
20
+
21
+ 3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this license, (b) you include a complete copy of this license with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work.
22
+
23
+ 3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this license (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself.
24
+
25
+ 3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use non-commercially. As used herein, “non-commercially” means for non-commercial research and educational purposes only.
26
+
27
+ 3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this license from such Licensor (including the grant in Section 2.1) will terminate immediately.
28
+
29
+ 3.5 Trademarks. This license does not grant any rights to use any Licensor's or its affiliates' names, logos, or trademarks, except as necessary to reproduce the notices described in this license. Nothing in this license shall be construed as permission to use the trade names, trademarks, service marks, or product names of webAI, Inc. or its affiliates to endorse, promote, or imply association with any derivative work, product, service, or entity, without prior written consent from webAI, Inc. Use of the Work does not imply endorsement by webAI, Inc. of any derivative work, product, service, or entity.
30
+
31
+ 3.6 Termination. If you violate any term of this license, then your rights under this license (including the grant in Section 2.1) will terminate immediately.
32
+
33
+ ## 4. Disclaimer of Warranty.
34
+
35
+ THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE.
36
+
37
+ ## 5. Limitation of Liability.
38
+
39
+ EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
40
+
41
+ --------------
42
+
43
+ Apache License
44
+ Version 2.0, January 2004
45
+ http://www.apache.org/licenses/
46
+
47
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
48
+
49
+ 1. Definitions.
50
+
51
+ "License" shall mean the terms and conditions for use, reproduction,
52
+ and distribution as defined by Sections 1 through 9 of this document.
53
+
54
+ "Licensor" shall mean the copyright owner or entity authorized by
55
+ the copyright owner that is granting the License.
56
+
57
+ "Legal Entity" shall mean the union of the acting entity and all
58
+ other entities that control, are controlled by, or are under common
59
+ control with that entity. For the purposes of this definition,
60
+ "control" means (i) the power, direct or indirect, to cause the
61
+ direction or management of such entity, whether by contract or
62
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
63
+ outstanding shares, or (iii) beneficial ownership of such entity.
64
+
65
+ "You" (or "Your") shall mean an individual or Legal Entity
66
+ exercising permissions granted by this License.
67
+
68
+ "Source" form shall mean the preferred form for making modifications,
69
+ including but not limited to software source code, documentation
70
+ source, and configuration files.
71
+
72
+ "Object" form shall mean any form resulting from mechanical
73
+ transformation or translation of a Source form, including but
74
+ not limited to compiled object code, generated documentation,
75
+ and conversions to other media types.
76
+
77
+ "Work" shall mean the work of authorship, whether in Source or
78
+ Object form, made available under the License, as indicated by a
79
+ copyright notice that is included in or attached to the work
80
+ (an example is provided in the Appendix below).
81
+
82
+ "Derivative Works" shall mean any work, whether in Source or Object
83
+ form, that is based on (or derived from) the Work and for which the
84
+ editorial revisions, annotations, elaborations, or other modifications
85
+ represent, as a whole, an original work of authorship. For the purposes
86
+ of this License, Derivative Works shall not include works that remain
87
+ separable from, or merely link (or bind by name) to the interfaces of,
88
+ the Work and Derivative Works thereof.
89
+
90
+ "Contribution" shall mean any work of authorship, including
91
+ the original version of the Work and any modifications or additions
92
+ to that Work or Derivative Works thereof, that is intentionally
93
+ submitted to Licensor for inclusion in the Work by the copyright owner
94
+ or by an individual or Legal Entity authorized to submit on behalf of
95
+ the copyright owner. For the purposes of this definition, "submitted"
96
+ means any form of electronic, verbal, or written communication sent
97
+ to the Licensor or its representatives, including but not limited to
98
+ communication on electronic mailing lists, source code control systems,
99
+ and issue tracking systems that are managed by, or on behalf of, the
100
+ Licensor for the purpose of discussing and improving the Work, but
101
+ excluding communication that is conspicuously marked or otherwise
102
+ designated in writing by the copyright owner as "Not a Contribution."
103
+
104
+ "Contributor" shall mean Licensor and any individual or Legal Entity
105
+ on behalf of whom a Contribution has been received by Licensor and
106
+ subsequently incorporated within the Work.
107
+
108
+ 2. Grant of Copyright License. Subject to the terms and conditions of
109
+ this License, each Contributor hereby grants to You a perpetual,
110
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
111
+ copyright license to reproduce, prepare Derivative Works of,
112
+ publicly display, publicly perform, sublicense, and distribute the
113
+ Work and such Derivative Works in Source or Object form.
114
+
115
+ 3. Grant of Patent License. Subject to the terms and conditions of
116
+ this License, each Contributor hereby grants to You a perpetual,
117
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
118
+ (except as stated in this section) patent license to make, have made,
119
+ use, offer to sell, sell, import, and otherwise transfer the Work,
120
+ where such license applies only to those patent claims licensable
121
+ by such Contributor that are necessarily infringed by their
122
+ Contribution(s) alone or by combination of their Contribution(s)
123
+ with the Work to which such Contribution(s) was submitted. If You
124
+ institute patent litigation against any entity (including a
125
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
126
+ or a Contribution incorporated within the Work constitutes direct
127
+ or contributory patent infringement, then any patent licenses
128
+ granted to You under this License for that Work shall terminate
129
+ as of the date such litigation is filed.
130
+
131
+ 4. Redistribution. You may reproduce and distribute copies of the
132
+ Work or Derivative Works thereof in any medium, with or without
133
+ modifications, and in Source or Object form, provided that You
134
+ meet the following conditions:
135
+
136
+ (a) You must give any other recipients of the Work or
137
+ Derivative Works a copy of this License; and
138
+
139
+ (b) You must cause any modified files to carry prominent notices
140
+ stating that You changed the files; and
141
+
142
+ (c) You must retain, in the Source form of any Derivative Works
143
+ that You distribute, all copyright, patent, trademark, and
144
+ attribution notices from the Source form of the Work,
145
+ excluding those notices that do not pertain to any part of
146
+ the Derivative Works; and
147
+
148
+ (d) If the Work includes a "NOTICE" text file as part of its
149
+ distribution, then any Derivative Works that You distribute must
150
+ include a readable copy of the attribution notices contained
151
+ within such NOTICE file, excluding those notices that do not
152
+ pertain to any part of the Derivative Works, in at least one
153
+ of the following places: within a NOTICE text file distributed
154
+ as part of the Derivative Works; within the Source form or
155
+ documentation, if provided along with the Derivative Works; or,
156
+ within a display generated by the Derivative Works, if and
157
+ wherever such third-party notices normally appear. The contents
158
+ of the NOTICE file are for informational purposes only and
159
+ do not modify the License. You may add Your own attribution
160
+ notices within Derivative Works that You distribute, alongside
161
+ or as an addendum to the NOTICE text from the Work, provided
162
+ that such additional attribution notices cannot be construed
163
+ as modifying the License.
164
+
165
+ You may add Your own copyright statement to Your modifications and
166
+ may provide additional or different license terms and conditions
167
+ for use, reproduction, or distribution of Your modifications, or
168
+ for any such Derivative Works as a whole, provided Your use,
169
+ reproduction, and distribution of the Work otherwise complies with
170
+ the conditions stated in this License.
171
+
172
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
173
+ any Contribution intentionally submitted for inclusion in the Work
174
+ by You to the Licensor shall be under the terms and conditions of
175
+ this License, without any additional terms or conditions.
176
+ Notwithstanding the above, nothing herein shall supersede or modify
177
+ the terms of any separate license agreement you may have executed
178
+ with Licensor regarding such Contributions.
179
+
180
+ 6. Trademarks. This License does not grant permission to use the trade
181
+ names, trademarks, service marks, or product names of the Licensor,
182
+ except as required for reasonable and customary use in describing the
183
+ origin of the Work and reproducing the content of the NOTICE file.
184
+
185
+ 7. Disclaimer of Warranty. Unless required by applicable law or
186
+ agreed to in writing, Licensor provides the Work (and each
187
+ Contributor provides its Contributions) on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
189
+ implied, including, without limitation, any warranties or conditions
190
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
191
+ PARTICULAR PURPOSE. You are solely responsible for determining the
192
+ appropriateness of using or redistributing the Work and assume any
193
+ risks associated with Your exercise of permissions under this License.
194
+
195
+ 8. Limitation of Liability. In no event and under no legal theory,
196
+ whether in tort (including negligence), contract, or otherwise,
197
+ unless required by applicable law (such as deliberate and grossly
198
+ negligent acts) or agreed to in writing, shall any Contributor be
199
+ liable to You for damages, including any direct, indirect, special,
200
+ incidental, or consequential damages of any character arising as a
201
+ result of this License or out of the use or inability to use the
202
+ Work (including but not limited to damages for loss of goodwill,
203
+ work stoppage, computer failure or malfunction, or any and all
204
+ other commercial damages or losses), even if such Contributor
205
+ has been advised of the possibility of such damages.
206
+
207
+ 9. Accepting Warranty or Additional Liability. While redistributing
208
+ the Work or Derivative Works thereof, You may choose to offer,
209
+ and charge a fee for, acceptance of support, warranty, indemnity,
210
+ or other liability obligations and/or rights consistent with this
211
+ License. However, in accepting such obligations, You may act only
212
+ on Your own behalf and on Your sole responsibility, not on behalf
213
+ of any other Contributor, and only if You agree to indemnify,
214
+ defend, and hold each Contributor harmless for any liability
215
+ incurred by, or claims asserted against, such Contributor by reason
216
+ of your accepting any such warranty or additional liability.
217
+
218
+ END OF TERMS AND CONDITIONS
219
+
220
+ APPENDIX: How to apply the Apache License to your work.
221
+
222
+ To apply the Apache License to your work, attach the following
223
+ boilerplate notice, with the fields enclosed by brackets "[]"
224
+ replaced with your own identifying information. (Don't include
225
+ the brackets!) The text should be enclosed in the appropriate
226
+ comment syntax for the file format. We also recommend that a
227
+ file or class name and description of purpose be included on the
228
+ same "printed page" as the copyright notice for easier
229
+ identification within third-party archives.
230
+
231
+ Copyright 2026 webAI, Inc.
232
+
233
+ Licensed under the Apache License, Version 2.0 (the "License");
234
+ you may not use this file except in compliance with the License.
235
+ You may obtain a copy of the License at
236
+
237
+ http://www.apache.org/licenses/LICENSE-2.0
238
+
239
+ Unless required by applicable law or agreed to in writing, software
240
+ distributed under the License is distributed on an "AS IS" BASIS,
241
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
242
+ See the License for the specific language governing permissions and
243
+ limitations under the License.
NOTICES.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # NOTICES
2
+
3
+ Copyright 2026 Alibaba Cloud.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
README.md ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: visual-document-retrieval
3
+ library_name: transformers
4
+ language:
5
+ - multilingual
6
+ license: other
7
+ license_name: webai-non-commercial-license-v1.0
8
+ license_link: https://huggingface.co/webAI-Official/webAI-ColVec1.1-4b/blob/main/LICENSE.md
9
+ base_model: Qwen/Qwen3.5-4B
10
+ datasets:
11
+ - vidore/colpali_train_set
12
+ - Tevatron/docmatix-ir
13
+ - openbmb/VisRAG-Ret-Train-In-domain-data
14
+ - openbmb/VisRAG-Ret-Train-Synthetic-data
15
+ - llamaindex/vdr-multilingual-train
16
+ - Tevatron/wiki-ss-nq
17
+ tags:
18
+ - text
19
+ - image
20
+ - multimodal-embedding
21
+ - visual-document-retrieval
22
+ - vidore
23
+ - colbert
24
+ - colqwen3_5
25
+ - multilingual-embedding
26
+ ---
27
+
28
+ # webAI-Official/webAI-ColVec1.1-4b
29
+
30
+ ## ⚡ Summary
31
+
32
+ **webAI-Official/webAI-ColVec1.1-4b** is a ColBERT-style multimodal
33
+ embedding model based on
34
+ [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B). It maps text
35
+ queries and visual documents (images or rendered PDF pages) into aligned,
36
+ L2-normalized multi-vector embeddings for late-interaction retrieval.
37
+
38
+ The model uses bidirectional attention in Qwen3.5's full-attention layers and
39
+ a learned 640-dimensional projection head. The unused language-model head has
40
+ been removed from the released checkpoint.
41
+
42
+ ### Training data
43
+
44
+ We created filtered, balanced, and multilingual curated subsets from the six
45
+ public datasets below. **This 4B model was trained on a 500,000-sample curated
46
+ subset.** The companion 9B-backbone model was trained on a separate
47
+ 750,000-sample curated subset.
48
+
49
+ | Dataset source |
50
+ | :--- |
51
+ | [ColPali Train Set](https://huggingface.co/datasets/vidore/colpali_train_set) |
52
+ | [Docmatix-IR](https://huggingface.co/datasets/Tevatron/docmatix-ir) |
53
+ | [VisRAG In-Domain](https://huggingface.co/datasets/openbmb/VisRAG-Ret-Train-In-domain-data) |
54
+ | [VisRAG Synthetic](https://huggingface.co/datasets/openbmb/VisRAG-Ret-Train-Synthetic-data) |
55
+ | [VDR Multilingual Train](https://huggingface.co/datasets/llamaindex/vdr-multilingual-train) |
56
+ | [Wiki-SS-NQ](https://huggingface.co/datasets/Tevatron/wiki-ss-nq) |
57
+
58
+ ## 🛠️ Model specifications
59
+
60
+ | Feature | Detail |
61
+ | :--- | :--- |
62
+ | **Architecture** | Qwen3.5-4B vision-language model + 640-dimensional linear projection |
63
+ | **Released parameters** | 4,540,904,576 |
64
+ | **Method** | ColBERT-style late interaction with MaxSim scoring |
65
+ | **Output** | L2-normalized multi-vector embeddings `(sequence_length, 640)` |
66
+ | **Modalities** | Text queries and document images |
67
+ | **Attention** | Bidirectional full-attention layers; selectable FlashAttention 2, FlashAttention 3, or SDPA kernel |
68
+ | **Visual-token budget** | 1,792 tokens per image in the released processor |
69
+ | **Training** | LoRA adapters and a fully trained projection layer, merged for release |
70
+ | **Weights** | `bfloat16`; language-model head removed |
71
+
72
+ ### Key properties
73
+
74
+ - **Unified encoder:** The same model encodes text and document images.
75
+ - **Token-level retrieval:** Multi-vector embeddings preserve fine-grained
76
+ layout and content signals that single-vector pooling can discard.
77
+ - **Compact projection:** Hidden states are projected to 640 dimensions
78
+ without an activation function.
79
+ - **Bidirectional retrieval attention:** Selecting FlashAttention 2 or 3
80
+ changes the execution kernel, not the model's bidirectional attention mode.
81
+
82
+ ## 📊 Evaluation results
83
+
84
+ The table reports NDCG@10 × 100 on the eight **public** ViDoRe V3 tasks. Private
85
+ Nuclear and Telecom scores are intentionally omitted and will be added after
86
+ official evaluation. Each task value is the mean of its six language subsets;
87
+ the public average is the unweighted mean of the eight public task values.
88
+
89
+ The result artifacts record MTEB 2.18.5, Transformers 5.14.1, PyTorch 2.9.0
90
+ with CUDA 12.8, `bfloat16`, FlashAttention 2.8.3, and batch size 32. The release
91
+ processor is configured with a 1,792 visual-token budget. Comparator values
92
+ were read from the live
93
+ [ViDoRe V3 MTEB leaderboard](https://mteb-leaderboard.hf.space/benchmark/ViDoRe%28v3%29)
94
+ on July 22, 2026.
95
+
96
+ | Model | CompSci | Energy | FinanceEn | FinanceFr | HR | Industrial | Pharma | Physics | **Avg. public** |
97
+ | :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
98
+ | **[webAI-ColVec1.1-8b](https://huggingface.co/webAI-Official/webAI-ColVec1.1-8b)** | 80.14 | 70.09 | **71.89** | **55.10** | 68.49 | **57.41** | 67.88 | 51.29 | **65.29** |
99
+ | [VultronRetriever Prime](https://huggingface.co/vultr/VultronRetrieverPrime-Qwen3.5-8B) | 79.81 | **70.26** | 69.01 | 54.51 | 66.82 | **57.41** | **68.19** | **51.73** | 64.72 |
100
+ | [webAI-ColVec1-9b](https://huggingface.co/webAI-Official/webAI-ColVec1-9b) | **80.92** | 69.77 | 68.28 | 53.72 | **70.04** | 57.18 | 67.32 | 48.38 | 64.45 |
101
+ | **webAI-ColVec1.1-4b (this model)** | 80.35 | 69.26 | 69.12 | 53.21 | 67.02 | 56.30 | 67.07 | 51.36 | 64.21 |
102
+ | [VultronRetriever Core](https://huggingface.co/vultr/VultronRetrieverCore-Qwen3.5-4.5B) | 79.77 | 69.19 | 68.93 | 52.02 | 66.10 | 56.11 | 67.45 | 50.18 | 63.72 |
103
+ | [Nemotron ColEmbed VL 8B V2](https://huggingface.co/nvidia/nemotron-colembed-vl-8b-v2) | 79.29 | 69.82 | 67.29 | 51.54 | 66.32 | 56.03 | 67.19 | 50.84 | 63.54 |
104
+ | [webAI-ColVec1-4b](https://huggingface.co/webAI-Official/webAI-ColVec1-4b) | 79.84 | 68.70 | 68.49 | 51.11 | 67.40 | 55.73 | 65.68 | 50.15 | 63.39 |
105
+ | [Tomoro ColQwen3 Embed 8B](https://huggingface.co/TomoroAI/tomoro-colqwen3-embed-8b) | 75.35 | 68.41 | 65.08 | 49.10 | 63.98 | 54.41 | 66.36 | 50.13 | 61.60 |
106
+
107
+ The current MTEB leaderboard entries named `webAI-ColVec1-4b` and
108
+ `webAI-ColVec1-9b` refer to the previous ColVec1 release, not these ColVec1.1
109
+ checkpoints.
110
+
111
+ ## 💻 Usage
112
+
113
+ The processor provides the current retrieval API:
114
+
115
+ - `process_images(images)` prepares one or more document images.
116
+ - `process_queries(texts)` prepares one or more natural-language queries.
117
+ - `score_retrieval(query_embeddings, document_embeddings)` computes a MaxSim
118
+ score matrix with shape `(number_of_queries, number_of_documents)`.
119
+
120
+ ### Prerequisites and attention backends
121
+
122
+ The public ViDoRe V3 numbers are reproducible with this pinned FlashAttention 2
123
+ environment:
124
+
125
+ ```text
126
+ Python 3.12
127
+ PyTorch 2.9.0 + CUDA 12.8
128
+ Transformers 5.14.1
129
+ MTEB 2.18.5
130
+ Sentence Transformers 5.6.0
131
+ FlashAttention 2.8.3
132
+ ```
133
+
134
+ The model also supports FlashAttention 3 on Hopper GPUs (H100/H200). See the
135
+ [Dao-AILab FlashAttention repository](https://github.com/dao-ailab/flash-attention)
136
+ for FlashAttention 3 installation instructions, then select
137
+ `flash_attention_3` when loading in a compatible Hopper environment.
138
+
139
+ FlashAttention 2 and FlashAttention 3 both preserve bidirectional attention.
140
+ FlashAttention 3 can improve throughput on Hopper GPUs, but the published
141
+ scores use FlashAttention 2; changing kernels can produce small floating-point
142
+ differences. Use FlashAttention 2 when reproducing the table.
143
+
144
+ ### Inference code
145
+
146
+ ```python
147
+ from io import BytesIO
148
+
149
+ import requests
150
+ import torch
151
+ from PIL import Image
152
+ from transformers import AutoModel, AutoProcessor
153
+
154
+ MODEL_ID = "webAI-Official/webAI-ColVec1.1-4b"
155
+ DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"
156
+ ATTN_IMPLEMENTATION = (
157
+ "flash_attention_2" if torch.cuda.is_available() else "sdpa"
158
+ )
159
+ # On an H100/H200 with FlashAttention 3 installed, use:
160
+ # ATTN_IMPLEMENTATION = "flash_attention_3"
161
+
162
+ processor = AutoProcessor.from_pretrained(
163
+ MODEL_ID,
164
+ trust_remote_code=True,
165
+ max_num_visual_tokens=1792,
166
+ )
167
+ model = AutoModel.from_pretrained(
168
+ MODEL_ID,
169
+ trust_remote_code=True,
170
+ dtype=torch.bfloat16,
171
+ attn_implementation=ATTN_IMPLEMENTATION,
172
+ device_map=DEVICE,
173
+ ).eval()
174
+
175
+ queries = [
176
+ "Retrieve the city of Singapore",
177
+ "Retrieve the city of Beijing",
178
+ ]
179
+ document_urls = [
180
+ "https://upload.wikimedia.org/wikipedia/commons/2/27/Singapore_skyline_2022.jpg",
181
+ "https://upload.wikimedia.org/wikipedia/commons/6/61/Beijing_skyline_at_night.JPG",
182
+ ]
183
+
184
+
185
+ def load_image(url: str) -> Image.Image:
186
+ response = requests.get(
187
+ url,
188
+ headers={"User-Agent": "Mozilla/5.0"},
189
+ timeout=30,
190
+ )
191
+ response.raise_for_status()
192
+ return Image.open(BytesIO(response.content)).convert("RGB")
193
+
194
+
195
+ device = next(model.parameters()).device
196
+ query_inputs = processor.process_queries(queries)
197
+ document_inputs = processor.process_images(
198
+ [load_image(url) for url in document_urls]
199
+ )
200
+ query_inputs = {
201
+ key: value.to(device) if isinstance(value, torch.Tensor) else value
202
+ for key, value in query_inputs.items()
203
+ }
204
+ document_inputs = {
205
+ key: value.to(device) if isinstance(value, torch.Tensor) else value
206
+ for key, value in document_inputs.items()
207
+ }
208
+
209
+ with torch.inference_mode():
210
+ query_batch = model(**query_inputs)
211
+ document_batch = model(**document_inputs)
212
+
213
+ query_embeddings = [embedding.cpu() for embedding in query_batch]
214
+ document_embeddings = [embedding.cpu() for embedding in document_batch]
215
+ scores = processor.score_retrieval(
216
+ query_embeddings,
217
+ document_embeddings,
218
+ output_dtype=torch.float32,
219
+ )
220
+
221
+ print(scores)
222
+ print("Best document per query:", scores.argmax(dim=1))
223
+ ```
224
+
225
+ The processor loads the release's 1,792 visual-token budget by default. To
226
+ reduce memory use, pass a lower `max_num_visual_tokens` value to
227
+ `AutoProcessor.from_pretrained`; this changes document granularity and may
228
+ change retrieval scores.
229
+
230
+ ## ⚖️ Strengths and limitations
231
+
232
+ ### Strengths
233
+
234
+ - Strong public-task performance on ViDoRe V3.
235
+ - OCR-free retrieval over visually complex document pages.
236
+ - Fine-grained MaxSim matching with compact 640-dimensional token vectors.
237
+ - Multilingual training data and evaluation.
238
+ - FlashAttention 2 support across compatible CUDA GPUs and optimized
239
+ FlashAttention 3 inference on Hopper GPUs.
240
+
241
+ ### Limitations
242
+
243
+ - Multi-vector indexes require more storage than single-vector embeddings.
244
+ - Scores can vary slightly between FlashAttention 2, FlashAttention 3, and
245
+ SDPA.
246
+
247
+ ## License
248
+
249
+ Model weights are distributed under the
250
+ [webAI Non-Commercial License v1.0](https://huggingface.co/webAI-Official/webAI-ColVec1.1-4b/blob/main/LICENSE.md).
251
+ See the repository's `NOTICES.md` for upstream attribution.
252
+
253
+ ## 📚 Citation
254
+
255
+ ```bibtex
256
+ @misc{webai_colvec1_1_4b,
257
+ title = {webAI-ColVec1.1-4b: A Bidirectional Multi-Vector Model for Visual Document Retrieval},
258
+ author = {webAI},
259
+ year = {2026},
260
+ url = {https://huggingface.co/webAI-Official/webAI-ColVec1.1-4b}
261
+ }
262
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- raise_exception('System message must be at the beginning.') }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if loop.index0 > ns.last_query_index %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
154
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ColQwen35Bidirection"
4
+ ],
5
+ "auto_map": {
6
+ "AutoModel": "modeling_colqwen35_bidirection.ColQwen35Bidirection"
7
+ },
8
+ "dtype": "bfloat16",
9
+ "embedding_dim": 640,
10
+ "fusion_config": {
11
+ "patch_embeddings": true
12
+ },
13
+ "image_token_id": 248056,
14
+ "is_causal": false,
15
+ "lm_head_removed": true,
16
+ "model_type": "qwen3_5",
17
+ "text_config": {
18
+ "attention_bias": false,
19
+ "attention_dropout": 0.0,
20
+ "attn_output_gate": true,
21
+ "bos_token_id": null,
22
+ "dtype": "bfloat16",
23
+ "eos_token_id": 248044,
24
+ "full_attention_interval": 4,
25
+ "head_dim": 256,
26
+ "hidden_act": "silu",
27
+ "hidden_size": 2560,
28
+ "initializer_range": 0.02,
29
+ "intermediate_size": 9216,
30
+ "is_causal": false,
31
+ "layer_types": [
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "full_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "full_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "linear_attention",
51
+ "full_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "linear_attention",
55
+ "full_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "linear_attention",
59
+ "full_attention",
60
+ "linear_attention",
61
+ "linear_attention",
62
+ "linear_attention",
63
+ "full_attention"
64
+ ],
65
+ "linear_conv_kernel_dim": 4,
66
+ "linear_key_head_dim": 128,
67
+ "linear_num_key_heads": 16,
68
+ "linear_num_value_heads": 32,
69
+ "linear_value_head_dim": 128,
70
+ "mamba_ssm_dtype": "float32",
71
+ "max_position_embeddings": 262144,
72
+ "mlp_only_layers": [],
73
+ "model_type": "qwen3_5_text",
74
+ "mtp_num_hidden_layers": 1,
75
+ "mtp_use_dedicated_embeddings": false,
76
+ "num_attention_heads": 16,
77
+ "num_hidden_layers": 32,
78
+ "num_key_value_heads": 4,
79
+ "pad_token_id": null,
80
+ "partial_rotary_factor": 0.25,
81
+ "rms_norm_eps": 1e-06,
82
+ "rope_parameters": {
83
+ "mrope_interleaved": true,
84
+ "mrope_section": [
85
+ 11,
86
+ 11,
87
+ 10
88
+ ],
89
+ "partial_rotary_factor": 0.25,
90
+ "rope_theta": 10000000,
91
+ "rope_type": "default"
92
+ },
93
+ "tie_word_embeddings": true,
94
+ "use_cache": true,
95
+ "vocab_size": 248320
96
+ },
97
+ "tie_word_embeddings": false,
98
+ "transformers_version": "5.14.1",
99
+ "video_token_id": 248057,
100
+ "vision_config": {
101
+ "deepstack_visual_indexes": [],
102
+ "depth": 24,
103
+ "dtype": "bfloat16",
104
+ "hidden_act": "gelu_pytorch_tanh",
105
+ "hidden_size": 1024,
106
+ "in_channels": 3,
107
+ "initializer_range": 0.02,
108
+ "intermediate_size": 4096,
109
+ "model_type": "qwen3_5_vision",
110
+ "num_heads": 16,
111
+ "num_position_embeddings": 2304,
112
+ "out_hidden_size": 2560,
113
+ "patch_size": 16,
114
+ "spatial_merge_size": 2,
115
+ "temporal_patch_size": 2
116
+ },
117
+ "vision_end_token_id": 248054,
118
+ "vision_start_token_id": 248053
119
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f6ff462a87199760fcc59918b97c032b940e8827f4931e49841f8eff94f36da
3
+ size 4976226232
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:023def0f01b20adace03f958b8e8378c5f0dc781076bc87bf218e47a770a44bf
3
+ size 4105672464
model.safetensors.index.json ADDED
@@ -0,0 +1,733 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_parameters": 4540904576,
4
+ "total_size": 9081809152
5
+ },
6
+ "weight_map": {
7
+ "embedding_proj_layer.bias": "model-00001-of-00002.safetensors",
8
+ "embedding_proj_layer.weight": "model-00001-of-00002.safetensors",
9
+ "model.language_model.embed_tokens.weight": "model-00001-of-00002.safetensors",
10
+ "model.language_model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
11
+ "model.language_model.layers.0.linear_attn.A_log": "model-00001-of-00002.safetensors",
12
+ "model.language_model.layers.0.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
13
+ "model.language_model.layers.0.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
14
+ "model.language_model.layers.0.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
15
+ "model.language_model.layers.0.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
16
+ "model.language_model.layers.0.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
17
+ "model.language_model.layers.0.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
18
+ "model.language_model.layers.0.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
19
+ "model.language_model.layers.0.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
20
+ "model.language_model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
21
+ "model.language_model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
22
+ "model.language_model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
23
+ "model.language_model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
24
+ "model.language_model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
25
+ "model.language_model.layers.1.linear_attn.A_log": "model-00001-of-00002.safetensors",
26
+ "model.language_model.layers.1.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
27
+ "model.language_model.layers.1.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
28
+ "model.language_model.layers.1.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
29
+ "model.language_model.layers.1.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
30
+ "model.language_model.layers.1.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
31
+ "model.language_model.layers.1.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
32
+ "model.language_model.layers.1.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
33
+ "model.language_model.layers.1.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
34
+ "model.language_model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
35
+ "model.language_model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
36
+ "model.language_model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
37
+ "model.language_model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
38
+ "model.language_model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
39
+ "model.language_model.layers.10.linear_attn.A_log": "model-00001-of-00002.safetensors",
40
+ "model.language_model.layers.10.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
41
+ "model.language_model.layers.10.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
42
+ "model.language_model.layers.10.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
43
+ "model.language_model.layers.10.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
44
+ "model.language_model.layers.10.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
45
+ "model.language_model.layers.10.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
46
+ "model.language_model.layers.10.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
47
+ "model.language_model.layers.10.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
48
+ "model.language_model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
49
+ "model.language_model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
50
+ "model.language_model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
51
+ "model.language_model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
52
+ "model.language_model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
53
+ "model.language_model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
54
+ "model.language_model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
55
+ "model.language_model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
56
+ "model.language_model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
57
+ "model.language_model.layers.11.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
58
+ "model.language_model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
59
+ "model.language_model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
60
+ "model.language_model.layers.11.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
61
+ "model.language_model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
62
+ "model.language_model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
63
+ "model.language_model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
64
+ "model.language_model.layers.12.linear_attn.A_log": "model-00001-of-00002.safetensors",
65
+ "model.language_model.layers.12.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
66
+ "model.language_model.layers.12.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
67
+ "model.language_model.layers.12.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
68
+ "model.language_model.layers.12.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
69
+ "model.language_model.layers.12.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
70
+ "model.language_model.layers.12.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
71
+ "model.language_model.layers.12.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
72
+ "model.language_model.layers.12.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
73
+ "model.language_model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
74
+ "model.language_model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
75
+ "model.language_model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
76
+ "model.language_model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
77
+ "model.language_model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
78
+ "model.language_model.layers.13.linear_attn.A_log": "model-00001-of-00002.safetensors",
79
+ "model.language_model.layers.13.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
80
+ "model.language_model.layers.13.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
81
+ "model.language_model.layers.13.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
82
+ "model.language_model.layers.13.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
83
+ "model.language_model.layers.13.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
84
+ "model.language_model.layers.13.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
85
+ "model.language_model.layers.13.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
86
+ "model.language_model.layers.13.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
87
+ "model.language_model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
88
+ "model.language_model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
89
+ "model.language_model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
90
+ "model.language_model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
91
+ "model.language_model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
92
+ "model.language_model.layers.14.linear_attn.A_log": "model-00001-of-00002.safetensors",
93
+ "model.language_model.layers.14.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
94
+ "model.language_model.layers.14.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
95
+ "model.language_model.layers.14.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
96
+ "model.language_model.layers.14.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
97
+ "model.language_model.layers.14.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
98
+ "model.language_model.layers.14.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
99
+ "model.language_model.layers.14.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
100
+ "model.language_model.layers.14.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
101
+ "model.language_model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
102
+ "model.language_model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
103
+ "model.language_model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
104
+ "model.language_model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
105
+ "model.language_model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
106
+ "model.language_model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
107
+ "model.language_model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
108
+ "model.language_model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
109
+ "model.language_model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
110
+ "model.language_model.layers.15.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
111
+ "model.language_model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
112
+ "model.language_model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
113
+ "model.language_model.layers.15.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
114
+ "model.language_model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
115
+ "model.language_model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
116
+ "model.language_model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
117
+ "model.language_model.layers.16.linear_attn.A_log": "model-00001-of-00002.safetensors",
118
+ "model.language_model.layers.16.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
119
+ "model.language_model.layers.16.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
120
+ "model.language_model.layers.16.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
121
+ "model.language_model.layers.16.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
122
+ "model.language_model.layers.16.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
123
+ "model.language_model.layers.16.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
124
+ "model.language_model.layers.16.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
125
+ "model.language_model.layers.16.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
126
+ "model.language_model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
127
+ "model.language_model.layers.16.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
128
+ "model.language_model.layers.16.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
129
+ "model.language_model.layers.16.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
130
+ "model.language_model.layers.17.input_layernorm.weight": "model-00002-of-00002.safetensors",
131
+ "model.language_model.layers.17.linear_attn.A_log": "model-00002-of-00002.safetensors",
132
+ "model.language_model.layers.17.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
133
+ "model.language_model.layers.17.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
134
+ "model.language_model.layers.17.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
135
+ "model.language_model.layers.17.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
136
+ "model.language_model.layers.17.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
137
+ "model.language_model.layers.17.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
138
+ "model.language_model.layers.17.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
139
+ "model.language_model.layers.17.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
140
+ "model.language_model.layers.17.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
141
+ "model.language_model.layers.17.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
142
+ "model.language_model.layers.17.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
143
+ "model.language_model.layers.17.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
144
+ "model.language_model.layers.18.input_layernorm.weight": "model-00002-of-00002.safetensors",
145
+ "model.language_model.layers.18.linear_attn.A_log": "model-00002-of-00002.safetensors",
146
+ "model.language_model.layers.18.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
147
+ "model.language_model.layers.18.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
148
+ "model.language_model.layers.18.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
149
+ "model.language_model.layers.18.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
150
+ "model.language_model.layers.18.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
151
+ "model.language_model.layers.18.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
152
+ "model.language_model.layers.18.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
153
+ "model.language_model.layers.18.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
154
+ "model.language_model.layers.18.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
155
+ "model.language_model.layers.18.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
156
+ "model.language_model.layers.18.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
157
+ "model.language_model.layers.18.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
158
+ "model.language_model.layers.19.input_layernorm.weight": "model-00002-of-00002.safetensors",
159
+ "model.language_model.layers.19.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
160
+ "model.language_model.layers.19.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
161
+ "model.language_model.layers.19.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
162
+ "model.language_model.layers.19.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
163
+ "model.language_model.layers.19.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
164
+ "model.language_model.layers.19.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
165
+ "model.language_model.layers.19.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
166
+ "model.language_model.layers.19.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
167
+ "model.language_model.layers.19.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
168
+ "model.language_model.layers.19.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
169
+ "model.language_model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
170
+ "model.language_model.layers.2.linear_attn.A_log": "model-00001-of-00002.safetensors",
171
+ "model.language_model.layers.2.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
172
+ "model.language_model.layers.2.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
173
+ "model.language_model.layers.2.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
174
+ "model.language_model.layers.2.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
175
+ "model.language_model.layers.2.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
176
+ "model.language_model.layers.2.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
177
+ "model.language_model.layers.2.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
178
+ "model.language_model.layers.2.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
179
+ "model.language_model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
180
+ "model.language_model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
181
+ "model.language_model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
182
+ "model.language_model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
183
+ "model.language_model.layers.20.input_layernorm.weight": "model-00002-of-00002.safetensors",
184
+ "model.language_model.layers.20.linear_attn.A_log": "model-00002-of-00002.safetensors",
185
+ "model.language_model.layers.20.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
186
+ "model.language_model.layers.20.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
187
+ "model.language_model.layers.20.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
188
+ "model.language_model.layers.20.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
189
+ "model.language_model.layers.20.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
190
+ "model.language_model.layers.20.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
191
+ "model.language_model.layers.20.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
192
+ "model.language_model.layers.20.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
193
+ "model.language_model.layers.20.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
194
+ "model.language_model.layers.20.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
195
+ "model.language_model.layers.20.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
196
+ "model.language_model.layers.20.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
197
+ "model.language_model.layers.21.input_layernorm.weight": "model-00002-of-00002.safetensors",
198
+ "model.language_model.layers.21.linear_attn.A_log": "model-00002-of-00002.safetensors",
199
+ "model.language_model.layers.21.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
200
+ "model.language_model.layers.21.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
201
+ "model.language_model.layers.21.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
202
+ "model.language_model.layers.21.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
203
+ "model.language_model.layers.21.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
204
+ "model.language_model.layers.21.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
205
+ "model.language_model.layers.21.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
206
+ "model.language_model.layers.21.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
207
+ "model.language_model.layers.21.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
208
+ "model.language_model.layers.21.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
209
+ "model.language_model.layers.21.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
210
+ "model.language_model.layers.21.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
211
+ "model.language_model.layers.22.input_layernorm.weight": "model-00002-of-00002.safetensors",
212
+ "model.language_model.layers.22.linear_attn.A_log": "model-00002-of-00002.safetensors",
213
+ "model.language_model.layers.22.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
214
+ "model.language_model.layers.22.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
215
+ "model.language_model.layers.22.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
216
+ "model.language_model.layers.22.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
217
+ "model.language_model.layers.22.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
218
+ "model.language_model.layers.22.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
219
+ "model.language_model.layers.22.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
220
+ "model.language_model.layers.22.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
221
+ "model.language_model.layers.22.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
222
+ "model.language_model.layers.22.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
223
+ "model.language_model.layers.22.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
224
+ "model.language_model.layers.22.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
225
+ "model.language_model.layers.23.input_layernorm.weight": "model-00002-of-00002.safetensors",
226
+ "model.language_model.layers.23.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
227
+ "model.language_model.layers.23.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
228
+ "model.language_model.layers.23.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
229
+ "model.language_model.layers.23.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
230
+ "model.language_model.layers.23.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
231
+ "model.language_model.layers.23.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
232
+ "model.language_model.layers.23.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
233
+ "model.language_model.layers.23.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
234
+ "model.language_model.layers.23.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
235
+ "model.language_model.layers.23.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
236
+ "model.language_model.layers.24.input_layernorm.weight": "model-00002-of-00002.safetensors",
237
+ "model.language_model.layers.24.linear_attn.A_log": "model-00002-of-00002.safetensors",
238
+ "model.language_model.layers.24.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
239
+ "model.language_model.layers.24.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
240
+ "model.language_model.layers.24.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
241
+ "model.language_model.layers.24.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
242
+ "model.language_model.layers.24.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
243
+ "model.language_model.layers.24.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
244
+ "model.language_model.layers.24.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
245
+ "model.language_model.layers.24.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
246
+ "model.language_model.layers.24.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
247
+ "model.language_model.layers.24.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
248
+ "model.language_model.layers.24.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
249
+ "model.language_model.layers.24.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
250
+ "model.language_model.layers.25.input_layernorm.weight": "model-00002-of-00002.safetensors",
251
+ "model.language_model.layers.25.linear_attn.A_log": "model-00002-of-00002.safetensors",
252
+ "model.language_model.layers.25.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
253
+ "model.language_model.layers.25.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
254
+ "model.language_model.layers.25.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
255
+ "model.language_model.layers.25.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
256
+ "model.language_model.layers.25.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
257
+ "model.language_model.layers.25.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
258
+ "model.language_model.layers.25.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
259
+ "model.language_model.layers.25.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
260
+ "model.language_model.layers.25.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
261
+ "model.language_model.layers.25.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
262
+ "model.language_model.layers.25.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
263
+ "model.language_model.layers.25.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
264
+ "model.language_model.layers.26.input_layernorm.weight": "model-00002-of-00002.safetensors",
265
+ "model.language_model.layers.26.linear_attn.A_log": "model-00002-of-00002.safetensors",
266
+ "model.language_model.layers.26.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
267
+ "model.language_model.layers.26.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
268
+ "model.language_model.layers.26.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
269
+ "model.language_model.layers.26.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
270
+ "model.language_model.layers.26.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
271
+ "model.language_model.layers.26.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
272
+ "model.language_model.layers.26.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
273
+ "model.language_model.layers.26.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
274
+ "model.language_model.layers.26.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
275
+ "model.language_model.layers.26.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
276
+ "model.language_model.layers.26.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
277
+ "model.language_model.layers.26.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
278
+ "model.language_model.layers.27.input_layernorm.weight": "model-00002-of-00002.safetensors",
279
+ "model.language_model.layers.27.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
280
+ "model.language_model.layers.27.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
281
+ "model.language_model.layers.27.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
282
+ "model.language_model.layers.27.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
283
+ "model.language_model.layers.27.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
284
+ "model.language_model.layers.27.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
285
+ "model.language_model.layers.27.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
286
+ "model.language_model.layers.27.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
287
+ "model.language_model.layers.27.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
288
+ "model.language_model.layers.27.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
289
+ "model.language_model.layers.28.input_layernorm.weight": "model-00002-of-00002.safetensors",
290
+ "model.language_model.layers.28.linear_attn.A_log": "model-00002-of-00002.safetensors",
291
+ "model.language_model.layers.28.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
292
+ "model.language_model.layers.28.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
293
+ "model.language_model.layers.28.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
294
+ "model.language_model.layers.28.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
295
+ "model.language_model.layers.28.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
296
+ "model.language_model.layers.28.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
297
+ "model.language_model.layers.28.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
298
+ "model.language_model.layers.28.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
299
+ "model.language_model.layers.28.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
300
+ "model.language_model.layers.28.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
301
+ "model.language_model.layers.28.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
302
+ "model.language_model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
303
+ "model.language_model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
304
+ "model.language_model.layers.29.linear_attn.A_log": "model-00002-of-00002.safetensors",
305
+ "model.language_model.layers.29.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
306
+ "model.language_model.layers.29.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
307
+ "model.language_model.layers.29.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
308
+ "model.language_model.layers.29.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
309
+ "model.language_model.layers.29.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
310
+ "model.language_model.layers.29.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
311
+ "model.language_model.layers.29.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
312
+ "model.language_model.layers.29.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
313
+ "model.language_model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
314
+ "model.language_model.layers.29.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
315
+ "model.language_model.layers.29.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
316
+ "model.language_model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
317
+ "model.language_model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
318
+ "model.language_model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
319
+ "model.language_model.layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
320
+ "model.language_model.layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
321
+ "model.language_model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
322
+ "model.language_model.layers.3.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
323
+ "model.language_model.layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
324
+ "model.language_model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
325
+ "model.language_model.layers.3.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
326
+ "model.language_model.layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
327
+ "model.language_model.layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
328
+ "model.language_model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
329
+ "model.language_model.layers.30.linear_attn.A_log": "model-00002-of-00002.safetensors",
330
+ "model.language_model.layers.30.linear_attn.conv1d.weight": "model-00002-of-00002.safetensors",
331
+ "model.language_model.layers.30.linear_attn.dt_bias": "model-00002-of-00002.safetensors",
332
+ "model.language_model.layers.30.linear_attn.in_proj_a.weight": "model-00002-of-00002.safetensors",
333
+ "model.language_model.layers.30.linear_attn.in_proj_b.weight": "model-00002-of-00002.safetensors",
334
+ "model.language_model.layers.30.linear_attn.in_proj_qkv.weight": "model-00002-of-00002.safetensors",
335
+ "model.language_model.layers.30.linear_attn.in_proj_z.weight": "model-00002-of-00002.safetensors",
336
+ "model.language_model.layers.30.linear_attn.norm.weight": "model-00002-of-00002.safetensors",
337
+ "model.language_model.layers.30.linear_attn.out_proj.weight": "model-00002-of-00002.safetensors",
338
+ "model.language_model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
339
+ "model.language_model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
340
+ "model.language_model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
341
+ "model.language_model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
342
+ "model.language_model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
343
+ "model.language_model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
344
+ "model.language_model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
345
+ "model.language_model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
346
+ "model.language_model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
347
+ "model.language_model.layers.31.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
348
+ "model.language_model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
349
+ "model.language_model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
350
+ "model.language_model.layers.31.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
351
+ "model.language_model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
352
+ "model.language_model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
353
+ "model.language_model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
354
+ "model.language_model.layers.4.linear_attn.A_log": "model-00001-of-00002.safetensors",
355
+ "model.language_model.layers.4.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
356
+ "model.language_model.layers.4.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
357
+ "model.language_model.layers.4.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
358
+ "model.language_model.layers.4.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
359
+ "model.language_model.layers.4.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
360
+ "model.language_model.layers.4.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
361
+ "model.language_model.layers.4.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
362
+ "model.language_model.layers.4.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
363
+ "model.language_model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
364
+ "model.language_model.layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
365
+ "model.language_model.layers.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
366
+ "model.language_model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
367
+ "model.language_model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
368
+ "model.language_model.layers.5.linear_attn.A_log": "model-00001-of-00002.safetensors",
369
+ "model.language_model.layers.5.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
370
+ "model.language_model.layers.5.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
371
+ "model.language_model.layers.5.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
372
+ "model.language_model.layers.5.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
373
+ "model.language_model.layers.5.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
374
+ "model.language_model.layers.5.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
375
+ "model.language_model.layers.5.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
376
+ "model.language_model.layers.5.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
377
+ "model.language_model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
378
+ "model.language_model.layers.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
379
+ "model.language_model.layers.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
380
+ "model.language_model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
381
+ "model.language_model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
382
+ "model.language_model.layers.6.linear_attn.A_log": "model-00001-of-00002.safetensors",
383
+ "model.language_model.layers.6.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
384
+ "model.language_model.layers.6.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
385
+ "model.language_model.layers.6.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
386
+ "model.language_model.layers.6.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
387
+ "model.language_model.layers.6.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
388
+ "model.language_model.layers.6.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
389
+ "model.language_model.layers.6.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
390
+ "model.language_model.layers.6.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
391
+ "model.language_model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
392
+ "model.language_model.layers.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
393
+ "model.language_model.layers.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
394
+ "model.language_model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
395
+ "model.language_model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
396
+ "model.language_model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
397
+ "model.language_model.layers.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
398
+ "model.language_model.layers.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
399
+ "model.language_model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
400
+ "model.language_model.layers.7.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
401
+ "model.language_model.layers.7.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
402
+ "model.language_model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
403
+ "model.language_model.layers.7.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
404
+ "model.language_model.layers.7.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
405
+ "model.language_model.layers.7.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
406
+ "model.language_model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
407
+ "model.language_model.layers.8.linear_attn.A_log": "model-00001-of-00002.safetensors",
408
+ "model.language_model.layers.8.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
409
+ "model.language_model.layers.8.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
410
+ "model.language_model.layers.8.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
411
+ "model.language_model.layers.8.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
412
+ "model.language_model.layers.8.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
413
+ "model.language_model.layers.8.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
414
+ "model.language_model.layers.8.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
415
+ "model.language_model.layers.8.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
416
+ "model.language_model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
417
+ "model.language_model.layers.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
418
+ "model.language_model.layers.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
419
+ "model.language_model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
420
+ "model.language_model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
421
+ "model.language_model.layers.9.linear_attn.A_log": "model-00001-of-00002.safetensors",
422
+ "model.language_model.layers.9.linear_attn.conv1d.weight": "model-00001-of-00002.safetensors",
423
+ "model.language_model.layers.9.linear_attn.dt_bias": "model-00001-of-00002.safetensors",
424
+ "model.language_model.layers.9.linear_attn.in_proj_a.weight": "model-00001-of-00002.safetensors",
425
+ "model.language_model.layers.9.linear_attn.in_proj_b.weight": "model-00001-of-00002.safetensors",
426
+ "model.language_model.layers.9.linear_attn.in_proj_qkv.weight": "model-00001-of-00002.safetensors",
427
+ "model.language_model.layers.9.linear_attn.in_proj_z.weight": "model-00001-of-00002.safetensors",
428
+ "model.language_model.layers.9.linear_attn.norm.weight": "model-00001-of-00002.safetensors",
429
+ "model.language_model.layers.9.linear_attn.out_proj.weight": "model-00001-of-00002.safetensors",
430
+ "model.language_model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
431
+ "model.language_model.layers.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
432
+ "model.language_model.layers.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
433
+ "model.language_model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
434
+ "model.language_model.norm.weight": "model-00002-of-00002.safetensors",
435
+ "model.visual.blocks.0.attn.proj.bias": "model-00002-of-00002.safetensors",
436
+ "model.visual.blocks.0.attn.proj.weight": "model-00002-of-00002.safetensors",
437
+ "model.visual.blocks.0.attn.qkv.bias": "model-00002-of-00002.safetensors",
438
+ "model.visual.blocks.0.attn.qkv.weight": "model-00002-of-00002.safetensors",
439
+ "model.visual.blocks.0.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
440
+ "model.visual.blocks.0.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
441
+ "model.visual.blocks.0.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
442
+ "model.visual.blocks.0.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
443
+ "model.visual.blocks.0.norm1.bias": "model-00002-of-00002.safetensors",
444
+ "model.visual.blocks.0.norm1.weight": "model-00002-of-00002.safetensors",
445
+ "model.visual.blocks.0.norm2.bias": "model-00002-of-00002.safetensors",
446
+ "model.visual.blocks.0.norm2.weight": "model-00002-of-00002.safetensors",
447
+ "model.visual.blocks.1.attn.proj.bias": "model-00002-of-00002.safetensors",
448
+ "model.visual.blocks.1.attn.proj.weight": "model-00002-of-00002.safetensors",
449
+ "model.visual.blocks.1.attn.qkv.bias": "model-00002-of-00002.safetensors",
450
+ "model.visual.blocks.1.attn.qkv.weight": "model-00002-of-00002.safetensors",
451
+ "model.visual.blocks.1.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
452
+ "model.visual.blocks.1.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
453
+ "model.visual.blocks.1.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
454
+ "model.visual.blocks.1.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
455
+ "model.visual.blocks.1.norm1.bias": "model-00002-of-00002.safetensors",
456
+ "model.visual.blocks.1.norm1.weight": "model-00002-of-00002.safetensors",
457
+ "model.visual.blocks.1.norm2.bias": "model-00002-of-00002.safetensors",
458
+ "model.visual.blocks.1.norm2.weight": "model-00002-of-00002.safetensors",
459
+ "model.visual.blocks.10.attn.proj.bias": "model-00002-of-00002.safetensors",
460
+ "model.visual.blocks.10.attn.proj.weight": "model-00002-of-00002.safetensors",
461
+ "model.visual.blocks.10.attn.qkv.bias": "model-00002-of-00002.safetensors",
462
+ "model.visual.blocks.10.attn.qkv.weight": "model-00002-of-00002.safetensors",
463
+ "model.visual.blocks.10.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
464
+ "model.visual.blocks.10.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
465
+ "model.visual.blocks.10.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
466
+ "model.visual.blocks.10.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
467
+ "model.visual.blocks.10.norm1.bias": "model-00002-of-00002.safetensors",
468
+ "model.visual.blocks.10.norm1.weight": "model-00002-of-00002.safetensors",
469
+ "model.visual.blocks.10.norm2.bias": "model-00002-of-00002.safetensors",
470
+ "model.visual.blocks.10.norm2.weight": "model-00002-of-00002.safetensors",
471
+ "model.visual.blocks.11.attn.proj.bias": "model-00002-of-00002.safetensors",
472
+ "model.visual.blocks.11.attn.proj.weight": "model-00002-of-00002.safetensors",
473
+ "model.visual.blocks.11.attn.qkv.bias": "model-00002-of-00002.safetensors",
474
+ "model.visual.blocks.11.attn.qkv.weight": "model-00002-of-00002.safetensors",
475
+ "model.visual.blocks.11.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
476
+ "model.visual.blocks.11.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
477
+ "model.visual.blocks.11.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
478
+ "model.visual.blocks.11.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
479
+ "model.visual.blocks.11.norm1.bias": "model-00002-of-00002.safetensors",
480
+ "model.visual.blocks.11.norm1.weight": "model-00002-of-00002.safetensors",
481
+ "model.visual.blocks.11.norm2.bias": "model-00002-of-00002.safetensors",
482
+ "model.visual.blocks.11.norm2.weight": "model-00002-of-00002.safetensors",
483
+ "model.visual.blocks.12.attn.proj.bias": "model-00002-of-00002.safetensors",
484
+ "model.visual.blocks.12.attn.proj.weight": "model-00002-of-00002.safetensors",
485
+ "model.visual.blocks.12.attn.qkv.bias": "model-00002-of-00002.safetensors",
486
+ "model.visual.blocks.12.attn.qkv.weight": "model-00002-of-00002.safetensors",
487
+ "model.visual.blocks.12.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
488
+ "model.visual.blocks.12.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
489
+ "model.visual.blocks.12.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
490
+ "model.visual.blocks.12.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
491
+ "model.visual.blocks.12.norm1.bias": "model-00002-of-00002.safetensors",
492
+ "model.visual.blocks.12.norm1.weight": "model-00002-of-00002.safetensors",
493
+ "model.visual.blocks.12.norm2.bias": "model-00002-of-00002.safetensors",
494
+ "model.visual.blocks.12.norm2.weight": "model-00002-of-00002.safetensors",
495
+ "model.visual.blocks.13.attn.proj.bias": "model-00002-of-00002.safetensors",
496
+ "model.visual.blocks.13.attn.proj.weight": "model-00002-of-00002.safetensors",
497
+ "model.visual.blocks.13.attn.qkv.bias": "model-00002-of-00002.safetensors",
498
+ "model.visual.blocks.13.attn.qkv.weight": "model-00002-of-00002.safetensors",
499
+ "model.visual.blocks.13.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
500
+ "model.visual.blocks.13.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
501
+ "model.visual.blocks.13.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
502
+ "model.visual.blocks.13.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
503
+ "model.visual.blocks.13.norm1.bias": "model-00002-of-00002.safetensors",
504
+ "model.visual.blocks.13.norm1.weight": "model-00002-of-00002.safetensors",
505
+ "model.visual.blocks.13.norm2.bias": "model-00002-of-00002.safetensors",
506
+ "model.visual.blocks.13.norm2.weight": "model-00002-of-00002.safetensors",
507
+ "model.visual.blocks.14.attn.proj.bias": "model-00002-of-00002.safetensors",
508
+ "model.visual.blocks.14.attn.proj.weight": "model-00002-of-00002.safetensors",
509
+ "model.visual.blocks.14.attn.qkv.bias": "model-00002-of-00002.safetensors",
510
+ "model.visual.blocks.14.attn.qkv.weight": "model-00002-of-00002.safetensors",
511
+ "model.visual.blocks.14.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
512
+ "model.visual.blocks.14.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
513
+ "model.visual.blocks.14.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
514
+ "model.visual.blocks.14.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
515
+ "model.visual.blocks.14.norm1.bias": "model-00002-of-00002.safetensors",
516
+ "model.visual.blocks.14.norm1.weight": "model-00002-of-00002.safetensors",
517
+ "model.visual.blocks.14.norm2.bias": "model-00002-of-00002.safetensors",
518
+ "model.visual.blocks.14.norm2.weight": "model-00002-of-00002.safetensors",
519
+ "model.visual.blocks.15.attn.proj.bias": "model-00002-of-00002.safetensors",
520
+ "model.visual.blocks.15.attn.proj.weight": "model-00002-of-00002.safetensors",
521
+ "model.visual.blocks.15.attn.qkv.bias": "model-00002-of-00002.safetensors",
522
+ "model.visual.blocks.15.attn.qkv.weight": "model-00002-of-00002.safetensors",
523
+ "model.visual.blocks.15.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
524
+ "model.visual.blocks.15.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
525
+ "model.visual.blocks.15.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
526
+ "model.visual.blocks.15.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
527
+ "model.visual.blocks.15.norm1.bias": "model-00002-of-00002.safetensors",
528
+ "model.visual.blocks.15.norm1.weight": "model-00002-of-00002.safetensors",
529
+ "model.visual.blocks.15.norm2.bias": "model-00002-of-00002.safetensors",
530
+ "model.visual.blocks.15.norm2.weight": "model-00002-of-00002.safetensors",
531
+ "model.visual.blocks.16.attn.proj.bias": "model-00002-of-00002.safetensors",
532
+ "model.visual.blocks.16.attn.proj.weight": "model-00002-of-00002.safetensors",
533
+ "model.visual.blocks.16.attn.qkv.bias": "model-00002-of-00002.safetensors",
534
+ "model.visual.blocks.16.attn.qkv.weight": "model-00002-of-00002.safetensors",
535
+ "model.visual.blocks.16.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
536
+ "model.visual.blocks.16.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
537
+ "model.visual.blocks.16.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
538
+ "model.visual.blocks.16.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
539
+ "model.visual.blocks.16.norm1.bias": "model-00002-of-00002.safetensors",
540
+ "model.visual.blocks.16.norm1.weight": "model-00002-of-00002.safetensors",
541
+ "model.visual.blocks.16.norm2.bias": "model-00002-of-00002.safetensors",
542
+ "model.visual.blocks.16.norm2.weight": "model-00002-of-00002.safetensors",
543
+ "model.visual.blocks.17.attn.proj.bias": "model-00002-of-00002.safetensors",
544
+ "model.visual.blocks.17.attn.proj.weight": "model-00002-of-00002.safetensors",
545
+ "model.visual.blocks.17.attn.qkv.bias": "model-00002-of-00002.safetensors",
546
+ "model.visual.blocks.17.attn.qkv.weight": "model-00002-of-00002.safetensors",
547
+ "model.visual.blocks.17.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
548
+ "model.visual.blocks.17.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
549
+ "model.visual.blocks.17.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
550
+ "model.visual.blocks.17.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
551
+ "model.visual.blocks.17.norm1.bias": "model-00002-of-00002.safetensors",
552
+ "model.visual.blocks.17.norm1.weight": "model-00002-of-00002.safetensors",
553
+ "model.visual.blocks.17.norm2.bias": "model-00002-of-00002.safetensors",
554
+ "model.visual.blocks.17.norm2.weight": "model-00002-of-00002.safetensors",
555
+ "model.visual.blocks.18.attn.proj.bias": "model-00002-of-00002.safetensors",
556
+ "model.visual.blocks.18.attn.proj.weight": "model-00002-of-00002.safetensors",
557
+ "model.visual.blocks.18.attn.qkv.bias": "model-00002-of-00002.safetensors",
558
+ "model.visual.blocks.18.attn.qkv.weight": "model-00002-of-00002.safetensors",
559
+ "model.visual.blocks.18.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
560
+ "model.visual.blocks.18.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
561
+ "model.visual.blocks.18.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
562
+ "model.visual.blocks.18.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
563
+ "model.visual.blocks.18.norm1.bias": "model-00002-of-00002.safetensors",
564
+ "model.visual.blocks.18.norm1.weight": "model-00002-of-00002.safetensors",
565
+ "model.visual.blocks.18.norm2.bias": "model-00002-of-00002.safetensors",
566
+ "model.visual.blocks.18.norm2.weight": "model-00002-of-00002.safetensors",
567
+ "model.visual.blocks.19.attn.proj.bias": "model-00002-of-00002.safetensors",
568
+ "model.visual.blocks.19.attn.proj.weight": "model-00002-of-00002.safetensors",
569
+ "model.visual.blocks.19.attn.qkv.bias": "model-00002-of-00002.safetensors",
570
+ "model.visual.blocks.19.attn.qkv.weight": "model-00002-of-00002.safetensors",
571
+ "model.visual.blocks.19.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
572
+ "model.visual.blocks.19.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
573
+ "model.visual.blocks.19.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
574
+ "model.visual.blocks.19.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
575
+ "model.visual.blocks.19.norm1.bias": "model-00002-of-00002.safetensors",
576
+ "model.visual.blocks.19.norm1.weight": "model-00002-of-00002.safetensors",
577
+ "model.visual.blocks.19.norm2.bias": "model-00002-of-00002.safetensors",
578
+ "model.visual.blocks.19.norm2.weight": "model-00002-of-00002.safetensors",
579
+ "model.visual.blocks.2.attn.proj.bias": "model-00002-of-00002.safetensors",
580
+ "model.visual.blocks.2.attn.proj.weight": "model-00002-of-00002.safetensors",
581
+ "model.visual.blocks.2.attn.qkv.bias": "model-00002-of-00002.safetensors",
582
+ "model.visual.blocks.2.attn.qkv.weight": "model-00002-of-00002.safetensors",
583
+ "model.visual.blocks.2.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
584
+ "model.visual.blocks.2.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
585
+ "model.visual.blocks.2.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
586
+ "model.visual.blocks.2.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
587
+ "model.visual.blocks.2.norm1.bias": "model-00002-of-00002.safetensors",
588
+ "model.visual.blocks.2.norm1.weight": "model-00002-of-00002.safetensors",
589
+ "model.visual.blocks.2.norm2.bias": "model-00002-of-00002.safetensors",
590
+ "model.visual.blocks.2.norm2.weight": "model-00002-of-00002.safetensors",
591
+ "model.visual.blocks.20.attn.proj.bias": "model-00002-of-00002.safetensors",
592
+ "model.visual.blocks.20.attn.proj.weight": "model-00002-of-00002.safetensors",
593
+ "model.visual.blocks.20.attn.qkv.bias": "model-00002-of-00002.safetensors",
594
+ "model.visual.blocks.20.attn.qkv.weight": "model-00002-of-00002.safetensors",
595
+ "model.visual.blocks.20.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
596
+ "model.visual.blocks.20.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
597
+ "model.visual.blocks.20.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
598
+ "model.visual.blocks.20.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
599
+ "model.visual.blocks.20.norm1.bias": "model-00002-of-00002.safetensors",
600
+ "model.visual.blocks.20.norm1.weight": "model-00002-of-00002.safetensors",
601
+ "model.visual.blocks.20.norm2.bias": "model-00002-of-00002.safetensors",
602
+ "model.visual.blocks.20.norm2.weight": "model-00002-of-00002.safetensors",
603
+ "model.visual.blocks.21.attn.proj.bias": "model-00002-of-00002.safetensors",
604
+ "model.visual.blocks.21.attn.proj.weight": "model-00002-of-00002.safetensors",
605
+ "model.visual.blocks.21.attn.qkv.bias": "model-00002-of-00002.safetensors",
606
+ "model.visual.blocks.21.attn.qkv.weight": "model-00002-of-00002.safetensors",
607
+ "model.visual.blocks.21.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
608
+ "model.visual.blocks.21.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
609
+ "model.visual.blocks.21.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
610
+ "model.visual.blocks.21.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
611
+ "model.visual.blocks.21.norm1.bias": "model-00002-of-00002.safetensors",
612
+ "model.visual.blocks.21.norm1.weight": "model-00002-of-00002.safetensors",
613
+ "model.visual.blocks.21.norm2.bias": "model-00002-of-00002.safetensors",
614
+ "model.visual.blocks.21.norm2.weight": "model-00002-of-00002.safetensors",
615
+ "model.visual.blocks.22.attn.proj.bias": "model-00002-of-00002.safetensors",
616
+ "model.visual.blocks.22.attn.proj.weight": "model-00002-of-00002.safetensors",
617
+ "model.visual.blocks.22.attn.qkv.bias": "model-00002-of-00002.safetensors",
618
+ "model.visual.blocks.22.attn.qkv.weight": "model-00002-of-00002.safetensors",
619
+ "model.visual.blocks.22.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
620
+ "model.visual.blocks.22.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
621
+ "model.visual.blocks.22.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
622
+ "model.visual.blocks.22.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
623
+ "model.visual.blocks.22.norm1.bias": "model-00002-of-00002.safetensors",
624
+ "model.visual.blocks.22.norm1.weight": "model-00002-of-00002.safetensors",
625
+ "model.visual.blocks.22.norm2.bias": "model-00002-of-00002.safetensors",
626
+ "model.visual.blocks.22.norm2.weight": "model-00002-of-00002.safetensors",
627
+ "model.visual.blocks.23.attn.proj.bias": "model-00002-of-00002.safetensors",
628
+ "model.visual.blocks.23.attn.proj.weight": "model-00002-of-00002.safetensors",
629
+ "model.visual.blocks.23.attn.qkv.bias": "model-00002-of-00002.safetensors",
630
+ "model.visual.blocks.23.attn.qkv.weight": "model-00002-of-00002.safetensors",
631
+ "model.visual.blocks.23.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
632
+ "model.visual.blocks.23.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
633
+ "model.visual.blocks.23.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
634
+ "model.visual.blocks.23.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
635
+ "model.visual.blocks.23.norm1.bias": "model-00002-of-00002.safetensors",
636
+ "model.visual.blocks.23.norm1.weight": "model-00002-of-00002.safetensors",
637
+ "model.visual.blocks.23.norm2.bias": "model-00002-of-00002.safetensors",
638
+ "model.visual.blocks.23.norm2.weight": "model-00002-of-00002.safetensors",
639
+ "model.visual.blocks.3.attn.proj.bias": "model-00002-of-00002.safetensors",
640
+ "model.visual.blocks.3.attn.proj.weight": "model-00002-of-00002.safetensors",
641
+ "model.visual.blocks.3.attn.qkv.bias": "model-00002-of-00002.safetensors",
642
+ "model.visual.blocks.3.attn.qkv.weight": "model-00002-of-00002.safetensors",
643
+ "model.visual.blocks.3.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
644
+ "model.visual.blocks.3.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
645
+ "model.visual.blocks.3.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
646
+ "model.visual.blocks.3.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
647
+ "model.visual.blocks.3.norm1.bias": "model-00002-of-00002.safetensors",
648
+ "model.visual.blocks.3.norm1.weight": "model-00002-of-00002.safetensors",
649
+ "model.visual.blocks.3.norm2.bias": "model-00002-of-00002.safetensors",
650
+ "model.visual.blocks.3.norm2.weight": "model-00002-of-00002.safetensors",
651
+ "model.visual.blocks.4.attn.proj.bias": "model-00002-of-00002.safetensors",
652
+ "model.visual.blocks.4.attn.proj.weight": "model-00002-of-00002.safetensors",
653
+ "model.visual.blocks.4.attn.qkv.bias": "model-00002-of-00002.safetensors",
654
+ "model.visual.blocks.4.attn.qkv.weight": "model-00002-of-00002.safetensors",
655
+ "model.visual.blocks.4.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
656
+ "model.visual.blocks.4.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
657
+ "model.visual.blocks.4.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
658
+ "model.visual.blocks.4.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
659
+ "model.visual.blocks.4.norm1.bias": "model-00002-of-00002.safetensors",
660
+ "model.visual.blocks.4.norm1.weight": "model-00002-of-00002.safetensors",
661
+ "model.visual.blocks.4.norm2.bias": "model-00002-of-00002.safetensors",
662
+ "model.visual.blocks.4.norm2.weight": "model-00002-of-00002.safetensors",
663
+ "model.visual.blocks.5.attn.proj.bias": "model-00002-of-00002.safetensors",
664
+ "model.visual.blocks.5.attn.proj.weight": "model-00002-of-00002.safetensors",
665
+ "model.visual.blocks.5.attn.qkv.bias": "model-00002-of-00002.safetensors",
666
+ "model.visual.blocks.5.attn.qkv.weight": "model-00002-of-00002.safetensors",
667
+ "model.visual.blocks.5.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
668
+ "model.visual.blocks.5.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
669
+ "model.visual.blocks.5.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
670
+ "model.visual.blocks.5.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
671
+ "model.visual.blocks.5.norm1.bias": "model-00002-of-00002.safetensors",
672
+ "model.visual.blocks.5.norm1.weight": "model-00002-of-00002.safetensors",
673
+ "model.visual.blocks.5.norm2.bias": "model-00002-of-00002.safetensors",
674
+ "model.visual.blocks.5.norm2.weight": "model-00002-of-00002.safetensors",
675
+ "model.visual.blocks.6.attn.proj.bias": "model-00002-of-00002.safetensors",
676
+ "model.visual.blocks.6.attn.proj.weight": "model-00002-of-00002.safetensors",
677
+ "model.visual.blocks.6.attn.qkv.bias": "model-00002-of-00002.safetensors",
678
+ "model.visual.blocks.6.attn.qkv.weight": "model-00002-of-00002.safetensors",
679
+ "model.visual.blocks.6.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
680
+ "model.visual.blocks.6.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
681
+ "model.visual.blocks.6.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
682
+ "model.visual.blocks.6.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
683
+ "model.visual.blocks.6.norm1.bias": "model-00002-of-00002.safetensors",
684
+ "model.visual.blocks.6.norm1.weight": "model-00002-of-00002.safetensors",
685
+ "model.visual.blocks.6.norm2.bias": "model-00002-of-00002.safetensors",
686
+ "model.visual.blocks.6.norm2.weight": "model-00002-of-00002.safetensors",
687
+ "model.visual.blocks.7.attn.proj.bias": "model-00002-of-00002.safetensors",
688
+ "model.visual.blocks.7.attn.proj.weight": "model-00002-of-00002.safetensors",
689
+ "model.visual.blocks.7.attn.qkv.bias": "model-00002-of-00002.safetensors",
690
+ "model.visual.blocks.7.attn.qkv.weight": "model-00002-of-00002.safetensors",
691
+ "model.visual.blocks.7.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
692
+ "model.visual.blocks.7.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
693
+ "model.visual.blocks.7.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
694
+ "model.visual.blocks.7.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
695
+ "model.visual.blocks.7.norm1.bias": "model-00002-of-00002.safetensors",
696
+ "model.visual.blocks.7.norm1.weight": "model-00002-of-00002.safetensors",
697
+ "model.visual.blocks.7.norm2.bias": "model-00002-of-00002.safetensors",
698
+ "model.visual.blocks.7.norm2.weight": "model-00002-of-00002.safetensors",
699
+ "model.visual.blocks.8.attn.proj.bias": "model-00002-of-00002.safetensors",
700
+ "model.visual.blocks.8.attn.proj.weight": "model-00002-of-00002.safetensors",
701
+ "model.visual.blocks.8.attn.qkv.bias": "model-00002-of-00002.safetensors",
702
+ "model.visual.blocks.8.attn.qkv.weight": "model-00002-of-00002.safetensors",
703
+ "model.visual.blocks.8.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
704
+ "model.visual.blocks.8.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
705
+ "model.visual.blocks.8.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
706
+ "model.visual.blocks.8.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
707
+ "model.visual.blocks.8.norm1.bias": "model-00002-of-00002.safetensors",
708
+ "model.visual.blocks.8.norm1.weight": "model-00002-of-00002.safetensors",
709
+ "model.visual.blocks.8.norm2.bias": "model-00002-of-00002.safetensors",
710
+ "model.visual.blocks.8.norm2.weight": "model-00002-of-00002.safetensors",
711
+ "model.visual.blocks.9.attn.proj.bias": "model-00002-of-00002.safetensors",
712
+ "model.visual.blocks.9.attn.proj.weight": "model-00002-of-00002.safetensors",
713
+ "model.visual.blocks.9.attn.qkv.bias": "model-00002-of-00002.safetensors",
714
+ "model.visual.blocks.9.attn.qkv.weight": "model-00002-of-00002.safetensors",
715
+ "model.visual.blocks.9.mlp.linear_fc1.bias": "model-00002-of-00002.safetensors",
716
+ "model.visual.blocks.9.mlp.linear_fc1.weight": "model-00002-of-00002.safetensors",
717
+ "model.visual.blocks.9.mlp.linear_fc2.bias": "model-00002-of-00002.safetensors",
718
+ "model.visual.blocks.9.mlp.linear_fc2.weight": "model-00002-of-00002.safetensors",
719
+ "model.visual.blocks.9.norm1.bias": "model-00002-of-00002.safetensors",
720
+ "model.visual.blocks.9.norm1.weight": "model-00002-of-00002.safetensors",
721
+ "model.visual.blocks.9.norm2.bias": "model-00002-of-00002.safetensors",
722
+ "model.visual.blocks.9.norm2.weight": "model-00002-of-00002.safetensors",
723
+ "model.visual.merger.linear_fc1.bias": "model-00002-of-00002.safetensors",
724
+ "model.visual.merger.linear_fc1.weight": "model-00002-of-00002.safetensors",
725
+ "model.visual.merger.linear_fc2.bias": "model-00002-of-00002.safetensors",
726
+ "model.visual.merger.linear_fc2.weight": "model-00002-of-00002.safetensors",
727
+ "model.visual.merger.norm.bias": "model-00002-of-00002.safetensors",
728
+ "model.visual.merger.norm.weight": "model-00002-of-00002.safetensors",
729
+ "model.visual.patch_embed.proj.bias": "model-00002-of-00002.safetensors",
730
+ "model.visual.patch_embed.proj.weight": "model-00002-of-00002.safetensors",
731
+ "model.visual.pos_embed.weight": "model-00002-of-00002.safetensors"
732
+ }
733
+ }
modeling_colqwen35_bidirection.py ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ColQwen35Bidirection - Inheritance-based Qwen3.5 retrieval model.
3
+
4
+ Subclasses Qwen3_5ForConditionalGeneration directly and adds a projection
5
+ head for ColBERT-style multi-vector retrieval. Supports both causal (default)
6
+ and bidirectional attention modes via the `is_causal` parameter.
7
+
8
+ Key design decisions:
9
+ - `is_causal` is popped in `from_pretrained` and NEVER forwarded to
10
+ `super().from_pretrained(...)`. This prevents HuggingFace's
11
+ PretrainedConfig catch-all from injecting `config.is_causal` onto
12
+ the model config, which would alter Qwen 3.5's mask resolver path.
13
+ With `is_causal=True`, the load path is bit-equivalent to
14
+ ColQwen35Default (no config attribute mutation).
15
+ - Bidirectional patches (`_configure_bidirectional_attention` on the
16
+ config, `_patch_attention_is_causal` on attention modules) are
17
+ applied around the parent load in `from_pretrained`, not forwarded
18
+ through kwargs. The `__init__` retains idempotent guards for direct
19
+ construction (e.g. tests).
20
+ - No `self.is_causal` attribute is set before `super().__init__()`,
21
+ avoiding shadowing of inherited attributes.
22
+ """
23
+
24
+ from torch import nn
25
+ from transformers.models.qwen3_5 import Qwen3_5ForConditionalGeneration, Qwen3_5Config
26
+ from transformers.utils import is_torch_available, logging
27
+
28
+ if is_torch_available():
29
+ import torch
30
+
31
+ logger = logging.get_logger(__name__)
32
+
33
+
34
+ class ColQwen35Bidirection(Qwen3_5ForConditionalGeneration):
35
+ """
36
+ Qwen 3.5 VLM adapted to return ColBERT-style token embeddings.
37
+
38
+ Supports bidirectional attention (is_causal=False) for the 8 full
39
+ attention layers while leaving the 24 GatedDeltaNet layers causal.
40
+ When is_causal=True (default), the model uses Qwen 3.5's native
41
+ attention without any modifications.
42
+ """
43
+
44
+ _checkpoint_conversion_mapping: dict[str, str] = {
45
+ r"^base_model\.model\.embedding_proj_layer": "embedding_proj_layer",
46
+ }
47
+
48
+ def __init__(
49
+ self,
50
+ config: Qwen3_5Config,
51
+ embedding_dim: int | None = None,
52
+ is_causal: bool | None = None,
53
+ ):
54
+ if embedding_dim is None:
55
+ embedding_dim = getattr(config, "embedding_dim", 128)
56
+ if is_causal is None:
57
+ is_causal = getattr(config, "is_causal", True)
58
+
59
+ if not is_causal:
60
+ self._configure_bidirectional_attention(config)
61
+
62
+ super().__init__(config)
63
+
64
+ if not is_causal:
65
+ self._patch_attention_is_causal()
66
+
67
+ self._is_causal_mode = is_causal
68
+
69
+ hidden_size = getattr(self.config, "hidden_size", None)
70
+ if hidden_size is None and hasattr(self.config, "text_config"):
71
+ hidden_size = getattr(self.config.text_config, "hidden_size", None)
72
+ if hidden_size is None:
73
+ raise ValueError(
74
+ f"Unable to determine text hidden size for {type(self.config).__name__}."
75
+ )
76
+
77
+ self.embedding_dim = embedding_dim
78
+ self.config.embedding_dim = embedding_dim
79
+ self.embedding_proj_layer = nn.Linear(hidden_size, self.embedding_dim)
80
+ self.padding_side = "left"
81
+
82
+ self.post_init()
83
+ if getattr(self.config, "lm_head_removed", False):
84
+ self.remove_lm_head()
85
+
86
+ @staticmethod
87
+ def _configure_bidirectional_attention(config: Qwen3_5Config) -> None:
88
+ """
89
+ Patch config for bidirectional mask generation.
90
+
91
+ Sets is_causal=False on the config so that create_causal_mask()
92
+ produces a padding-only mask instead of a lower-triangular causal mask.
93
+ Must be called before super().__init__().
94
+ """
95
+ text_config = config.get_text_config()
96
+ text_config.is_causal = False
97
+ config.is_causal = False
98
+
99
+ def _patch_attention_is_causal(self) -> None:
100
+ """
101
+ Patch is_causal on every Qwen3_5Attention module.
102
+
103
+ Upstream Qwen3_5Attention.__init__ hardcodes self.is_causal = True.
104
+ This flag is passed to Flash Attention and other attention backends,
105
+ so it must be False for bidirectional behavior.
106
+ """
107
+ patched = 0
108
+ for module in self.modules():
109
+ if type(module).__name__ == "Qwen3_5Attention":
110
+ module.is_causal = False
111
+ patched += 1
112
+ logger.info("Patched is_causal=False on %d Qwen3_5Attention modules", patched)
113
+
114
+ @classmethod
115
+ def from_pretrained(cls, *args, **kwargs):
116
+ is_causal = kwargs.pop("is_causal", None)
117
+ key_mapping = kwargs.pop("key_mapping", None)
118
+ if key_mapping is None:
119
+ key_mapping = dict(getattr(super(), "_checkpoint_conversion_mapping", {}))
120
+ key_mapping.update(cls._checkpoint_conversion_mapping)
121
+
122
+ if not is_causal:
123
+ from transformers import AutoConfig
124
+ config = kwargs.get("config")
125
+ if config is None:
126
+ path = args[0] if args else kwargs.get("pretrained_model_name_or_path")
127
+ config = AutoConfig.from_pretrained(path)
128
+ kwargs["config"] = config
129
+ cls._configure_bidirectional_attention(config)
130
+
131
+ instance = super().from_pretrained(
132
+ *args, **kwargs, key_mapping=key_mapping
133
+ )
134
+
135
+ resolved_is_causal = (
136
+ getattr(instance.config, "is_causal", True)
137
+ if is_causal is None
138
+ else is_causal
139
+ )
140
+ if not resolved_is_causal:
141
+ instance._patch_attention_is_causal()
142
+
143
+ instance._is_causal_mode = resolved_is_causal
144
+ return instance
145
+
146
+ def remove_lm_head(self) -> dict[str, int]:
147
+ """Permanently remove the unused language-model output projection.
148
+
149
+ The retrieval forward path calls ``self.model`` directly and consumes
150
+ hidden states, so ``lm_head`` is never used to produce embeddings.
151
+ Persisting ``lm_head_removed`` in the config ensures exported
152
+ checkpoints reload with ``nn.Identity`` instead of recreating a large,
153
+ randomly initialized output projection.
154
+ """
155
+ lm_head = getattr(self, "lm_head", None)
156
+ if lm_head is None:
157
+ raise AttributeError("Model has no lm_head attribute")
158
+ if isinstance(lm_head, nn.Identity):
159
+ return {"parameters": 0, "bytes": 0}
160
+
161
+ parameters = {id(parameter): parameter for parameter in lm_head.parameters()}
162
+ shared_elsewhere = {
163
+ id(parameter)
164
+ for name, parameter in self.named_parameters(remove_duplicate=False)
165
+ if not name.startswith("lm_head.")
166
+ }
167
+ removed = {
168
+ parameter_id: parameter
169
+ for parameter_id, parameter in parameters.items()
170
+ if parameter_id not in shared_elsewhere
171
+ }
172
+ removed_parameters = sum(parameter.numel() for parameter in removed.values())
173
+ removed_bytes = sum(
174
+ parameter.numel() * parameter.element_size()
175
+ for parameter in removed.values()
176
+ )
177
+
178
+ self.lm_head = nn.Identity()
179
+ self.config.lm_head_removed = True
180
+ self.config.tie_word_embeddings = False
181
+
182
+ tied_keys = getattr(self, "_tied_weights_keys", None)
183
+ if isinstance(tied_keys, dict):
184
+ self._tied_weights_keys = {
185
+ key: value
186
+ for key, value in tied_keys.items()
187
+ if "lm_head" not in key and "lm_head" not in value
188
+ }
189
+ elif isinstance(tied_keys, (list, tuple, set)):
190
+ self._tied_weights_keys = [
191
+ key for key in tied_keys if "lm_head" not in key
192
+ ]
193
+
194
+ return {"parameters": removed_parameters, "bytes": removed_bytes}
195
+
196
+ def forward(self, *args, **kwargs) -> torch.Tensor:
197
+ inner = getattr(self.model, "model", self.model)
198
+ if hasattr(inner, "rope_deltas"):
199
+ inner.rope_deltas = None
200
+
201
+ kwargs.pop("return_dict", None)
202
+ kwargs.pop("output_hidden_states", None)
203
+ kwargs.pop("use_cache", None)
204
+
205
+ use_cache = not self.training
206
+
207
+ last_hidden_state = (
208
+ self.model.forward(
209
+ *args, **kwargs,
210
+ output_hidden_states=False,
211
+ return_dict=True,
212
+ use_cache=use_cache,
213
+ )
214
+ .last_hidden_state
215
+ )
216
+
217
+ proj_dtype = self.embedding_proj_layer.weight.dtype
218
+ embeddings = self.embedding_proj_layer(last_hidden_state.to(proj_dtype))
219
+
220
+ embeddings = embeddings / embeddings.norm(dim=-1, keepdim=True).clamp(min=1e-6)
221
+ embeddings = embeddings * kwargs["attention_mask"].unsqueeze(-1)
222
+
223
+ return embeddings
224
+
225
+
226
+ __all__ = ["ColQwen35Bidirection"]
processing_colqwen35_bidirection.py ADDED
@@ -0,0 +1,426 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Processing utilities for ColQwen35Bidirection retrieval.
3
+
4
+ Wraps the Qwen 3.5 VL processor components (image_processor, tokenizer,
5
+ video_processor) with retrieval-specific helpers for prompt construction,
6
+ MaxSim scoring, and batch handling.
7
+
8
+ processor kwargs:
9
+ doc_prompt: Document prompt text appended after the image token.
10
+ max_num_visual_tokens: Cap on visual tokens per image, controls
11
+ resolution via max_pixels = max_num_visual_tokens × tile².
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import os
17
+ from typing import Any, List, Optional, Union
18
+
19
+ import numpy as np
20
+ from PIL import Image
21
+
22
+ from transformers import BatchFeature
23
+ from transformers.processing_utils import ProcessorMixin
24
+ from transformers.tokenization_utils_base import TextInput
25
+ from transformers.utils import logging
26
+
27
+ try:
28
+ import torch
29
+ except ImportError:
30
+ torch = None
31
+
32
+ logger = logging.get_logger(__name__)
33
+
34
+
35
+ def _size_value(size: Any, key: str) -> Any:
36
+ """Read size entries from dict-like or object-like containers."""
37
+ if size is None:
38
+ return None
39
+ if isinstance(size, dict):
40
+ return size.get(key)
41
+ return getattr(size, key, None)
42
+
43
+
44
+ class ColQwen35BidirectionProcessor(ProcessorMixin):
45
+ """
46
+ Processor for ColQwen35Bidirection retrieval model.
47
+
48
+ Wraps Qwen 3.5's image processor, tokenizer, and video processor
49
+ with retrieval-specific prompt construction, ``mm_token_type_ids``
50
+ generation (required by Qwen 3.5 for 3-D position computation),
51
+ and MaxSim scoring utilities.
52
+
53
+ Visual token budget (``max_num_visual_tokens``):
54
+ Qwen 3.5 determines visual token count from ``max_pixels`` on the
55
+ image processor. This class converts ``max_num_visual_tokens`` into
56
+ the equivalent ``max_pixels`` value using:
57
+
58
+ tile = patch_size × merge_size # 16 × 2 = 32
59
+ max_pixels = max_num_visual_tokens × tile² # e.g. 512 × 1024 = 524,288
60
+
61
+ Lower token budgets (e.g. 512) give memory-efficient training;
62
+ higher budgets (e.g. 2048) give finer visual granularity at inference.
63
+ """
64
+
65
+ attributes = ["image_processor", "tokenizer", "video_processor"]
66
+ image_processor_class = "AutoImageProcessor"
67
+ video_processor_class = "AutoVideoProcessor"
68
+ tokenizer_class = ("Qwen2Tokenizer", "Qwen2TokenizerFast")
69
+
70
+ def __init__(
71
+ self,
72
+ image_processor=None,
73
+ tokenizer=None,
74
+ video_processor=None,
75
+ chat_template=None,
76
+ doc_prompt: str = "Describe the image.",
77
+ max_num_visual_tokens: Optional[int] = None,
78
+ query_augmentation_tokens: int = 10,
79
+ **kwargs,
80
+ ):
81
+ super().__init__(
82
+ image_processor, tokenizer, video_processor,
83
+ chat_template=chat_template, **kwargs,
84
+ )
85
+
86
+ self.doc_prompt = doc_prompt
87
+ self.max_num_visual_tokens = max_num_visual_tokens
88
+ self.query_augmentation_tokens = query_augmentation_tokens
89
+
90
+ if max_num_visual_tokens is not None:
91
+ self._apply_max_pixels()
92
+
93
+ self.image_token = (
94
+ tokenizer.image_token
95
+ if getattr(tokenizer, "image_token", None)
96
+ else "<|image_pad|>"
97
+ )
98
+ self.image_token_id = (
99
+ tokenizer.image_token_id
100
+ if getattr(tokenizer, "image_token_id", None)
101
+ else tokenizer.convert_tokens_to_ids(self.image_token)
102
+ )
103
+ self.vision_start_token = (
104
+ tokenizer.vision_start_token
105
+ if getattr(tokenizer, "vision_start_token", None)
106
+ else "<|vision_start|>"
107
+ )
108
+ self.vision_end_token = (
109
+ tokenizer.vision_end_token
110
+ if getattr(tokenizer, "vision_end_token", None)
111
+ else "<|vision_end|>"
112
+ )
113
+
114
+ self.tokenizer.padding_side = "left"
115
+
116
+ self._doc_prompt_template = (
117
+ "<|im_start|>user\n"
118
+ f"{self.vision_start_token}{self.image_token}{self.vision_end_token}"
119
+ f"{self.doc_prompt}"
120
+ "<|im_end|><|endoftext|>"
121
+ )
122
+
123
+ # ------------------------------------------------------------------
124
+ # max_pixels / visual token budget
125
+ # ------------------------------------------------------------------
126
+
127
+ def _apply_max_pixels(self) -> None:
128
+ """Sync image_processor.max_pixels with max_num_visual_tokens.
129
+
130
+ Sets ``max_pixels`` on the image processor attribute AND in the
131
+ ``size`` dict (``longest_edge``), because different versions of
132
+ the Qwen2VLImageProcessor read from different locations. Also
133
+ ensures ``min_pixels`` (``shortest_edge``) does not exceed
134
+ ``max_pixels``, which would cause the resize to ignore the cap.
135
+ """
136
+ patch_size = getattr(self.image_processor, "patch_size", None)
137
+ merge_size = (
138
+ getattr(self.image_processor, "merge_size", None)
139
+ or getattr(self.image_processor, "spatial_merge_size", None)
140
+ )
141
+ if patch_size is None or merge_size is None:
142
+ logger.warning(
143
+ "Cannot derive max_pixels: image_processor missing "
144
+ "patch_size or merge_size/spatial_merge_size."
145
+ )
146
+ return
147
+ tile = patch_size * merge_size
148
+ max_pixels = self.max_num_visual_tokens * tile * tile
149
+
150
+ self.image_processor.max_pixels = max_pixels
151
+ size_obj = getattr(self.image_processor, "size", None)
152
+ if size_obj is not None:
153
+ if isinstance(size_obj, dict):
154
+ size_obj["longest_edge"] = max_pixels
155
+ cur_min = size_obj.get("shortest_edge")
156
+ if cur_min is not None and cur_min > max_pixels:
157
+ size_obj["shortest_edge"] = max_pixels
158
+ else:
159
+ if hasattr(size_obj, "longest_edge"):
160
+ size_obj.longest_edge = max_pixels
161
+ cur_min = getattr(size_obj, "shortest_edge", None)
162
+ if cur_min is not None and cur_min > max_pixels and hasattr(size_obj, "shortest_edge"):
163
+ size_obj.shortest_edge = max_pixels
164
+
165
+ cur_min_pixels = getattr(self.image_processor, "min_pixels", 0)
166
+ if cur_min_pixels > max_pixels:
167
+ self.image_processor.min_pixels = max_pixels
168
+
169
+ @classmethod
170
+ def from_pretrained(
171
+ cls,
172
+ pretrained_model_name_or_path: Union[str, os.PathLike],
173
+ *,
174
+ max_num_visual_tokens: Optional[int] = None,
175
+ doc_prompt: Optional[str] = None,
176
+ query_augmentation_tokens: Optional[int] = None,
177
+ **kwargs,
178
+ ) -> "ColQwen35BidirectionProcessor":
179
+ extra_kwargs: dict[str, Any] = {}
180
+ if doc_prompt is not None:
181
+ extra_kwargs["doc_prompt"] = doc_prompt
182
+ if max_num_visual_tokens is not None:
183
+ extra_kwargs["max_num_visual_tokens"] = max_num_visual_tokens
184
+ if query_augmentation_tokens is not None:
185
+ extra_kwargs["query_augmentation_tokens"] = query_augmentation_tokens
186
+
187
+ instance = super().from_pretrained(
188
+ pretrained_model_name_or_path, **extra_kwargs, **kwargs,
189
+ )
190
+
191
+ if max_num_visual_tokens is not None:
192
+ instance.max_num_visual_tokens = max_num_visual_tokens
193
+ instance._apply_max_pixels()
194
+
195
+ if query_augmentation_tokens is not None:
196
+ instance.query_augmentation_tokens = query_augmentation_tokens
197
+
198
+ return instance
199
+
200
+ # ------------------------------------------------------------------
201
+ # Retrieval protocol: process_images
202
+ # ------------------------------------------------------------------
203
+
204
+ @property
205
+ def query_augmentation_token(self) -> str:
206
+ return self.tokenizer.pad_token
207
+
208
+ def process_images(
209
+ self,
210
+ images: Union[Image.Image, List[Image.Image]],
211
+ ) -> BatchFeature:
212
+ """
213
+ Tokenize and encode document images for retrieval.
214
+
215
+ Each image is independently processed with the doc_prompt,
216
+ and ``mm_token_type_ids`` is computed for Qwen 3.5's 3-D
217
+ positional encoding. Multiple images are left-padded and
218
+ concatenated into a single batch.
219
+ """
220
+ if not isinstance(images, list):
221
+ images = [images]
222
+ if len(images) == 0:
223
+ raise ValueError("No images provided")
224
+
225
+ images = [img.convert("RGB") for img in images]
226
+
227
+ per_image_features: list[BatchFeature] = []
228
+ for image in images:
229
+ features = self._process_single_image(image)
230
+ per_image_features.append(features)
231
+
232
+ if len(per_image_features) == 1:
233
+ return per_image_features[0]
234
+
235
+ return self._left_pad_and_concat(per_image_features)
236
+
237
+ def _process_single_image(self, image: Image.Image) -> BatchFeature:
238
+ """Process one image through the full pipeline with mm_token_type_ids."""
239
+ size_obj = getattr(self.image_processor, "size", None)
240
+ min_pixels = _size_value(size_obj, "shortest_edge")
241
+ if min_pixels is None:
242
+ min_pixels = getattr(self.image_processor, "min_pixels", None)
243
+
244
+ max_pixels = _size_value(size_obj, "longest_edge")
245
+ if max_pixels is None:
246
+ max_pixels = getattr(self.image_processor, "max_pixels", None)
247
+ ip_kwargs: dict[str, Any] = {
248
+ "images": [[image]],
249
+ }
250
+ if min_pixels is not None:
251
+ ip_kwargs["min_pixels"] = int(min_pixels)
252
+ if max_pixels is not None:
253
+ ip_kwargs["max_pixels"] = int(max_pixels)
254
+ image_inputs = self.image_processor(**ip_kwargs)
255
+ image_grid_thw = image_inputs["image_grid_thw"]
256
+
257
+ merge_size = (
258
+ getattr(self.image_processor, "merge_size", None)
259
+ or getattr(self.image_processor, "spatial_merge_size", None)
260
+ )
261
+ if merge_size is None:
262
+ raise ValueError(
263
+ "Image processor missing merge_size/spatial_merge_size."
264
+ )
265
+ merge_length = merge_size ** 2
266
+
267
+ prompt = self._doc_prompt_template
268
+ for grid in image_grid_thw:
269
+ num_image_tokens = int(grid.prod() // merge_length) if hasattr(grid, 'prod') else int(np.prod(grid) // merge_length)
270
+ prompt = prompt.replace(
271
+ self.image_token,
272
+ "<|placeholder|>" * num_image_tokens,
273
+ 1,
274
+ )
275
+ prompt = prompt.replace("<|placeholder|>", self.image_token)
276
+
277
+ text_inputs = self.tokenizer(
278
+ [prompt], padding="longest", return_tensors="pt",
279
+ )
280
+
281
+ input_ids = text_inputs["input_ids"]
282
+ mm_token_type_ids = (input_ids == self.image_token_id).to(torch.int32)
283
+
284
+ data = {**text_inputs, **image_inputs}
285
+ data["mm_token_type_ids"] = mm_token_type_ids
286
+
287
+ for key in ("input_ids", "attention_mask"):
288
+ if key in data and not isinstance(data[key], torch.Tensor):
289
+ data[key] = torch.tensor(data[key])
290
+
291
+ return BatchFeature(data=data, tensor_type="pt")
292
+
293
+ # ------------------------------------------------------------------
294
+ # Retrieval protocol: process_queries
295
+ # ------------------------------------------------------------------
296
+
297
+ def process_queries(
298
+ self,
299
+ texts: Union[TextInput, List[TextInput]],
300
+ ) -> BatchFeature:
301
+ """
302
+ Process text queries for retrieval.
303
+
304
+ Each query is wrapped in a simple chat template and tokenized.
305
+ """
306
+ if not isinstance(texts, list):
307
+ texts = [texts]
308
+ if len(texts) == 0:
309
+ raise ValueError("No texts provided")
310
+
311
+ suffix = self.query_augmentation_token * self.query_augmentation_tokens
312
+ formatted: list[str] = []
313
+ for text in texts:
314
+ prompt = f"<|im_start|>user\nQuery: {text}{suffix}<|im_end|><|endoftext|>"
315
+ formatted.append(prompt)
316
+
317
+ return self.tokenizer(
318
+ formatted,
319
+ return_tensors="pt",
320
+ padding="longest",
321
+ )
322
+
323
+ # ------------------------------------------------------------------
324
+ # Scoring utilities
325
+ # ------------------------------------------------------------------
326
+
327
+ def score_retrieval(
328
+ self,
329
+ query_embeddings: Union[torch.Tensor, List[torch.Tensor]],
330
+ passage_embeddings: Union[torch.Tensor, List[torch.Tensor]],
331
+ batch_size: int = 128,
332
+ output_dtype: Optional[torch.dtype] = None,
333
+ output_device: Union[torch.device, str] = "cpu",
334
+ ) -> torch.Tensor:
335
+ """
336
+ Compute late-interaction / MaxSim retrieval scores (ColBERT-like).
337
+
338
+ Args:
339
+ query_embeddings: Per-query multi-vector embeddings.
340
+ passage_embeddings: Per-passage multi-vector embeddings.
341
+ batch_size: Scoring batch size.
342
+ output_dtype: Output tensor dtype.
343
+ output_device: Output device.
344
+
345
+ Returns:
346
+ Tensor of shape ``(n_queries, n_passages)`` with scores.
347
+ """
348
+ if len(query_embeddings) == 0:
349
+ raise ValueError("No queries provided")
350
+ if len(passage_embeddings) == 0:
351
+ raise ValueError("No passages provided")
352
+
353
+ if output_dtype is None:
354
+ output_dtype = query_embeddings[0].dtype
355
+
356
+ scores: list[torch.Tensor] = []
357
+ for i in range(0, len(query_embeddings), batch_size):
358
+ batch_queries = torch.nn.utils.rnn.pad_sequence(
359
+ query_embeddings[i : i + batch_size],
360
+ batch_first=True, padding_value=0,
361
+ )
362
+ batch_scores: list[torch.Tensor] = []
363
+ for j in range(0, len(passage_embeddings), batch_size):
364
+ batch_passages = torch.nn.utils.rnn.pad_sequence(
365
+ passage_embeddings[j : j + batch_size],
366
+ batch_first=True, padding_value=0,
367
+ )
368
+ batch_scores.append(
369
+ torch.einsum("bnd,csd->bcns", batch_queries, batch_passages)
370
+ .max(dim=3)[0]
371
+ .sum(dim=2)
372
+ )
373
+ scores.append(
374
+ torch.cat(batch_scores, dim=1)
375
+ .to(output_dtype)
376
+ .to(output_device)
377
+ )
378
+ return torch.cat(scores, dim=0)
379
+
380
+ # ------------------------------------------------------------------
381
+ # Internal helpers
382
+ # ------------------------------------------------------------------
383
+
384
+ @staticmethod
385
+ def _left_pad_and_concat(
386
+ batch_features: list[BatchFeature],
387
+ ) -> BatchFeature:
388
+ """
389
+ Left-pad variable-length BatchFeature dicts and stack them.
390
+
391
+ Qwen 3.5 yields a variable number of visual tokens per image
392
+ (resolution dependent), so we align them before concatenation.
393
+ Padding is on the left (decoder convention).
394
+ """
395
+ all_keys = batch_features[0].keys()
396
+ concatenated: dict[str, Any] = {}
397
+
398
+ for key in all_keys:
399
+ tensors = [bf[key] for bf in batch_features]
400
+
401
+ if not isinstance(tensors[0], torch.Tensor):
402
+ concatenated[key] = tensors[0]
403
+ continue
404
+
405
+ if tensors[0].ndim < 2:
406
+ concatenated[key] = torch.cat(tensors, dim=0)
407
+ continue
408
+
409
+ max_seq_len = max(t.shape[1] for t in tensors)
410
+ padded: list[torch.Tensor] = []
411
+ for t in tensors:
412
+ pad_len = max_seq_len - t.shape[1]
413
+ if pad_len > 0:
414
+ zeros = torch.zeros(
415
+ *t.shape[:1], pad_len, *t.shape[2:],
416
+ dtype=t.dtype, device=t.device,
417
+ )
418
+ t = torch.cat([zeros, t], dim=1)
419
+ padded.append(t)
420
+
421
+ concatenated[key] = torch.cat(padded, dim=0)
422
+
423
+ return BatchFeature(concatenated)
424
+
425
+
426
+ __all__ = ["ColQwen35BidirectionProcessor"]
processor_config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "doc_prompt": "Describe the image.",
3
+ "image_processor": {
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "Qwen2VLImageProcessor",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "max_pixels": 1310720,
20
+ "merge_size": 2,
21
+ "patch_size": 16,
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "longest_edge": 1310720,
26
+ "shortest_edge": 65536
27
+ },
28
+ "temporal_patch_size": 2
29
+ },
30
+ "max_num_visual_tokens": 1280,
31
+ "processor_class": "ColQwen35BidirectionProcessor",
32
+ "query_augmentation_tokens": 10,
33
+ "video_processor": {
34
+ "do_convert_rgb": true,
35
+ "do_normalize": true,
36
+ "do_rescale": true,
37
+ "do_resize": true,
38
+ "do_sample_frames": true,
39
+ "fps": 2,
40
+ "image_mean": [
41
+ 0.5,
42
+ 0.5,
43
+ 0.5
44
+ ],
45
+ "image_std": [
46
+ 0.5,
47
+ 0.5,
48
+ 0.5
49
+ ],
50
+ "max_frames": 768,
51
+ "merge_size": 2,
52
+ "min_frames": 4,
53
+ "patch_size": 16,
54
+ "resample": 3,
55
+ "rescale_factor": 0.00392156862745098,
56
+ "return_metadata": false,
57
+ "size": {
58
+ "longest_edge": 25165824,
59
+ "shortest_edge": 4096
60
+ },
61
+ "temporal_patch_size": 2,
62
+ "video_processor_type": "Qwen3VLVideoProcessor"
63
+ },
64
+ "auto_map": {
65
+ "AutoProcessor": "processing_colqwen35_bidirection.ColQwen35BidirectionProcessor"
66
+ }
67
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
tokenizer_config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "doc_prompt": "Describe the image.",
10
+ "eos_token": "<|im_end|>",
11
+ "errors": "replace",
12
+ "image_token": "<|image_pad|>",
13
+ "is_local": false,
14
+ "local_files_only": false,
15
+ "max_num_visual_tokens": 1280,
16
+ "model_max_length": 262144,
17
+ "model_specific_special_tokens": {
18
+ "audio_bos_token": "<|audio_start|>",
19
+ "audio_eos_token": "<|audio_end|>",
20
+ "audio_token": "<|audio_pad|>",
21
+ "image_token": "<|image_pad|>",
22
+ "video_token": "<|video_pad|>",
23
+ "vision_bos_token": "<|vision_start|>",
24
+ "vision_eos_token": "<|vision_end|>"
25
+ },
26
+ "pad_token": "<|endoftext|>",
27
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
28
+ "processor_class": "ColQwen35BidirectionProcessor",
29
+ "query_augmentation_tokens": 10,
30
+ "split_special_tokens": false,
31
+ "tokenizer_class": "Qwen2Tokenizer",
32
+ "unk_token": null,
33
+ "video_token": "<|video_pad|>",
34
+ "vision_bos_token": "<|vision_start|>",
35
+ "vision_eos_token": "<|vision_end|>"
36
+ }