immanuelpeter commited on
Commit
bdfd5fd
·
verified ·
1 Parent(s): 2cec12a

Upload vision tower bundle

Browse files
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Xiaomi Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
LICENSE-CODE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
NOTICE ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ Weights: XiaomiMiMo/MiMo-V2.6-Pro-RL at b61f21852680ee02a29e946e18cf8697f4844061.
2
+ The pinned model card declares MIT; the upstream repository supplies no separate LICENSE file.
3
+ LICENSE reproduces the standard MIT terms, with the Xiaomi copyright attribution.
4
+ The extracted vision implementation retains its upstream Apache-2.0 header.
5
+ See LICENSE-CODE for the Apache-2.0 terms.
6
+ Only visual tensors are included. No language/audio weights.
7
+ Standalone modification: omitted the three checkpoint-absent merger biases. All other vision arithmetic is preserved.
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: image-feature-extraction
4
+ library_name: transformers
5
+ tags:
6
+ - vision
7
+ - feature-extraction
8
+ - mimo
9
+ base_model:
10
+ - XiaomiMiMo/MiMo-V2.6-Pro-RL
11
+ ---
12
+
13
+ # MiMoViT-2.6-Pro
14
+
15
+ This repository packages the vision Tower and merger from [MiMo V2.6 Pro](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Pro-RL).
16
+
17
+ ## Contents
18
+
19
+ | File | Tensors | What it holds |
20
+ |---|---|---|
21
+ | `model.safetensors` | 364 | Tower blocks, patch embedding and merger, from the parent's `visual.*` |
22
+ | `modeling_mimo_vision.py` | | Vision classes extracted from the parent, loaded with `trust_remote_code` |
23
+ | `config.json`, `preprocessor_config.json` | | Vision configuration and the parent's `Qwen2VLImageProcessor` settings |
24
+ | `export_manifest.json` | | Source pin and the SHA256 of every tensor |
25
+ | `LICENSE`, `LICENSE-CODE`, `NOTICE` | | Weight and code licenses |
26
+
27
+ ## Architecture
28
+
29
+ | Component | Details |
30
+ |---|---|
31
+ | Tower | 28 blocks, 1280 hidden, SwiGLU 4608, 32 query heads, 8 KV heads, head dimension 64, RMSNorm, 2D RoPE |
32
+ | Patches | 2 frames x 16 x 16 pixels; a still image is repeated as two frames |
33
+ | Attention | Full attention at blocks 0, 9, 18 and 27; the other blocks use a ±64-token window and a per-head sink bias on key column 0 |
34
+ | Merger | `LayerNorm(1280)`, 2x2 concatenation to 5120, `Linear(5120, 5120)`, GELU, `Linear(5120, 6144)`, no biases |
35
+
36
+ At 448 the bench reports 784 Tower tokens of width 1280 (restored to raster
37
+ order), 196 `merged` tokens of width 5120, and 196 `projected` tokens of width 6144.
38
+
39
+ ## Usage
40
+
41
+ See [`examples/inference.py`](examples/inference.py) for image feature extraction.
42
+ `AutoModel.from_pretrained(..., trust_remote_code=True)` loads `modeling_mimo_vision.py`.
43
+
44
+ ## Validation
45
+
46
+ The [release parity test](https://github.com/immanuel-peter/vision-tower-bench/blob/main/tests/test_release_parity.py) compares every exported tensor with the pinned parent using `torch.equal`, then checks all stages against the parent's own `MiMoVisionTransformer`.
47
+
48
+ ## Reproduction
49
+
50
+ The [export script](https://github.com/immanuel-peter/vision-tower-bench/blob/main/scripts/export_mimo26_vision.py) reads the `visual.*` tensors from the pinned parent and writes the original BF16 tensors.
51
+
52
+ ## Credits
53
+
54
+ Xiaomi released the MiMo V2.6 Pro weights and the vision implementation.
55
+
56
+ ## License
57
+
58
+ Weights are MIT, as declared on the source model card. `modeling_mimo_vision.py` keeps its Apache-2.0 header; see [`LICENSE-CODE`](LICENSE-CODE) and [`NOTICE`](NOTICE).
config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MiMoVisionModel"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "modeling_mimo_vision.MiMoVisionConfig",
7
+ "AutoModel": "modeling_mimo_vision.MiMoVisionModel"
8
+ },
9
+ "depth": 28,
10
+ "dtype": "bfloat16",
11
+ "fullatt_block_indexes": [
12
+ 0,
13
+ 9,
14
+ 18,
15
+ 27
16
+ ],
17
+ "hidden_act": "silu",
18
+ "hidden_size": 1280,
19
+ "in_chans": 3,
20
+ "intermediate_size": 4608,
21
+ "model_type": "mimo26_vision",
22
+ "num_heads": 32,
23
+ "num_key_value_heads": 8,
24
+ "num_query_groups": 4,
25
+ "out_hidden_size": 6144,
26
+ "patch_size": 16,
27
+ "qk_channels": 64,
28
+ "rms_norm_eps": 1e-06,
29
+ "spatial_merge_size": 2,
30
+ "spatial_patch_size": 16,
31
+ "temporal_patch_size": 2,
32
+ "tokens_per_second": 2,
33
+ "transformers_version": "5.17.0",
34
+ "use_sink": true,
35
+ "visual_token_window_size": 64,
36
+ "vit_window_attn_types": [
37
+ -1,
38
+ 0,
39
+ 0,
40
+ 0,
41
+ 0,
42
+ 1,
43
+ 1,
44
+ 1,
45
+ 1,
46
+ -1,
47
+ 0,
48
+ 0,
49
+ 0,
50
+ 0,
51
+ 1,
52
+ 1,
53
+ 1,
54
+ 1,
55
+ -1,
56
+ 0,
57
+ 0,
58
+ 0,
59
+ 0,
60
+ 1,
61
+ 1,
62
+ 1,
63
+ 1,
64
+ -1
65
+ ],
66
+ "window_size": 128
67
+ }
examples/inference.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ from pathlib import Path
3
+
4
+ from PIL import Image
5
+ import torch
6
+ from transformers import AutoImageProcessor, AutoModel
7
+
8
+
9
+ MODEL_ID = "immanuelpeter/MiMoViT-2.6-Pro"
10
+
11
+
12
+ def main() -> None:
13
+ parser = argparse.ArgumentParser(description="Extract MiMo 2.6 Pro visual features.")
14
+ parser.add_argument("image", type=Path)
15
+ parser.add_argument("--model", default=MODEL_ID)
16
+ args = parser.parse_args()
17
+
18
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
19
+ dtype = torch.bfloat16 if device.type == "cuda" else torch.float32
20
+ processor = AutoImageProcessor.from_pretrained(args.model)
21
+ model = AutoModel.from_pretrained(args.model, trust_remote_code=True, dtype=dtype).to(device).eval()
22
+ inputs = processor(images=Image.open(args.image).convert("RGB"), return_tensors="pt")
23
+
24
+ with torch.inference_mode():
25
+ projected = model(inputs["pixel_values"].to(device, dtype), inputs["image_grid_thw"])
26
+
27
+ print("grid_thw", inputs["image_grid_thw"].tolist())
28
+ print("projected", tuple(projected.shape))
29
+
30
+
31
+ if __name__ == "__main__":
32
+ main()
export_manifest.json ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source_repo": "XiaomiMiMo/MiMo-V2.6-Pro-RL",
3
+ "source_revision": "b61f21852680ee02a29e946e18cf8697f4844061",
4
+ "tensors": 364,
5
+ "bytes": 1478160384,
6
+ "tensor_sha256": {
7
+ "blocks.0.attn.proj.bias": "7b2480ae31c491bc2879116b8b038643dfa6f8904250078f7a5e6b16f6df1e02",
8
+ "blocks.0.attn.proj.weight": "6c1002201b46c8039ad69ee9df992dccf44264959b1f3f114c5cf26a975e2265",
9
+ "blocks.0.attn.qkv.bias": "f0f47b8a9d8e3bf6266b787695a6890475ad9ff29f5ed90d8ab06165c2660f38",
10
+ "blocks.0.attn.qkv.weight": "0c8ab40506332d0e11dbbbac9a704f79f138e6bd858c2968a93739f8ecf4f54a",
11
+ "blocks.0.mlp.down_proj.bias": "44886f29d4c8a430e71067e2bea930de266459fd18c369af7fa2d4fe67c6c57c",
12
+ "blocks.0.mlp.down_proj.weight": "aa7817e0627149e616ab84e8eb16a03676193d46bf023644d122ddd6f79249d1",
13
+ "blocks.0.mlp.gate_proj.bias": "9813af711c803a7ec8dcc43909ca4a185ffafc87d1adf76d5752a8195c7bc717",
14
+ "blocks.0.mlp.gate_proj.weight": "4dff217d7aae9b1cf84e0aca0764c3b50cd8a45457083727e1457412c7c6e8a7",
15
+ "blocks.0.mlp.up_proj.bias": "fdcc7a015845f416d2f2a7b9e2706a6c0147b2f61f92108eb98b4c897176955c",
16
+ "blocks.0.mlp.up_proj.weight": "09b94535e41fb79727c84b46290118fdd1fa449fe387a1abf2d1d882497e802f",
17
+ "blocks.0.norm1.weight": "98f618750d5b6e963ecbe0856e1060a5cd25a20a923041261763800ce9691e2c",
18
+ "blocks.0.norm2.weight": "4539f91f9263f0efd97708b7e7b389aa375346524edafa829d39cbed43e5e040",
19
+ "blocks.1.attn.proj.bias": "7668871008c656851fd7a5736e542f84c57b3a5d4f2804de304b7a9f1e712d86",
20
+ "blocks.1.attn.proj.weight": "cba664e66bde9c6118be615f72b7c1277ec1f843a429b253a8d49705905d36ca",
21
+ "blocks.1.attn.qkv.bias": "f8f655a5876e8090584e36fbf7da0544f195df143b66fa5478ee5549495c2e19",
22
+ "blocks.1.attn.qkv.weight": "8c02e8dac3ee0f723fc55caa163a23e4e50e4dd79bbf32b7e4416ffcb5dff6d7",
23
+ "blocks.1.attn.sinks": "d9e7ce692a94dc9be0ae1e51deb1d913586285115a4545ddc74b412056ec06ff",
24
+ "blocks.1.mlp.down_proj.bias": "a3248be58f62f0791a1d6a16a8abb73693a038edfc1c8e372995ce69c9d301bc",
25
+ "blocks.1.mlp.down_proj.weight": "8d71976c1d466c02b94fd7c2d03f0beb589261076c7720a7a7b0edf22a35da78",
26
+ "blocks.1.mlp.gate_proj.bias": "626274632ffecd43f77feae1a6ea206d8e7d8fa39d0c8bbeb230887a89888ad0",
27
+ "blocks.1.mlp.gate_proj.weight": "ba91b2569ed7df0cc0438fd789b967c9cd940fd8a5ff81375ec582b1e19bd8e1",
28
+ "blocks.1.mlp.up_proj.bias": "fb21e96386d8612fd8991c10ea7caa960a9156240c7d3a5b13d8e4c06a099d0d",
29
+ "blocks.1.mlp.up_proj.weight": "d9303feddbed729bb53b37191642fc40f69c405bcde8991e9ed9da91022ac180",
30
+ "blocks.1.norm1.weight": "70296b2714a36edb7e8974520b196dbe574eb3c1d5295b5edb52c187ce2b8824",
31
+ "blocks.1.norm2.weight": "293ee17e4e9dbf733660518a8dc3147e6554fe41dc0def64e1740cb42f012b1f",
32
+ "blocks.10.attn.proj.bias": "baeb4db9779dce0e0456f2a4786b05972e1d8ce6476e2d1b410e761adf12352d",
33
+ "blocks.10.attn.proj.weight": "d56565a3fb6538d341f28de1f7c321c1e59d75388386696643de2312b28aaa2c",
34
+ "blocks.10.attn.qkv.bias": "c2ee4cf386b52268b451ea62609423b3af6ae4f2d83b7624377dc29f51511d0a",
35
+ "blocks.10.attn.qkv.weight": "6807e3b124a54bf1ec9036a9a6c5eb6065c8b654997e637b68f9845b758d79fa",
36
+ "blocks.10.attn.sinks": "3226e66c9cf208239eba5b8a8b3202f5ff7b52badefd891141b58688b3360097",
37
+ "blocks.10.mlp.down_proj.bias": "62ce0b4be0aaa093418697c5a6ecf97a62ebfc1297ab7ef156236d66502c02e6",
38
+ "blocks.10.mlp.down_proj.weight": "4d73367d9e0d8eda53ae36184084809edd9a7e0b7188ecf42de3970e058b20f3",
39
+ "blocks.10.mlp.gate_proj.bias": "b45ad12e198559ed513935d5a4a373995a6a912ef551fd463c0d1a8954d82191",
40
+ "blocks.10.mlp.gate_proj.weight": "ab16d5f29afc58091223412988fd1f8d9c9ffbd30c4a35ce53ba2046f5b44af7",
41
+ "blocks.10.mlp.up_proj.bias": "bc4414cdf8cd7cf80426010d66e67247577baf4feff3c349122d8f2e1fe2190c",
42
+ "blocks.10.mlp.up_proj.weight": "76e3d2b6b81ba0a83e94801bf3f7668074edfa73bee948c86f253e755d315560",
43
+ "blocks.10.norm1.weight": "fbe63bbb8cf075dfc2491c685b1efc6137dbddcddeec3b746c47ef9ad0bcde90",
44
+ "blocks.10.norm2.weight": "9e1efd65403c22798e1912e5ab8545ab84c43f1e7e854b9d4233d425dc89b74b",
45
+ "blocks.11.attn.proj.bias": "9423dbddca63f855f271461f02567973fed998f05ce63671d1fb6d088d8a7734",
46
+ "blocks.11.attn.proj.weight": "add72696982a8232781d8fe791595f3dec8ca171c14371f57e30d619a5d90f88",
47
+ "blocks.11.attn.qkv.bias": "90edaca044ea3acc9dfe61edc205abbe4b7fa52e80774326952b9872e940ffd9",
48
+ "blocks.11.attn.qkv.weight": "ff0858dbc2f9f04300170949cf530474210d9b6b1c203830d6daa3cd4a6b4bd0",
49
+ "blocks.11.attn.sinks": "15dc67c1ebc68bd6304bbe3e611ff1e865c82204872827fc264364ee0f24706c",
50
+ "blocks.11.mlp.down_proj.bias": "b736864e430a5d2db1b14f6d646b1b24f07ab10b286ac6bfb5c6f0d2525e73d4",
51
+ "blocks.11.mlp.down_proj.weight": "885e80f861cd6cb60b193447d54ff1767d99b968546996511bf297e078b04112",
52
+ "blocks.11.mlp.gate_proj.bias": "81522491edc4eb6a6d4c293dba064b4280a410e3a93e2c0ca9d6e59a64819848",
53
+ "blocks.11.mlp.gate_proj.weight": "aef2076a21671a492f8bdc388b46ec2433e5dc5c53dde3827f4ca1db44902adc",
54
+ "blocks.11.mlp.up_proj.bias": "d4765d80020188bdad51defccc052873699339ea73608a1086a082dd2f6c545f",
55
+ "blocks.11.mlp.up_proj.weight": "f74ff8f620b8733e2a9042d4b29b596d6258c8aa41325063e2463e3c459e9474",
56
+ "blocks.11.norm1.weight": "134a940eb0e208b5d2ac7be9c5106d45cecf0338717eea377b79d6ce2244934b",
57
+ "blocks.11.norm2.weight": "558cad958c58945a05aa84cfe62a6627c84a4657bfc0d341626d1f7e08429147",
58
+ "blocks.12.attn.proj.bias": "ff24d5a6e16289cc25cc20b23794ba3b077cde3a9595e13452a5c6f99b304f1c",
59
+ "blocks.12.attn.proj.weight": "8d5e907e9ee3871a15421ad3b75e523af4281a5f3ee7e76e4536092aa670d287",
60
+ "blocks.12.attn.qkv.bias": "c3197962d9e46f482b04c11f06d3c8c476c5b32b6fecf0dd09ddadae559e366c",
61
+ "blocks.12.attn.qkv.weight": "50eb15e818cda5f49eacfa043a3059f6f53d50bd15fcdd80e288852b0cf99890",
62
+ "blocks.12.attn.sinks": "df98820557845146b7db331a91213f178d0458c756d0d24212e7e3ec909f0a7f",
63
+ "blocks.12.mlp.down_proj.bias": "73592e7ecbdd61af180dfe0fea4bf89e3d0e1264fb1446e6f9434ed8a433065b",
64
+ "blocks.12.mlp.down_proj.weight": "9fcfbf1998fe15713284ff6fd0c8dab47fbe7bad8bce2866b10ae1c3ce39cc28",
65
+ "blocks.12.mlp.gate_proj.bias": "6d8380fa4035992aa307d1f533096475fb36fe924e6b7863ff6b08bf529e64a6",
66
+ "blocks.12.mlp.gate_proj.weight": "fe966723e06cea6648b84aa4ccda7aa29ec039fd457977e24458f15bc468c6a1",
67
+ "blocks.12.mlp.up_proj.bias": "205f32a1226e5dac5174ca79083ecb87956243a48565ec0d0b19d6304004c8d3",
68
+ "blocks.12.mlp.up_proj.weight": "79fc74849e573285b121d8646828dc263889d7982198c905bd784fad93432b07",
69
+ "blocks.12.norm1.weight": "ce9899a2f34b64e9c61b3630084b0f92d69e9cf40b3db7602b5d54e515e6f6da",
70
+ "blocks.12.norm2.weight": "eefee2cfd4a1dad4fe9957952e09ad29e7d6cf302129c38c16fca069e816448b",
71
+ "blocks.13.attn.proj.bias": "c9188404a9d6b1b79ec457464b8865b8776572bb7ba23f8dc41fb2f8a8382c47",
72
+ "blocks.13.attn.proj.weight": "9ace9ffaa0acc231dedab23729b4b23a9fa0eb18e7dbd0aba484ef0611577b6a",
73
+ "blocks.13.attn.qkv.bias": "a52e1b485b8785be6ad5f0767193e7de0a14ad9f0bbc1022a590ee5837f25334",
74
+ "blocks.13.attn.qkv.weight": "db02e70c7fc25d4159179bf956f3566f5070e1317d69e897eebeca91bc355306",
75
+ "blocks.13.attn.sinks": "aeadad988a14d6a38c65e471a5843d63a9b36f07895675aa44114192fa6ca6ad",
76
+ "blocks.13.mlp.down_proj.bias": "93612536ece4816ad8e91b5c8307e1427f215ca79abdefdde24e7be2aff64ad7",
77
+ "blocks.13.mlp.down_proj.weight": "8668b963c6c3eabee50e2a42d28e6b8e760d0b48fc8786df9345898295842461",
78
+ "blocks.13.mlp.gate_proj.bias": "e5de614244900b36e3b1bb2c525a137cb5ffb1bfcc844972709981057bafc0d1",
79
+ "blocks.13.mlp.gate_proj.weight": "e8ecbcd0939a97e6c467a68c3cad9f9cbacbdf4270203b034816d6de1e37e130",
80
+ "blocks.13.mlp.up_proj.bias": "be8efccd8d2dd8695abd7ee09aa710bfd59013950617f55b0e83a350112ec2b7",
81
+ "blocks.13.mlp.up_proj.weight": "f46ccf4914b3f8c47897781ed4962caca5131cceab45c6d05b5a6b4413cfcc11",
82
+ "blocks.13.norm1.weight": "24ea951d16ee359c409152301a0f1d02fc2ccab589da4d9b5339bc630b74382f",
83
+ "blocks.13.norm2.weight": "51eaa47b70902091964b257e52ff3edf89531c23425ea720ec42b0a191797e74",
84
+ "blocks.14.attn.proj.bias": "5b5e53f0c1374caf41b58ebaf4039f849c9fe04a45f8799e4729ca303a13c420",
85
+ "blocks.14.attn.proj.weight": "35b6104b90fcac75da23ce1edb56ba9e447500c7fcd916722bc1382e5d5043e5",
86
+ "blocks.14.attn.qkv.bias": "9921c6699f90faf6c000cca2248fe34d93293a666a8610a1a5df369ab8ab735a",
87
+ "blocks.14.attn.qkv.weight": "73ad4875dc06017f5d0a66bfdfd038ee06ec13bb881bf94c3e637ba07b877884",
88
+ "blocks.14.attn.sinks": "23aa9893def16c4695a03397ae3ab9f3be4356f71c24a1939ce5520e70618169",
89
+ "blocks.14.mlp.down_proj.bias": "4ed7b22848c99c32af2677c0824dd6604cc211c41045c6840ba700183134be71",
90
+ "blocks.14.mlp.down_proj.weight": "8b96c08be3800d4cce43afdadfbdc641543cf75b19eb1fe170938e4391d949c1",
91
+ "blocks.14.mlp.gate_proj.bias": "809d3a2ea1463e7939ce8405f7fbd97e953eda22fc55f52c17e178727f724fa8",
92
+ "blocks.14.mlp.gate_proj.weight": "2f3873f8727e8b7b2818ef82040a4fdb214350eb0a046435c8b6f19c113ddebf",
93
+ "blocks.14.mlp.up_proj.bias": "e1c658690ddcfc3ddee9d456b412a0126a0161b660aabd62260557cf0441ed3a",
94
+ "blocks.14.mlp.up_proj.weight": "483ebd343e718f2821620c6064c115534b924696dc79c248af30abfb13dcea2a",
95
+ "blocks.14.norm1.weight": "b58674bafd4044d7120e77063fff4b91670de5842b4e814825266f52b45b57d7",
96
+ "blocks.14.norm2.weight": "00acc864c482d9774d84ad7ef2d2b9c7052e0924c0862e86c6ee9fa9ada3c328",
97
+ "blocks.15.attn.proj.bias": "3ae017853cb8acc1caddede70e599d28874ea1633ced11d6ba1900ab37dcc20d",
98
+ "blocks.15.attn.proj.weight": "2380b3ca401274e9146375f36c03219ba64aa0624463239f1185464d26487e87",
99
+ "blocks.15.attn.qkv.bias": "fa2a9e8f5da383805bc1ec5412679a838b4b018c4a15152c0f88c4600ab704e2",
100
+ "blocks.15.attn.qkv.weight": "3219aa4170a2af10019ada841563cabc637a74257a166c58d925179c3addac74",
101
+ "blocks.15.attn.sinks": "5ee220386279a106e0168532ce388eb502eb0a3d48750064ba7c9f3936c4d5b0",
102
+ "blocks.15.mlp.down_proj.bias": "9fac85bdf72c4a0b5f06755bf6305d4002e594e6a347849564885cdcb8c3a761",
103
+ "blocks.15.mlp.down_proj.weight": "95f4dbff7d00fc52469f4e9c9fdcfd26e5d7498be023a171d52591cdb4db9913",
104
+ "blocks.15.mlp.gate_proj.bias": "ca0b172c8853f5014eaf73ed0373c559a7db902293d9559c93b2d926a1b906d2",
105
+ "blocks.15.mlp.gate_proj.weight": "13303067e8b97a5772af64e2677be554c01fa86eaf13fb17c4c7ad05e5b100a1",
106
+ "blocks.15.mlp.up_proj.bias": "1d00ac6b3409f48b339a13d2d082419a356d5f14492d8831eb04f59aba39e599",
107
+ "blocks.15.mlp.up_proj.weight": "12e852ee88cbe69c267dfeed94e3885cc22869574b3e445cbc4a85bd554c5a0a",
108
+ "blocks.15.norm1.weight": "72c4e7c6ecd2d80c1f5134ffcbe738e2907b5705b0518592bbae5a0bbc84bad4",
109
+ "blocks.15.norm2.weight": "248c2c2cf326021ea4d03e0e1d8bb8577c5902b92ce30448d4710f6b17cf8942",
110
+ "blocks.16.attn.proj.bias": "6672e11bcde20f808b016e3de947a04f1b8a1582880a3976d38323a7810ae85a",
111
+ "blocks.16.attn.proj.weight": "95b30581f0c7996ab384b62aa1a5dca213aad292f14c8df55e71f94b7f7ccbfa",
112
+ "blocks.16.attn.qkv.bias": "09aa10ba9ed00af93ade65dbef91ff07ad329c0eaeaec04eb21697f8101d71cd",
113
+ "blocks.16.attn.qkv.weight": "dc4e051941fd69c6bed503323af408b8ddd8067bb260b9d54f4d19a4506af36e",
114
+ "blocks.16.attn.sinks": "98e189a6fc1e7d2e9ad777f44dda4638f46525182368b1e5ceb909da26b96016",
115
+ "blocks.16.mlp.down_proj.bias": "517185e00ee30c19eb4a019b0d32652693c39755de84f4c787774e09f5960323",
116
+ "blocks.16.mlp.down_proj.weight": "20dbe9b824ecd2842d61bcdbfed71d91b0e6a534c5741a7a6700961765100369",
117
+ "blocks.16.mlp.gate_proj.bias": "540f1427f1e73911814c18f182f3306b9ccbddd386dcde513a0b862bb379b4fb",
118
+ "blocks.16.mlp.gate_proj.weight": "7023222b4862669a10deaa88898258c59f3952a04d3af0dbdc07314599473718",
119
+ "blocks.16.mlp.up_proj.bias": "ea8b373a13622334249ec6865ba5abbce0f52fc9123073acc99fdb6a65b6999a",
120
+ "blocks.16.mlp.up_proj.weight": "2a2190a3d2c78e7b19c92f25c58a24c599304e91d43989bb4e669b19f16b0547",
121
+ "blocks.16.norm1.weight": "14204a4245f1773416158b30b5f30687bd80d69fd82d59d75926536f7d561a1f",
122
+ "blocks.16.norm2.weight": "aa7a3c280d1f9a50f21177d4802b04baf177e16e1e99615ad263ec1e1b2add00",
123
+ "blocks.17.attn.proj.bias": "e8201cfc7fb6aed84909f0a034193e76def80797288de9dcf3ce943f0ca3c5ee",
124
+ "blocks.17.attn.proj.weight": "4090de5f82ea13d2a641a9bf3b8d633a3680d1bd19dab4493fba703e431138e5",
125
+ "blocks.17.attn.qkv.bias": "2beed333d202ad889c796f14cd3db0ceeb0f85955505f9189ea5c9e05044a30c",
126
+ "blocks.17.attn.qkv.weight": "9eb46fe4161580c0e21963d4e9a4b1710838d16bf8850b2dc95b78b64f8ff9fa",
127
+ "blocks.17.attn.sinks": "cc2795b0293e201634958442d48a3ae4c48a3f6c61c3dad973d4e6c23e3f54c3",
128
+ "blocks.17.mlp.down_proj.bias": "83947676e654a795c2a398ad2bf38e8ce910a3b91e6693e18c4e008fa71a2a44",
129
+ "blocks.17.mlp.down_proj.weight": "203f33c1f730e4a1cad7264ec44b332a286545fbd66121281e3ffdf3a13fce0f",
130
+ "blocks.17.mlp.gate_proj.bias": "4793105dc83a603c0854bb587b04c6656689076593e7fa14c8e23f55d1d6f967",
131
+ "blocks.17.mlp.gate_proj.weight": "9a6cf5adf28d54790069fa715a5a6d5de16a4b3ad124543667e8b61a9e0039d8",
132
+ "blocks.17.mlp.up_proj.bias": "25d68b9d2fd213122cbdf7351d6066a5e1ebaa8d496b1130ea1ebcd7e50757d2",
133
+ "blocks.17.mlp.up_proj.weight": "00920d0818b52109baf1a627be11311cb8e91e8286af0d4190c48cf0effb05aa",
134
+ "blocks.17.norm1.weight": "948918d73e1885358aef9905c18aeebb2adb90d3055bc2e196a462031093c087",
135
+ "blocks.17.norm2.weight": "bb55714d187ddbc17cb97ec3474a66ba536826073df98bbfee0e092228de43fc",
136
+ "blocks.18.attn.proj.bias": "f9aa7eaa9d3fca6eae000fb6a02a6e4c1c063dd02a0079745a5f19c703f48006",
137
+ "blocks.18.attn.proj.weight": "4cb54689107dfa290f21eaa56265fa79422dac5eb83bb60239ff82c3c538ce06",
138
+ "blocks.18.attn.qkv.bias": "8641813e7ef9e3f4903e1912ee115b9ce533d289df8c6317b7e6783e10e152e8",
139
+ "blocks.18.attn.qkv.weight": "fff85d12f9a28f299d91825fb827672ca9289652a0fdcabba0925cc23d65a1c5",
140
+ "blocks.18.mlp.down_proj.bias": "bc178581ece1957719c01749044b31874397d6ba04acd9adb5d084eb80c062f0",
141
+ "blocks.18.mlp.down_proj.weight": "5a082a0d2256321caa1977c6580a73cca9f12a99ab04dc08e1049579e42efedd",
142
+ "blocks.18.mlp.gate_proj.bias": "5eabd9483265960fa66757346c2e141488eef8b3793abda0f10194253f99647a",
143
+ "blocks.18.mlp.gate_proj.weight": "f76e9d1ebd0c64aa5d2bdb36ae9789f5e5fcb8a3bdb681f74659ee83c7e93c9b",
144
+ "blocks.18.mlp.up_proj.bias": "7ee4067121aba3d8a8d54f5ee8f6fc896f97b87a6e98a4d56a35b333e63dc233",
145
+ "blocks.18.mlp.up_proj.weight": "828b8b8a89909c38f349d90cadeba3cf013567eb52adf788d9775ab73930c3dd",
146
+ "blocks.18.norm1.weight": "3defb305780262c5527aac3a60562372a6b422c88372a36ec8e7fc1364016bd2",
147
+ "blocks.18.norm2.weight": "4f67cb627bb5dfdfb96e5cf3f2ac05702e2a90ad6a8894c702b572288083b3ff",
148
+ "blocks.19.attn.proj.bias": "0bdd2795ecbefb4ed3db23c8a62bd7a569ac0ea84f7c1e71c832b4c9ec944402",
149
+ "blocks.19.attn.proj.weight": "fbe4c46fc20ac088c795bc34facbe387d0a2486011ee5cc450bf5a65a97c61de",
150
+ "blocks.19.attn.qkv.bias": "1c6284b809c4b1fd4bccf738e92ae0168f4cc06a2c7628813fa9fda08c4d6234",
151
+ "blocks.19.attn.qkv.weight": "85abd2a05b80d51fdc478ad5562ce1688a33ee5ac9a8753fe0a52f9a401b1522",
152
+ "blocks.19.attn.sinks": "94ffc41efcc8482b89a31d148a12e1acfcbe85a2105cc13a3ff57a635da51b3f",
153
+ "blocks.19.mlp.down_proj.bias": "57875ce4af8ad4480132602ffd039f4873178a99b369cea93dfb03a212852acf",
154
+ "blocks.19.mlp.down_proj.weight": "ee1c84ef45829d02a16aa1c72fdd67a8af17317810e901bbe15ccc824460377b",
155
+ "blocks.19.mlp.gate_proj.bias": "54d458d0ce2a841eae431f988b335021ad8c1d8202e11a0b838fb562bf04fbe9",
156
+ "blocks.19.mlp.gate_proj.weight": "f848c096e3463891632db0489e9606b6683c6402f6f3d36fe4b80284bb8e1497",
157
+ "blocks.19.mlp.up_proj.bias": "371d47adc9431fa4d58619273f64656e3102d3a81c46f95f20ea1cefdaeef651",
158
+ "blocks.19.mlp.up_proj.weight": "dda4018f4505fba3108ac0e3170f870a61a3745c6fc34adb2b44f7a38c2b6edc",
159
+ "blocks.19.norm1.weight": "c5d6f91953fe8b655045d6e283a46faa2537df1382ffe6d85d533d7217a8ac0a",
160
+ "blocks.19.norm2.weight": "29dd8f576442dd6e8b484bf8f1e17e89fe2f3d873baee7e90c1ec7d367bf5c3c",
161
+ "blocks.2.attn.proj.bias": "0cf496a43ab7979ac8977876ab80a0fd74173496ba103701b363360f37a2cd65",
162
+ "blocks.2.attn.proj.weight": "75aeb0b0736fdc9d25444d3b7b9ad9c3aaee192a4ab1e708fb59768fd33849a2",
163
+ "blocks.2.attn.qkv.bias": "a25c555a179c003e4894ce91fe193bbfcc06b0978a68d59edc00d9341162438a",
164
+ "blocks.2.attn.qkv.weight": "6277ed70af4f1d28f22505d5edc76c8437b598ed96cc360659c0071bdae8e22a",
165
+ "blocks.2.attn.sinks": "132349d8695233c20c4d0b56afe8b8683db7374ad3c21925c26ef7ad2c9a2203",
166
+ "blocks.2.mlp.down_proj.bias": "633a4c7881a62542b345ad3ef09fdda4baa9c91cb2772dcdfdda8a366f4ce923",
167
+ "blocks.2.mlp.down_proj.weight": "735c0fd91afe24f49497cffe21c96ca3d970299b2ffd70ecabcd3e4cf93342ed",
168
+ "blocks.2.mlp.gate_proj.bias": "5e4fb6fbbb280834122da7e03b3ce9a068c59dec12fd9b9d0560ffe23a0035df",
169
+ "blocks.2.mlp.gate_proj.weight": "32064a63716bd454f692e19d9f7fc101447d10eaed1688a494cacc96e3e561b5",
170
+ "blocks.2.mlp.up_proj.bias": "c962412ab3250869df0d30f4f7a24d80c2f955fed24629653d9a7ababd64b9d1",
171
+ "blocks.2.mlp.up_proj.weight": "5775b7c3c9b5fbff5b95407db948826905efd0dd96e45626e607d2ca974d593e",
172
+ "blocks.2.norm1.weight": "908bd3e82d2dd063e2e0fc20743e37566d666cfb8531ae4a37142af06554619b",
173
+ "blocks.2.norm2.weight": "24ddee4740312c9e495527fc1282ad2b25d36aaaf7681628c08f9495b30403e1",
174
+ "blocks.20.attn.proj.bias": "75879010b3e62bc60a49764a307243003d0616fdf1eb27697e04b8a9a0469ba2",
175
+ "blocks.20.attn.proj.weight": "e2334428579ace3a589e64b5aca3ec1aa31b633aa9890b70f0f0500ccc4984e2",
176
+ "blocks.20.attn.qkv.bias": "16a82121435c7d6af47feddbfac00c051fc9b7269e801b6de0d5c4930c411a4a",
177
+ "blocks.20.attn.qkv.weight": "740b1669892bf0e89a323398147c25599e98b16f0ce65116d2916d4a5387baef",
178
+ "blocks.20.attn.sinks": "c3477fbe0d63ff7c11c7bc9b8b524e7394be1c7be8564712bab782dd4e4b65e0",
179
+ "blocks.20.mlp.down_proj.bias": "12c361b6a2261401b7c0829257ca34e77f7f3d843c6b12a1794d611ddcc6501b",
180
+ "blocks.20.mlp.down_proj.weight": "3341fb173b940a6fe67705a1dabe98f30aafcd00a75c51ff6ead824d0ab183f4",
181
+ "blocks.20.mlp.gate_proj.bias": "92fd3287527d913c2d082dfd8cd70d96e274a926b95088c59205cdef6a24d9db",
182
+ "blocks.20.mlp.gate_proj.weight": "a2ade14e1a07b30bb9f0990141ab638fbbdd586ecf02ad6dbd844d0a86f78944",
183
+ "blocks.20.mlp.up_proj.bias": "d02419a2ad13e6ab7fa817f23cfa34f278b679ec9b2ab1de854b353f6c5581ea",
184
+ "blocks.20.mlp.up_proj.weight": "c83b1e707bb8fbd27184f440109df101898b7fb1295ad4c18e5d4d239b7b21a6",
185
+ "blocks.20.norm1.weight": "8ce96193af63cb3cd9ac96965091ac3ba93c79ee31fc83c2461515011eb8b820",
186
+ "blocks.20.norm2.weight": "5c9918204bc734d8f568ac5542bb0b2c8adaae7aa6da66c59c7996f323ca34ca",
187
+ "blocks.21.attn.proj.bias": "9b10f8ca7cde97f58ab5834eea898ed5118902479d40df930351d2f878fe1612",
188
+ "blocks.21.attn.proj.weight": "e8168d35b61b1aaf4f54a18840b6705c57bdeb5bc8a9d8ecd1674c5967a0b228",
189
+ "blocks.21.attn.qkv.bias": "9450a58337c44143a45762dbd9c04e4c7c97365244518c45d56cdf0b17bdc63a",
190
+ "blocks.21.attn.qkv.weight": "a77cf6b1299417ecd4d8f702c5533a587ad84f2a6549655fb7cc59871afbcd21",
191
+ "blocks.21.attn.sinks": "39abf73b1d89a694838e9e6e3fdbaa311ad8f959e51ff7479d7ff03beb5d5907",
192
+ "blocks.21.mlp.down_proj.bias": "1210199fdcd556c9c4c9ae0882dce009a078c162596c7f0f975a2068929e7ea7",
193
+ "blocks.21.mlp.down_proj.weight": "06067229251dedd95485185ebffd03809cb99fc716cd1c9190f684bd393b1381",
194
+ "blocks.21.mlp.gate_proj.bias": "18169e0ef515e1e681779bc1df13ad9d1bc52992a9905da4a83154a1c66d9a34",
195
+ "blocks.21.mlp.gate_proj.weight": "329288608f13d40c64f0ad18b8a036226864f97e70a05b7fe31e2610d732ee2c",
196
+ "blocks.21.mlp.up_proj.bias": "8c0b3a1582cf009a36707715ead7f81c9d61ce77e4442b857ed7d4752e7a604f",
197
+ "blocks.21.mlp.up_proj.weight": "7f0feb6fea960992a30597dbbca14bc8a480c62a827af78826f08cb989976de5",
198
+ "blocks.21.norm1.weight": "ee0cc9f5f2408f2098c50a83d96c53c72137d596b14a7567223dfdb23a0ab0cc",
199
+ "blocks.21.norm2.weight": "be0a7229e50d47f95a3d2425c7e6bf4502675a851a59b169e3ac48b5a6b07db6",
200
+ "blocks.22.attn.proj.bias": "ce3a83e6733e7e462ef555715f19832e5601f8afe8bedd4042d217d9f56113ee",
201
+ "blocks.22.attn.proj.weight": "ef41f88e6a57756c1bb9598c4babdc67038a67b2b8aec5af2d185113f453d285",
202
+ "blocks.22.attn.qkv.bias": "005ae3afc3a31200f2a245c2236fe0847f7a6fbd87242377883a896bd7f9a066",
203
+ "blocks.22.attn.qkv.weight": "6c7003657fac39dfe71981429da18a6e9a04161a893284cd2a1e2998fd8330bb",
204
+ "blocks.22.attn.sinks": "7f29b71ef4924180ae4b959a77214a0e5de0232102cec9f92e83ce4c33e13612",
205
+ "blocks.22.mlp.down_proj.bias": "4fe411259cb35fe51864c13b1c543ae832b62646c62544396d7469bb171a53e5",
206
+ "blocks.22.mlp.down_proj.weight": "8fc8981063f86eba9ddb770c2795e289b34815f8dd1785cc85c83e8a4fd490e5",
207
+ "blocks.22.mlp.gate_proj.bias": "78e6e86e4bc73c32243a32b39b1546c779333b74047cacdf532be846ed73a3fa",
208
+ "blocks.22.mlp.gate_proj.weight": "19c2efe9c9ccf0d2687bf098cc98c96e82c1bc674374c14921ff3fa035be88b6",
209
+ "blocks.22.mlp.up_proj.bias": "465c75909683a89c6dd550a2af4e06d27b943dc49e80ab96ad97a7db2a6277fd",
210
+ "blocks.22.mlp.up_proj.weight": "0d4b30157147ae87c3ba5d3464b45fe85595a253d02561451c4f8a821128033b",
211
+ "blocks.22.norm1.weight": "5e9f50f769435c89d328ddbb892eac79415eea7155cd6a3dfffee197e4f69b67",
212
+ "blocks.22.norm2.weight": "99bee73b41e2d7959686317848a30a97561aa014f4193122dd4e78ef3180f189",
213
+ "blocks.23.attn.proj.bias": "72a4d7663d203cfd14e95e95131516efc186f48275b4489361fe18c57ffe367a",
214
+ "blocks.23.attn.proj.weight": "d6c440a945a1500a8ffeeb91fe365bbc4a14b9b15841d607702077dfc38e057c",
215
+ "blocks.23.attn.qkv.bias": "8cf63f53a2198c962d3f8539a8815b00b2916c2da66fc5d151e1c69b6629eb6a",
216
+ "blocks.23.attn.qkv.weight": "be92c2dc4e0874f35648804af622d1613718099a9ff006deb7f1d9e773c267b1",
217
+ "blocks.23.attn.sinks": "704f9fa565cce9db810a92623a1d98bc5724ba53848892a869f47a8da2d46570",
218
+ "blocks.23.mlp.down_proj.bias": "0df84ef077dd10f465637781c5e9cd4ae85dabaeb79288956f70b801ae98f699",
219
+ "blocks.23.mlp.down_proj.weight": "25edd300db59457905a84cc921e92ca3183340aa074212a1b88642b9723ead72",
220
+ "blocks.23.mlp.gate_proj.bias": "fc34a373c6cc86089c23891d2cb4db49fa56af875068b6493d7f705a63884ce5",
221
+ "blocks.23.mlp.gate_proj.weight": "43bfd4573f3c088627704f5e73e532b8926513d79d9ef253f45708792515e5a7",
222
+ "blocks.23.mlp.up_proj.bias": "3528879306f306bf8662e233c4cb117e3455eeef67180ed4c8fe2bbe699fd4f8",
223
+ "blocks.23.mlp.up_proj.weight": "bf84ea79318e9884f1a1253e61d0d12fffa447e2fe9010f1e6aabe6786fa717d",
224
+ "blocks.23.norm1.weight": "4bcec3d0d14598fedfa3234a5188dab30d9b083adf71ac95a808a9b6b93dd54e",
225
+ "blocks.23.norm2.weight": "2329bd32824ffd24de873e059f6a57764462d28d555905db4a5f513fbcdbe111",
226
+ "blocks.24.attn.proj.bias": "880384fac241bc94ef6f5b06752d273ba0ddeedeeb0007dda8d15857ad037580",
227
+ "blocks.24.attn.proj.weight": "72b760600bd00ae19753d3c2e72c92c1afeac6403c30919cb6e46ea2a0bf8e78",
228
+ "blocks.24.attn.qkv.bias": "eedbe55d329e35e36a17c464520f9d5ca73dd957e24199f0356c72488e5b5437",
229
+ "blocks.24.attn.qkv.weight": "4eea1c7f71f46a16bb21fd15c69d52754e17a042be03324ea11d709a85573ac8",
230
+ "blocks.24.attn.sinks": "d637639a453860923ba4ac86323faa0649d7d10d8d6548d2f21975ccf95b9271",
231
+ "blocks.24.mlp.down_proj.bias": "ea3fd94f790ef890e0e697782d6b337c5015ac5b0662f03b8c2be3551fc0d201",
232
+ "blocks.24.mlp.down_proj.weight": "07ad47fdf8fd477437c13c70c1ea5093725f406d11a9cdcaa876b8f8efbb576c",
233
+ "blocks.24.mlp.gate_proj.bias": "bba9187c592fde2688817e54b37b23c54b7283984a48ad4603317ffdcbcc3b9b",
234
+ "blocks.24.mlp.gate_proj.weight": "819dfa3df1e815dada1981bb02cd8439881df0c8779490810a23d4f6f0088c37",
235
+ "blocks.24.mlp.up_proj.bias": "19d1632fdc0b96ab6014b06c15d9e263dd30fbd8096569e4747bc566e839b086",
236
+ "blocks.24.mlp.up_proj.weight": "4b80044b4daaf2fa5cb98f4f78ba5aa89f9e7d8d587f1cbd07d87108b6529123",
237
+ "blocks.24.norm1.weight": "ec494e7aa665357759ba90bb162e577bfc96daf96fe3a9ebd04d7bbb79120ff6",
238
+ "blocks.24.norm2.weight": "62b933908279401aacaec568a68543a3cd7106a6dd006008147b079b62ff9e45",
239
+ "blocks.25.attn.proj.bias": "edbc120231006bb9d8002b734a5e6a769f9aec259aa4c456bf6f3931f383b760",
240
+ "blocks.25.attn.proj.weight": "951a23eac686b5722edecc3af6303b7b9ede0efa1cc8b945c8292ae889d205be",
241
+ "blocks.25.attn.qkv.bias": "b0355a10e8f8156b9f296e80186fea8dc9c35c93865138e7e5a534dd4ef6ae6f",
242
+ "blocks.25.attn.qkv.weight": "5107ae86fee64653d6f9ef993789694c3ad74d7d974db6e730967b089c03c85b",
243
+ "blocks.25.attn.sinks": "11a88ff10c5d1d7ad1c15dd2af0aa67a08919dc74f2ce52d9ac8ec7d6f28d54b",
244
+ "blocks.25.mlp.down_proj.bias": "63ff1493976d5937ca2e85253b022f7b0a6e5ea5344518438dfae78793a446dc",
245
+ "blocks.25.mlp.down_proj.weight": "468b45a3e662f507661a0c39715cccd75a0217d790014542602d999962884115",
246
+ "blocks.25.mlp.gate_proj.bias": "c9db4c87c83d36323fc5b1ecc2b65679ff84c3c7dbc7b9889af135065286a4d8",
247
+ "blocks.25.mlp.gate_proj.weight": "d472f5d7c0b54e336c4232ed1c7b2eb3edead9d3a11af1dbdaa8195a11b76eb5",
248
+ "blocks.25.mlp.up_proj.bias": "7d9d9601f49855e52d66638d481fc3c6bf7aebfdcfbc1e15cd26194ab98f3b11",
249
+ "blocks.25.mlp.up_proj.weight": "9ce0afae8e64279979f18141bb3c6d0322e7a368cc06522ce6bc4aed2227f417",
250
+ "blocks.25.norm1.weight": "a71ab1da1311930caa4360160b7f110cf7e2c362835db02b5e9b35a54affc5d4",
251
+ "blocks.25.norm2.weight": "9a25a05f9dfa1b6447f77bed1029f102625f2edacc50d9628e75261d68a19f51",
252
+ "blocks.26.attn.proj.bias": "2da4fee62542d73d7c7049da19c7cbd5607287e6c76337f684bf5d3d62a8fa65",
253
+ "blocks.26.attn.proj.weight": "b49d646999d31464eb066f8582609c3b3703dcd4922c2f47098a628a217a82f7",
254
+ "blocks.26.attn.qkv.bias": "c8a4b10e351c2b4b631eff1d21d8c5e5125070030577ba6635da99c45a0d9c49",
255
+ "blocks.26.attn.qkv.weight": "148257549f46a31b51a455967865ead082fd30c59d777f4118cc1be842950e3e",
256
+ "blocks.26.attn.sinks": "73ff5325f72013f8e41817d6209efb17cd65fe0c1748e596fc6efe14cf7242dd",
257
+ "blocks.26.mlp.down_proj.bias": "7ecc18cfefcb70d735b8bcf469e6b2d372ded5d75c7621aa2ff768065576c0e8",
258
+ "blocks.26.mlp.down_proj.weight": "3f8e08c7931f17d553f291e1434cf4bc12d53a9540a58853a58bed494a45ef9c",
259
+ "blocks.26.mlp.gate_proj.bias": "0fe0e795831c2ab34a73234e3601250ad4e0737db2b30188edb691b6f4100b79",
260
+ "blocks.26.mlp.gate_proj.weight": "2095178c915aa176990f804129e41dfd6337d5d234d79ecd517dd5e7013f9663",
261
+ "blocks.26.mlp.up_proj.bias": "adf7dfde6dac4bc062e761d96dd5fc2181b3478738734a81f1acf291094a0754",
262
+ "blocks.26.mlp.up_proj.weight": "d0e1cf1b9776e489c213860bb27920336ce666eedbdc6b316e37bf59bd3b0557",
263
+ "blocks.26.norm1.weight": "8c6b25d8d64a81023400a40a8876579876cb8fadbf2dccb0b95071c8d0088572",
264
+ "blocks.26.norm2.weight": "5dd0541158c4702f123169122412a1d9c8555601e2ae7afdfe81887973c50045",
265
+ "blocks.27.attn.proj.bias": "5706ef6d52184b6d5ea93135d647778c3cf75cb86866463d88135ca2a6b17df8",
266
+ "blocks.27.attn.proj.weight": "99d9b4640b5fe56e3513f3ec39309880a2b0e6243f696b0278bcfe68fcdb630b",
267
+ "blocks.27.attn.qkv.bias": "cf07f5c31f055b6aacae81d1f09b50519e415b1a4fd689cc83d32d8d974e23ed",
268
+ "blocks.27.attn.qkv.weight": "00268ae0c2bf892706b541dd5f0707f9932b1b5d53b755b00c0c959cb2be7b05",
269
+ "blocks.27.mlp.down_proj.bias": "ea2cf1c72d7ddd7c1ade4356e71479c2aebc00ef96b4f5bc14654a564b145093",
270
+ "blocks.27.mlp.down_proj.weight": "58067514f71b0fa0ee8798442822d6f5a249a61df270c0f285b500c1ae78afde",
271
+ "blocks.27.mlp.gate_proj.bias": "530e9ce0e89a43a08411c8b5f6ebb2200ddea9377f73b5c670bde3301cfb3683",
272
+ "blocks.27.mlp.gate_proj.weight": "84209394bc4166c5aa510cbcd61d5ac1d6a6c14fc31ce2712d29f661c7e1b1d2",
273
+ "blocks.27.mlp.up_proj.bias": "97ed5385931d47b19d90f99e4a246ab4289d910cc094100600e52daac2cae9c9",
274
+ "blocks.27.mlp.up_proj.weight": "f4b08eb20cd60853a4af9cbcf19f7caeb3772858e73069391bae5b7a884fa70c",
275
+ "blocks.27.norm1.weight": "b83195388f51b4e1d60b1179362d4121b2fb482a7703fc3bebeed5af6eb8fe0d",
276
+ "blocks.27.norm2.weight": "2afae7f8b410025a3c1f630b36f1019c0d168315b0d0445ec16caf733588d570",
277
+ "blocks.3.attn.proj.bias": "549deea1130442dea3f30100eea5dd339aacc391dd517998af52edb628f6808f",
278
+ "blocks.3.attn.proj.weight": "d800b94db1218179b3c0784561648c7568059322b5b3c7220fd3d54ad675d828",
279
+ "blocks.3.attn.qkv.bias": "13d5e9d971333b016d3aa27aa08d71b601e1699aba2c21640ae64e9123446dee",
280
+ "blocks.3.attn.qkv.weight": "aa4c4b1c9fd2e21f5899086466f130baa4ef7b51aa72f6c184f586e1a7c6d221",
281
+ "blocks.3.attn.sinks": "1e35a435b9bf5db0013308f5ee656ef772114c44318108ae095b6a0d89f7939a",
282
+ "blocks.3.mlp.down_proj.bias": "4dee502979769f537989d7e70565e8ab26557b9c2d026fdcbf7d10bfd4e81ba8",
283
+ "blocks.3.mlp.down_proj.weight": "8e6b4e5daf345c039134901ce636c3a9868c93d6e5e001559ed6899d9068c1a6",
284
+ "blocks.3.mlp.gate_proj.bias": "b36d9a6bc0eb3b4d36b8b9d35628e6a593c1e46c4824580124cccf09ebf8e272",
285
+ "blocks.3.mlp.gate_proj.weight": "df41c57b0d37ada0e3007bca68f8dc0f2a6842c7c42688ad88a5210736db832e",
286
+ "blocks.3.mlp.up_proj.bias": "c34a155153550bfebdaed6a45c39bc5367da8acbed582a6b323e42bf82ea53c0",
287
+ "blocks.3.mlp.up_proj.weight": "d444545f534c9b3f95a80d2b646fa60de81761834fdc4159320d38c0b728f442",
288
+ "blocks.3.norm1.weight": "9333e3f13b0925c3afc7c495d182806b34089ca62588b3957c2d8febeb7df0e1",
289
+ "blocks.3.norm2.weight": "571dfcfa73f705150aed0e9b847347838c0ddd7dabac6fe1301e64fced5b8f02",
290
+ "blocks.4.attn.proj.bias": "a4d3c57fb72a2114167cf0bcc78246905686ad17ace636a16aa1488dea032da0",
291
+ "blocks.4.attn.proj.weight": "6b6e5539d993092f3d668e3a805883de53abb0db07e67b8c643402d469ddef38",
292
+ "blocks.4.attn.qkv.bias": "ea1653650190f6d51df963809a8c21594e97f13199a23ff45e29099bdefa6902",
293
+ "blocks.4.attn.qkv.weight": "ede66db6dc98fd25f9fe4b7d164ce321e2842ea8e3b3768f03eaa2d3a9f76f57",
294
+ "blocks.4.attn.sinks": "dd1cbf287d710820c96fdb284c127883201aacaf35e4ca02ccfe399bfe2629e9",
295
+ "blocks.4.mlp.down_proj.bias": "5a9183130c3bb93e75aa2cff7c95325d15245997ad93c06e64327d10c013f097",
296
+ "blocks.4.mlp.down_proj.weight": "765ff65ad9783c5182677f733fd0721ec8a268b2f678a27dabb4d3d6298da5ee",
297
+ "blocks.4.mlp.gate_proj.bias": "9dd5d9c960a7657fe65104f76ab58b893c9ca7bcb99994bcc6fa4d2e814060e0",
298
+ "blocks.4.mlp.gate_proj.weight": "41c4056d9755685fd7291fba63bd442b2ade5f56f69a84a5f676f793a2cadd44",
299
+ "blocks.4.mlp.up_proj.bias": "ca7b122b6e30a3c401025a30458d882d92288954bc2536f81ef556f93eff03c7",
300
+ "blocks.4.mlp.up_proj.weight": "ac00e3cd64ca6252a4ca8d6ef4dddb58368b72f309dfbe1f6642e9176d993a96",
301
+ "blocks.4.norm1.weight": "d26f9dd03c22151f3c6a42633c2413a3c958969a3485724fa52955dfc4e763b8",
302
+ "blocks.4.norm2.weight": "36d95bb1218599dc8a592bc36aad1173c924a8a2d0e865f0412442dbb7aa1c2d",
303
+ "blocks.5.attn.proj.bias": "bfee01ba14312af8acb504406f0612d0a3c4b8e7c11ad408b7ec32198595a478",
304
+ "blocks.5.attn.proj.weight": "b5f81eeecb7dc303fd7aa3181b31f314085374ab9f1f53072946deb9ec6be6f3",
305
+ "blocks.5.attn.qkv.bias": "149676331ff2ce7736084325289429c9cbc4bbab8e854be71c6122cac9966aff",
306
+ "blocks.5.attn.qkv.weight": "c14971c073f8c8a83ca3b099e9d786a028a86f6233bc6834a631a9c9eb8bcec6",
307
+ "blocks.5.attn.sinks": "95138000ee6636efe4ec26a6b6fae9f84b0edadbe870c708a3e084600a0405c9",
308
+ "blocks.5.mlp.down_proj.bias": "6726cc00f237c5d7c410edbf975fa194d8d98cea5eecf8dbd819da43e8c2a5cc",
309
+ "blocks.5.mlp.down_proj.weight": "c35b491b620081d5bab58fae46d1ece28ed0e12f8bcdd047fb17984ebfb2c6b4",
310
+ "blocks.5.mlp.gate_proj.bias": "230fb7434ad05a6b65be7bfb11e401d1c95c6264e4aec1b4928c2211b91e0e93",
311
+ "blocks.5.mlp.gate_proj.weight": "b508ba976de020d94aa6a2f5d28783a0e0008a3ebb0983953cfb2e659e4526a7",
312
+ "blocks.5.mlp.up_proj.bias": "573d3cf4a707699b70ec5da4c3d5811717538bfd92bcfc0caaad3266c9bb2896",
313
+ "blocks.5.mlp.up_proj.weight": "fe43f319084268936f3d888e28bb152ba554a1b33331d0cdaf9c9707a7629fda",
314
+ "blocks.5.norm1.weight": "126f2ae17451f9d5d32a9b81c4630266933f75fafc33fba21a29b104725094fa",
315
+ "blocks.5.norm2.weight": "dd08790e2157af068acf4d30f269eca25773a5fd17a2cba75a2a8a9964b39845",
316
+ "blocks.6.attn.proj.bias": "ca8a8773c23426fa50447f58a5b1079480466e039ed3e26ae4e3e43ad276663e",
317
+ "blocks.6.attn.proj.weight": "957e4ae654b966abb041a85f2d1e91a69f284fc8257ea5250678dfa626d1ea59",
318
+ "blocks.6.attn.qkv.bias": "339505c814d13cebd246095aaf46ff5ec017cdfae7f32c5353e817a80cdf7377",
319
+ "blocks.6.attn.qkv.weight": "e5344aadb6472872c1c4c0d5f14feacfe377c32e3440e2e942fd5ace0d723b93",
320
+ "blocks.6.attn.sinks": "4ec1ce43b67e546a1a08a327e33d2e73f4db818b00177eefc68aa219ebbfdfbf",
321
+ "blocks.6.mlp.down_proj.bias": "90d2cfd870e9c74f5f0ff7cbce3b84e43e0636025d3c8ddcf78ea2aeaf8de54b",
322
+ "blocks.6.mlp.down_proj.weight": "191e4252688ad5e14750b792261aecd33546121770a5700ae18d8b963092d006",
323
+ "blocks.6.mlp.gate_proj.bias": "0054f6bcb6317e37c0bc7650cfb951070ec9af787a6b6be47e2ebcdd3a7204ef",
324
+ "blocks.6.mlp.gate_proj.weight": "d801a2054b78b196ccc3cfe59ef58dce30b9e636c8731b2706adb819ac14e106",
325
+ "blocks.6.mlp.up_proj.bias": "25c6e889eea6a21fbee83b51e8e3a0c79f0f7562a0790d816b77619a93469955",
326
+ "blocks.6.mlp.up_proj.weight": "f3da9d971570b04b91b535a7e08c5d87783b0d59d7403eb350c7ba972ff34ca6",
327
+ "blocks.6.norm1.weight": "744523028f02f45d9c8025a8d010e4f714ed0dfc6fc6c12349b32c6384f104ee",
328
+ "blocks.6.norm2.weight": "e40658b34db39650a119e4870cbfa9cf336635bd25ea5d8af86ffce749707c8d",
329
+ "blocks.7.attn.proj.bias": "cd734c6ad995a6512312344114aebff06f98eb400a772b1b6d3299e9e70262c9",
330
+ "blocks.7.attn.proj.weight": "0a4369aea59a3d6df6f4200522ee5f1ed4daefcd0be5f133933f3236208cfdae",
331
+ "blocks.7.attn.qkv.bias": "8b81d62d383578627dcb4b4362f0fe79f9a3ade2c7c669762eb6c2b8c42c8251",
332
+ "blocks.7.attn.qkv.weight": "0f45a206ad85dacfdc3681525393704e7ba8586bfcf1ae80c1816473a2679cf4",
333
+ "blocks.7.attn.sinks": "f33dfa44019863e1fe69724171d5ab318a1b77e3057494197fc51ab5cbf7288c",
334
+ "blocks.7.mlp.down_proj.bias": "28d050bd180bca8ef01a363d3e2d0627c0f40cd3d9dfd5b9ed2bd3cb4b154662",
335
+ "blocks.7.mlp.down_proj.weight": "7b4d26ede8fa3d6a81c59a742e74947dcb2060f312daebf186cdf320bf2816f2",
336
+ "blocks.7.mlp.gate_proj.bias": "7a76ce9f5d75af3f90a01f52c536dabbfc948eee6f154ecf3e1290c685e19ae7",
337
+ "blocks.7.mlp.gate_proj.weight": "6bff7a1c1560632ed8345c438adf21a1bd12f17a61febd9b25d032873de50ccc",
338
+ "blocks.7.mlp.up_proj.bias": "78eda8efaedc4cbadccec681b06d70ed6b924629205cba9ef016fd976798de1c",
339
+ "blocks.7.mlp.up_proj.weight": "ca52e3af533deb56d0641b0a0780aee4f9c7730fa40102ff3b349a2a2bcdc88d",
340
+ "blocks.7.norm1.weight": "32dc2e4102f76ddfd6f12c5dbf15b0f586e9c4b6227b86dbf7b6c8a9eadd988c",
341
+ "blocks.7.norm2.weight": "5da2e43714d414d5445e7b3efd918bc682d4ff2422887c7f91a8ea384f9bdba7",
342
+ "blocks.8.attn.proj.bias": "c763a651a9a1530152aff5227702ab3ece7a540c28fd237c7ffa8ce2b1e2f9cc",
343
+ "blocks.8.attn.proj.weight": "15fb5a0afcc3f25ae061f35fa13d879663738294ca135785ed7c93c589affb55",
344
+ "blocks.8.attn.qkv.bias": "e8dfcf1b9c7c95e72d2897d18576d61782d19a00705082e2772c2cf6b75ec036",
345
+ "blocks.8.attn.qkv.weight": "e96da8c934de7e9b5ea2f34e192bf397d20e59280baf0c5138bbaff823d4cdf6",
346
+ "blocks.8.attn.sinks": "46e969d2834aaa9d37de85091606a0c234661d7cbfa571fea1f3195eeac56da8",
347
+ "blocks.8.mlp.down_proj.bias": "c37553345b310f558ded83386417ac6cd595ac437aecea67414808f8c05d012f",
348
+ "blocks.8.mlp.down_proj.weight": "b829d03e7b12769dd98469de53719a666afdb22293c8cbeb137b1b243c9ea0b4",
349
+ "blocks.8.mlp.gate_proj.bias": "b4d89154dd1c37b53899f77c48849a6eec21f73eb29cc812e7a4c1a06430a556",
350
+ "blocks.8.mlp.gate_proj.weight": "cb0f516371364d5dcc2ae6e6d7dcbfec461a7b848c2036c914a92d5156aa15b8",
351
+ "blocks.8.mlp.up_proj.bias": "8dab2c28bce34acbb5091983f6699f42fc23f82d0dee7787e178725e7d470aba",
352
+ "blocks.8.mlp.up_proj.weight": "b3ee78fc549e98bb90649e8bb3f2405281e43780d4258787a1a52ef2cb474f2d",
353
+ "blocks.8.norm1.weight": "6ac055dd4d5b93e7c500a71991c7137459a88419df1dad2d238ba17ac50c48a5",
354
+ "blocks.8.norm2.weight": "dd1fc7d04d8c43f3322a3ae5c2177eb481e138e3134239cb543dc78bebd32181",
355
+ "blocks.9.attn.proj.bias": "6e630b6cc075dc5fcf0466f9e2f4e57d99a09a93b4fe1f84018182e6fc7a4f5a",
356
+ "blocks.9.attn.proj.weight": "420258cf68900e28af7d760b08c05229cb9617ce7888642ab2aad757e77a0cb0",
357
+ "blocks.9.attn.qkv.bias": "8415406ecab8f311e3bc9ff07eb4364d1aed6a04aeb832886e376c7261ecb3cb",
358
+ "blocks.9.attn.qkv.weight": "86629946a1080d802e0159b0018b890afef4304a9075d06e56d25fe31778e0d8",
359
+ "blocks.9.mlp.down_proj.bias": "50a3ba680d9f50d65376c250d87a816a59249d72cf9ee88b4c9253582170d211",
360
+ "blocks.9.mlp.down_proj.weight": "73efed8f6ddee4e651a74330248f83bd40d06daced7d657b52482039e1723072",
361
+ "blocks.9.mlp.gate_proj.bias": "246968d0135d78f8337f1f6b9c31ad6fc9112536c624671056965c6715b213a5",
362
+ "blocks.9.mlp.gate_proj.weight": "1f1bd2d4ce4eb6bbd7d634510742aeeba789d34c844d60f97e5889ef2f6afe4d",
363
+ "blocks.9.mlp.up_proj.bias": "0aa31809a670f638050b2615cc0042654b51e4bc667a1a9100c9b774258f223c",
364
+ "blocks.9.mlp.up_proj.weight": "788d6bf48eeee5c81a601a99baa94844a67f4962bee236ae8ea6160a1f4973a9",
365
+ "blocks.9.norm1.weight": "5b8e68729c1ed6b7580ddd50d3820043214de5fff65743510666ab0e6703226c",
366
+ "blocks.9.norm2.weight": "136c0c50dc59914a14fa042010de55d6c0224ea3436c504dbbd225dba3e5df13",
367
+ "merger.ln_q.weight": "1086dd19074bc0572b11c820ab12eee9e17ec66fc7d84b14a422ab72a34351d4",
368
+ "merger.mlp.0.weight": "19fac6d5a8b7c259a2fb911e8aee2060ce17a8bedbee8bbe0e03d0746fe59e9f",
369
+ "merger.mlp.2.weight": "b97e643633d95df1ed5c46adb9f4fa5d1ecdc7ad35b0f8de370af8b44b2050e9",
370
+ "patch_embed.proj.weight": "d8d44e93ef6ff896ba8fab0d485d092e67f49c8815388fc307e29e9b578f81b1"
371
+ }
372
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:140430ae858b2ae46c062bd141ba1054d10cb1e9a2e38eb138daa0a1269b4fd0
3
+ size 1478199144
modeling_mimo_vision.py ADDED
@@ -0,0 +1,399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ #
3
+ # Copyright 2026 Xiaomi Corporation.
4
+ # Copyright 2026 The HuggingFace Inc. team.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ # Vision classes extracted from XiaomiMiMo/MiMo-V2.6-Pro-RL
19
+ # b61f21852680ee02a29e946e18cf8697f4844061. Flash uses identical vision source.
20
+ # No text/audio model is instantiated or imported by this standalone module.
21
+ # The three absent merger biases are omitted, matching zero-bias HF completion
22
+ # and SGLang's LayerNorm merger. Attention/block arithmetic is unchanged.
23
+ import torch
24
+ from torch import nn
25
+ from torch.nn import functional as F
26
+ from transformers import PretrainedConfig, PreTrainedModel
27
+ from transformers.activations import ACT2FN
28
+
29
+
30
+ class MiMoVisionConfig(PretrainedConfig):
31
+ model_type = "mimo26_vision"
32
+
33
+ def __init__(self, **kwargs):
34
+ defaults = dict(depth=28, hidden_size=1280, intermediate_size=4608,
35
+ num_heads=32, num_key_value_heads=8, qk_channels=64,
36
+ patch_size=16, temporal_patch_size=2, in_chans=3,
37
+ spatial_merge_size=2, out_hidden_size=6144,
38
+ hidden_act="silu", rms_norm_eps=1e-6,
39
+ fullatt_block_indexes=[0, 9, 18, 27], use_sink=True,
40
+ visual_token_window_size=64,
41
+ vit_window_attn_types=[-1,0,0,0,0,1,1,1,1,-1,0,0,0,0,1,1,1,1,-1,0,0,0,0,1,1,1,1,-1])
42
+ defaults.update(kwargs)
43
+ super().__init__(**defaults)
44
+
45
+
46
+ def _rotate_half_vision(x: torch.Tensor) -> torch.Tensor:
47
+ x1 = x[..., : x.shape[-1] // 2]
48
+ x2 = x[..., x.shape[-1] // 2 :]
49
+ return torch.cat((-x2, x1), dim=-1)
50
+
51
+
52
+ def _apply_rotary_pos_emb_vision(
53
+ q: torch.Tensor, k: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor
54
+ ) -> tuple[torch.Tensor, torch.Tensor]:
55
+ orig_q_dtype, orig_k_dtype = q.dtype, k.dtype
56
+ q, k = q.float(), k.float()
57
+ cos, sin = cos.unsqueeze(-2).float(), sin.unsqueeze(-2).float()
58
+ q_embed = (q * cos) + (_rotate_half_vision(q) * sin)
59
+ k_embed = (k * cos) + (_rotate_half_vision(k) * sin)
60
+ return q_embed.to(orig_q_dtype), k_embed.to(orig_k_dtype)
61
+
62
+
63
+ class MiMoVisionRotaryEmbedding(nn.Module):
64
+ def __init__(self, dim: int, theta: float = 10000.0) -> None:
65
+ super().__init__()
66
+ inv_freq = 1.0 / (theta ** (torch.arange(0, dim, 2, dtype=torch.float) / dim))
67
+ self.register_buffer("inv_freq", inv_freq, persistent=False)
68
+
69
+ def forward(self, seqlen: int) -> torch.Tensor:
70
+ seq = torch.arange(seqlen, device=self.inv_freq.device, dtype=self.inv_freq.dtype)
71
+ return torch.outer(seq, self.inv_freq)
72
+
73
+
74
+ class MiMoVisionPatchEmbed(nn.Module):
75
+ def __init__(
76
+ self, patch_size: int = 16, temporal_patch_size: int = 2, in_channels: int = 3, embed_dim: int = 1280
77
+ ):
78
+ super().__init__()
79
+ self.patch_size = patch_size
80
+ self.temporal_patch_size = temporal_patch_size
81
+ self.in_channels = in_channels
82
+ self.embed_dim = embed_dim
83
+ kernel_size = [temporal_patch_size, patch_size, patch_size]
84
+ self.proj = nn.Conv3d(in_channels, embed_dim, kernel_size=kernel_size, stride=kernel_size, bias=False)
85
+
86
+ def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
87
+ target_dtype = self.proj.weight.dtype
88
+ hidden_states = hidden_states.view(
89
+ -1, self.in_channels, self.temporal_patch_size, self.patch_size, self.patch_size
90
+ )
91
+ return self.proj(hidden_states.to(dtype=target_dtype)).view(-1, self.embed_dim)
92
+
93
+
94
+ class MiMoVisionSwiGLUMLP(nn.Module):
95
+ def __init__(self, dim: int, intermediate_dim: int, hidden_act: str = "silu"):
96
+ super().__init__()
97
+ self.gate_proj = nn.Linear(dim, intermediate_dim, bias=True)
98
+ self.up_proj = nn.Linear(dim, intermediate_dim, bias=True)
99
+ self.down_proj = nn.Linear(intermediate_dim, dim, bias=True)
100
+ self.act_fn = ACT2FN[hidden_act]
101
+
102
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
103
+ return self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))
104
+
105
+
106
+ class MiMoVisionAttention(nn.Module):
107
+ def __init__(
108
+ self,
109
+ dim: int,
110
+ num_heads: int,
111
+ num_kv_heads: int | None = None,
112
+ head_dim: int | None = None,
113
+ use_sinks: bool = False,
114
+ window_size: int = -1,
115
+ ):
116
+ super().__init__()
117
+ self.dim = dim
118
+ self.num_heads = num_heads
119
+ self.num_kv_heads = num_kv_heads if num_kv_heads is not None else num_heads
120
+ self.head_dim = head_dim if head_dim is not None else dim // num_heads
121
+ self.num_kv_groups = self.num_heads // self.num_kv_heads
122
+ self.scaling = self.head_dim**-0.5
123
+ self.window_size = window_size
124
+
125
+ qkv_dim = (self.num_heads + 2 * self.num_kv_heads) * self.head_dim
126
+ self.qkv = nn.Linear(dim, qkv_dim, bias=True)
127
+ self.proj = nn.Linear(self.num_heads * self.head_dim, dim, bias=True)
128
+ self.sinks = nn.Parameter(torch.zeros(self.num_heads)) if use_sinks else None
129
+
130
+ def _build_window_mask(self, seq_len: int, device: torch.device, dtype: torch.dtype) -> torch.Tensor | None:
131
+ if self.window_size <= 0:
132
+ return None
133
+ row_idx = torch.arange(seq_len, device=device).unsqueeze(1)
134
+ col_idx = torch.arange(seq_len, device=device).unsqueeze(0)
135
+ mask = torch.zeros(seq_len, seq_len, device=device, dtype=dtype)
136
+ mask = mask.masked_fill((row_idx - col_idx).abs() > self.window_size, float("-inf"))
137
+ return mask
138
+
139
+ def forward(
140
+ self,
141
+ hidden_states: torch.Tensor,
142
+ cu_seqlens: torch.Tensor,
143
+ position_embeddings: tuple[torch.Tensor, torch.Tensor],
144
+ full_attn: bool = False,
145
+ ) -> torch.Tensor:
146
+ seq_len = hidden_states.shape[0]
147
+ qkv = self.qkv(hidden_states)
148
+
149
+ q_dim = self.num_heads * self.head_dim
150
+ kv_dim = self.num_kv_heads * self.head_dim
151
+ q = qkv[:, :q_dim].view(seq_len, self.num_heads, self.head_dim)
152
+ k = qkv[:, q_dim : q_dim + kv_dim].view(seq_len, self.num_kv_heads, self.head_dim)
153
+ v = qkv[:, q_dim + kv_dim :].view(seq_len, self.num_kv_heads, self.head_dim)
154
+
155
+ cos, sin = position_embeddings
156
+ q, k = _apply_rotary_pos_emb_vision(q, k, cos, sin)
157
+
158
+ lengths = cu_seqlens[1:] - cu_seqlens[:-1]
159
+ q_chunks = torch.split(q, lengths.tolist(), dim=0)
160
+ k_chunks = torch.split(k, lengths.tolist(), dim=0)
161
+ v_chunks = torch.split(v, lengths.tolist(), dim=0)
162
+
163
+ outputs = []
164
+ for q_c, k_c, v_c in zip(q_chunks, k_chunks, v_chunks):
165
+ q_c = q_c.unsqueeze(0).transpose(1, 2)
166
+ k_c = k_c.unsqueeze(0).transpose(1, 2)
167
+ v_c = v_c.unsqueeze(0).transpose(1, 2)
168
+
169
+ if self.num_kv_groups > 1:
170
+ k_c = k_c.repeat_interleave(self.num_kv_groups, dim=1)
171
+ v_c = v_c.repeat_interleave(self.num_kv_groups, dim=1)
172
+
173
+ attn_mask = None
174
+ if not full_attn:
175
+ attn_mask = self._build_window_mask(q_c.shape[2], q_c.device, q_c.dtype)
176
+
177
+ if self.sinks is not None:
178
+ sink_bias = torch.zeros(
179
+ 1, self.num_heads, q_c.shape[2], k_c.shape[2], device=q_c.device, dtype=q_c.dtype
180
+ )
181
+ sink_bias[..., 0] = self.sinks.view(1, self.num_heads, 1)
182
+ attn_mask = sink_bias if attn_mask is None else attn_mask + sink_bias
183
+
184
+ attn_out = F.scaled_dot_product_attention(q_c, k_c, v_c, attn_mask=attn_mask, scale=self.scaling)
185
+ outputs.append(attn_out.squeeze(0).transpose(0, 1))
186
+
187
+ attn_output = torch.cat(outputs, dim=0)
188
+ attn_output = attn_output.reshape(seq_len, -1)
189
+ return self.proj(attn_output)
190
+
191
+
192
+ class MiMoVisionBlock(nn.Module):
193
+ def __init__(
194
+ self,
195
+ dim: int,
196
+ intermediate_dim: int,
197
+ num_heads: int,
198
+ num_kv_heads: int | None = None,
199
+ head_dim: int | None = None,
200
+ hidden_act: str = "silu",
201
+ rms_norm_eps: float = 1e-6,
202
+ use_sinks: bool = False,
203
+ window_size: int = -1,
204
+ ):
205
+ super().__init__()
206
+ self.norm1 = nn.RMSNorm(dim, eps=rms_norm_eps)
207
+ self.norm2 = nn.RMSNorm(dim, eps=rms_norm_eps)
208
+ self.attn = MiMoVisionAttention(
209
+ dim=dim, num_heads=num_heads, num_kv_heads=num_kv_heads, head_dim=head_dim,
210
+ use_sinks=use_sinks, window_size=window_size,
211
+ )
212
+ self.mlp = MiMoVisionSwiGLUMLP(dim=dim, intermediate_dim=intermediate_dim, hidden_act=hidden_act)
213
+
214
+ def forward(
215
+ self,
216
+ hidden_states: torch.Tensor,
217
+ cu_seqlens: torch.Tensor,
218
+ position_embeddings: tuple[torch.Tensor, torch.Tensor],
219
+ full_attn: bool = False,
220
+ ) -> torch.Tensor:
221
+ hidden_states = hidden_states + self.attn(
222
+ self.norm1(hidden_states), cu_seqlens=cu_seqlens,
223
+ position_embeddings=position_embeddings, full_attn=full_attn,
224
+ )
225
+ hidden_states = hidden_states + self.mlp(self.norm2(hidden_states))
226
+ return hidden_states
227
+
228
+
229
+ class MiMoVisionPatchMerger(nn.Module):
230
+ def __init__(self, dim: int, context_dim: int, spatial_merge_size: int = 2):
231
+ super().__init__()
232
+ self.hidden_size = context_dim * (spatial_merge_size**2)
233
+ self.ln_q = nn.LayerNorm(context_dim, eps=1e-6, bias=False)
234
+ self.mlp = nn.Sequential(
235
+ nn.Linear(self.hidden_size, self.hidden_size, bias=False),
236
+ nn.GELU(),
237
+ nn.Linear(self.hidden_size, dim, bias=False),
238
+ )
239
+
240
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
241
+ return self.mlp(self.ln_q(x).view(-1, self.hidden_size))
242
+
243
+
244
+ class MiMoVisionTransformer(nn.Module):
245
+ def __init__(self, config):
246
+ super().__init__()
247
+ self.config = config
248
+ hidden_size = config.hidden_size
249
+ depth = config.depth
250
+ num_heads = config.num_heads
251
+ num_kv_heads = getattr(config, "num_key_value_heads", num_heads)
252
+ head_dim = getattr(config, "qk_channels", 64)
253
+ spatial_merge_size = getattr(config, "spatial_merge_size", 2)
254
+ rms_norm_eps = getattr(config, "rms_norm_eps", 1e-6)
255
+ self.fullatt_block_indexes = getattr(config, "fullatt_block_indexes", [])
256
+ use_sink = getattr(config, "use_sink", False)
257
+ visual_token_window_size = getattr(config, "visual_token_window_size", -1)
258
+ self.vit_window_attn_types = getattr(config, "vit_window_attn_types", None) or [-1] * depth
259
+
260
+ self.spatial_merge_size = spatial_merge_size
261
+ self.spatial_merge_unit = spatial_merge_size * spatial_merge_size
262
+
263
+ self.patch_embed = MiMoVisionPatchEmbed(
264
+ patch_size=config.patch_size,
265
+ temporal_patch_size=config.temporal_patch_size,
266
+ in_channels=getattr(config, "in_channels", None) or getattr(config, "in_chans", 3),
267
+ embed_dim=hidden_size,
268
+ )
269
+
270
+ self.rotary_pos_emb = MiMoVisionRotaryEmbedding(head_dim // 2)
271
+
272
+ self.blocks = nn.ModuleList(
273
+ [
274
+ MiMoVisionBlock(
275
+ dim=hidden_size,
276
+ intermediate_dim=config.intermediate_size,
277
+ num_heads=num_heads,
278
+ num_kv_heads=num_kv_heads,
279
+ head_dim=head_dim,
280
+ hidden_act=config.hidden_act,
281
+ rms_norm_eps=rms_norm_eps,
282
+ use_sinks=use_sink and (i not in self.fullatt_block_indexes),
283
+ window_size=visual_token_window_size,
284
+ )
285
+ for i in range(depth)
286
+ ]
287
+ )
288
+
289
+ self.merger = MiMoVisionPatchMerger(
290
+ dim=config.out_hidden_size,
291
+ context_dim=hidden_size,
292
+ spatial_merge_size=spatial_merge_size,
293
+ )
294
+
295
+ @property
296
+ def dtype(self) -> torch.dtype:
297
+ return self.patch_embed.proj.weight.dtype
298
+
299
+ def apply_index(self, tensor: torch.Tensor, index: torch.Tensor) -> torch.Tensor:
300
+ tensor = tensor.unflatten(0, (-1, self.spatial_merge_unit))
301
+ tensor = tensor[index]
302
+ return tensor.flatten(0, 1)
303
+
304
+ def get_window_index_1d(self, grid_thw: torch.Tensor, col: bool = True) -> torch.Tensor:
305
+ window_index = []
306
+ window_index_id = 0
307
+ for grid_t, grid_h, grid_w in grid_thw:
308
+ llm_grid_h = grid_h // self.spatial_merge_size
309
+ llm_grid_w = grid_w // self.spatial_merge_size
310
+ index = torch.arange(grid_t * llm_grid_h * llm_grid_w).reshape(grid_t, llm_grid_h, llm_grid_w)
311
+ index_new = index.transpose(1, 2).reshape(-1) if col else index.reshape(-1)
312
+ window_index.append(index_new + window_index_id)
313
+ window_index_id += (grid_t * llm_grid_h * llm_grid_w).item()
314
+ return torch.cat(window_index, dim=0)
315
+
316
+ def rot_pos_emb(self, grid_thw: torch.Tensor) -> torch.Tensor:
317
+ pos_ids = []
318
+ for t, h, w in grid_thw:
319
+ hpos_ids = torch.arange(h).unsqueeze(1).expand(-1, w)
320
+ hpos_ids = hpos_ids.reshape(
321
+ h // self.spatial_merge_size, self.spatial_merge_size,
322
+ w // self.spatial_merge_size, self.spatial_merge_size,
323
+ )
324
+ hpos_ids = hpos_ids.permute(0, 2, 1, 3).flatten()
325
+
326
+ wpos_ids = torch.arange(w).unsqueeze(0).expand(h, -1)
327
+ wpos_ids = wpos_ids.reshape(
328
+ h // self.spatial_merge_size, self.spatial_merge_size,
329
+ w // self.spatial_merge_size, self.spatial_merge_size,
330
+ )
331
+ wpos_ids = wpos_ids.permute(0, 2, 1, 3).flatten()
332
+
333
+ pos_ids.append(torch.stack([hpos_ids, wpos_ids], dim=-1).repeat(t, 1))
334
+ pos_ids = torch.cat(pos_ids, dim=0)
335
+ max_grid_size = grid_thw[:, 1:].max()
336
+ rotary_pos_emb_full = self.rotary_pos_emb(max_grid_size)
337
+ return rotary_pos_emb_full[pos_ids].flatten(1)
338
+
339
+ def forward(self, pixel_values: torch.Tensor, grid_thw: torch.Tensor) -> torch.Tensor:
340
+ x = pixel_values.to(device=self.patch_embed.proj.weight.device, dtype=self.dtype)
341
+ x = self.patch_embed(x)
342
+
343
+ rotary_emb = self.rot_pos_emb(grid_thw)
344
+ rotary_emb = rotary_emb.to(device=x.device)
345
+ emb = torch.cat((rotary_emb, rotary_emb), dim=-1)
346
+
347
+ window_index_1d_col = self.get_window_index_1d(grid_thw, col=True).to(device=x.device)
348
+ reverse_window_index_1d_col = torch.argsort(window_index_1d_col).to(device=x.device)
349
+
350
+ row_based_embeddings = (emb.cos(), emb.sin())
351
+ col_emb = self.apply_index(emb, window_index_1d_col)
352
+ col_based_embeddings = (col_emb.cos(), col_emb.sin())
353
+
354
+ cu_seqlens = torch.repeat_interleave(grid_thw[:, 1] * grid_thw[:, 2], grid_thw[:, 0]).cumsum(
355
+ dim=0, dtype=torch.int32
356
+ )
357
+ cu_seqlens = F.pad(cu_seqlens, (1, 0), value=0).to(device=x.device)
358
+
359
+ for i, blk in enumerate(self.blocks):
360
+ window_attn_type = self.vit_window_attn_types[i]
361
+
362
+ if window_attn_type == 1 and (i == 0 or self.vit_window_attn_types[i - 1] != 1):
363
+ x = self.apply_index(x, window_index_1d_col)
364
+
365
+ if i > 0 and window_attn_type != 1 and self.vit_window_attn_types[i - 1] == 1:
366
+ x = self.apply_index(x, reverse_window_index_1d_col)
367
+
368
+ position_embeddings = col_based_embeddings if window_attn_type == 1 else row_based_embeddings
369
+ full_attn = i in self.fullatt_block_indexes
370
+ x = blk(x, cu_seqlens=cu_seqlens, position_embeddings=position_embeddings, full_attn=full_attn)
371
+
372
+ return self.merger(x)
373
+
374
+
375
+
376
+
377
+ class MiMoVisionModel(PreTrainedModel):
378
+ config_class = MiMoVisionConfig
379
+ base_model_prefix = "visual"
380
+ main_input_name = "pixel_values"
381
+ _no_split_modules = ["MiMoVisionBlock"]
382
+
383
+ def __init__(self, config):
384
+ super().__init__(config)
385
+ self.visual = MiMoVisionTransformer(config)
386
+ self.post_init()
387
+
388
+ def _init_weights(self, module):
389
+ super()._init_weights(module)
390
+ if isinstance(module, MiMoVisionRotaryEmbedding):
391
+ # HF materializes nonpersistent meta buffers without running their
392
+ # constructors again. Rebuild frequencies during missing-key init.
393
+ dim = module.inv_freq.numel() * 2
394
+ frequencies = 1.0 / (10000.0 ** (torch.arange(0, dim, 2, dtype=torch.float32, device=module.inv_freq.device) / dim))
395
+ module.inv_freq.copy_(frequencies)
396
+
397
+ def forward(self, pixel_values, grid_thw):
398
+ # Parent-compatible output after LayerNorm, 2x2 merge and projector.
399
+ return self.visual(pixel_values, grid_thw)
preprocessor_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "min_pixels": 8192,
3
+ "max_pixels": 8388608,
4
+ "patch_size": 16,
5
+ "temporal_patch_size": 2,
6
+ "merge_size": 2,
7
+ "image_mean": [
8
+ 0.485,
9
+ 0.456,
10
+ 0.406
11
+ ],
12
+ "image_std": [
13
+ 0.229,
14
+ 0.224,
15
+ 0.225
16
+ ],
17
+ "image_processor_type": "Qwen2VLImageProcessor",
18
+ "processor_class": "AutoImageProcessor"
19
+ }