michael-guenther commited on
Commit
d1e5d70
·
1 Parent(s): 7719ff1

upload model

Browse files
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
adapter/adapter_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "jinaai/colqwen25-duo-base",
5
+ "bias": "none",
6
+ "fan_in_fan_out": false,
7
+ "inference_mode": false,
8
+ "init_lora_weights": "gaussian",
9
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 32,
14
+ "lora_dropout": 0.1,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 32,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": "(.*(model).*(down_proj|gate_proj|up_proj|k_proj|q_proj|v_proj|o_proj).*$|.*(custom_text_proj).*$)",
23
+ "task_type": "FEATURE_EXTRACTION",
24
+ "use_dora": false,
25
+ "use_rslora": false
26
+ }
adapter/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aaccb932268f7eb9df4c521ece7ccc251691f559e1e9d7652a45d083237ef33e
3
+ size 119802032
added_tokens.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</tool_call>": 151658,
3
+ "<tool_call>": 151657,
4
+ "<|box_end|>": 151649,
5
+ "<|box_start|>": 151648,
6
+ "<|endoftext|>": 151643,
7
+ "<|file_sep|>": 151664,
8
+ "<|fim_middle|>": 151660,
9
+ "<|fim_pad|>": 151662,
10
+ "<|fim_prefix|>": 151659,
11
+ "<|fim_suffix|>": 151661,
12
+ "<|im_end|>": 151645,
13
+ "<|im_start|>": 151644,
14
+ "<|image_pad|>": 151655,
15
+ "<|object_ref_end|>": 151647,
16
+ "<|object_ref_start|>": 151646,
17
+ "<|quad_end|>": 151651,
18
+ "<|quad_start|>": 151650,
19
+ "<|repo_name|>": 151663,
20
+ "<|video_pad|>": 151656,
21
+ "<|vision_end|>": 151653,
22
+ "<|vision_pad|>": 151654,
23
+ "<|vision_start|>": 151652
24
+ }
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}"
3
+ }
config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "jinaai/jina-embeddings-v4",
3
+ "pretrained_peft_model_name_or_path": "adapter/",
4
+ "architectures": [
5
+ "ColQwen25Duo"
6
+ ],
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_colqwen_duo.ColQwen25DuoConfig",
9
+ "AutoModel": "modeling_colqwen_duo.ColQwen25Duo"
10
+ },
11
+ "attention_dropout": 0.0,
12
+ "bos_token_id": 151643,
13
+ "eos_token_id": 151645,
14
+ "hidden_act": "silu",
15
+ "hidden_size": 2048,
16
+ "image_token_id": 151655,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 11008,
19
+ "max_position_embeddings": 128000,
20
+ "max_window_layers": 70,
21
+ "multi_vector_projector_dim": 128,
22
+ "num_attention_heads": 16,
23
+ "num_hidden_layers": 36,
24
+ "num_key_value_heads": 2,
25
+ "rms_norm_eps": 1e-06,
26
+ "rope_scaling": {
27
+ "mrope_section": [
28
+ 16,
29
+ 24,
30
+ 24
31
+ ],
32
+ "rope_type": "default",
33
+ "type": "default"
34
+ },
35
+ "rope_theta": 1000000.0,
36
+ "single_vector_pool_strategy": "mean",
37
+ "single_vector_projector_dim": 1024,
38
+ "sliding_window": 32768,
39
+ "tie_word_embeddings": true,
40
+ "torch_dtype": "bfloat16",
41
+ "transformers_version": "4.50.0.dev0",
42
+ "use_cache": true,
43
+ "use_sliding_window": false,
44
+ "video_token_id": 151656,
45
+ "vision_config": {
46
+ "hidden_size": 1280,
47
+ "in_chans": 3,
48
+ "model_type": "qwen2_5_vl",
49
+ "out_hidden_size": 2048,
50
+ "spatial_patch_size": 14,
51
+ "tokens_per_second": 2,
52
+ "torch_dtype": "bfloat16"
53
+ },
54
+ "vision_end_token_id": 151653,
55
+ "vision_start_token_id": 151652,
56
+ "vision_token_id": 151654,
57
+ "vocab_size": 151936
58
+ }
configuration_colqwen_duo.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers.models.qwen2_5_vl import Qwen2_5_VLConfig
2
+
3
+ from typing import Optional
4
+
5
+ class ColQwen25DuoConfig(Qwen2_5_VLConfig):
6
+ """
7
+ Configuration for the ColQwenDuo model.
8
+ """
9
+
10
+ def __init__(
11
+ self,
12
+ single_vector_projector_dim: int = 1024,
13
+ single_vector_pool_strategy: str = "mean",
14
+ multi_vector_projector_dim: int = 128,
15
+ pretrained_peft_model_name_or_path: Optional[str] = None,
16
+ **kwargs,
17
+ ):
18
+ super().__init__(**kwargs)
19
+ self.single_vector_projector_dim = single_vector_projector_dim
20
+ self.single_vector_pool_strategy = single_vector_pool_strategy
21
+ self.multi_vector_projector_dim = multi_vector_projector_dim
22
+ self.pretrained_peft_model_name_or_path = pretrained_peft_model_name_or_path
23
+
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 151643,
4
+ "eos_token_id": 151645,
5
+ "transformers_version": "4.50.0.dev0"
6
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b45c7afe391b4d9cc49f1ed3f6976f4a25ed40aa2165ed2ae118ff549355985
3
+ size 4997750760
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60fa9d8309324db1e44025bb6e754ea049347dbdc252d6f936cb7ec7723fe9a1
3
+ size 4972304384
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a20083234b15a57f34207bb99589241cf7531f01c09fd657110712cb634a811a
3
+ size 2516308496
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09b6f098d029dd4fadcc032d2d9da1914204d098c04a5a38f19bba23beb3039c
3
+ size 4932949248
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa99a4bf5f586e0f6aa2e941a66283afc98df2a8c726496f717ff7939ec70651
3
+ size 4932949336
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:323962b41aff7d21692bd827ab70dcec1c53f63a63f64f8287c3579b09f1d16a
3
+ size 189822408
model.safetensors.index.json ADDED
@@ -0,0 +1,835 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 7513966848
4
+ },
5
+ "weight_map": {
6
+ "model.embed_tokens.weight": "model-00001-of-00002.safetensors",
7
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
8
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
9
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
10
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
11
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
12
+ "model.layers.0.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
13
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
15
+ "model.layers.0.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
16
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
17
+ "model.layers.0.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
18
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
19
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
20
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
21
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
22
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
23
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
24
+ "model.layers.1.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
25
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
26
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
27
+ "model.layers.1.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
28
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
29
+ "model.layers.1.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
30
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
31
+ "model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
32
+ "model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
33
+ "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
34
+ "model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
35
+ "model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
36
+ "model.layers.10.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
37
+ "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
38
+ "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
39
+ "model.layers.10.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
40
+ "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
41
+ "model.layers.10.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
42
+ "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
43
+ "model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
44
+ "model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
45
+ "model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
46
+ "model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
47
+ "model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
48
+ "model.layers.11.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
49
+ "model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
50
+ "model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
51
+ "model.layers.11.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
52
+ "model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
53
+ "model.layers.11.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
54
+ "model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
55
+ "model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
56
+ "model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
57
+ "model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
58
+ "model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
59
+ "model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
60
+ "model.layers.12.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
61
+ "model.layers.12.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
62
+ "model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
63
+ "model.layers.12.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
64
+ "model.layers.12.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
65
+ "model.layers.12.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
66
+ "model.layers.12.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
67
+ "model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
68
+ "model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
69
+ "model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
70
+ "model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
71
+ "model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
72
+ "model.layers.13.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
73
+ "model.layers.13.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
74
+ "model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
75
+ "model.layers.13.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
76
+ "model.layers.13.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
77
+ "model.layers.13.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
78
+ "model.layers.13.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
79
+ "model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
80
+ "model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
81
+ "model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
82
+ "model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
83
+ "model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
84
+ "model.layers.14.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
85
+ "model.layers.14.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
86
+ "model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
87
+ "model.layers.14.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
88
+ "model.layers.14.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
89
+ "model.layers.14.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
90
+ "model.layers.14.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
91
+ "model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
92
+ "model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
93
+ "model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
94
+ "model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
95
+ "model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
96
+ "model.layers.15.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
97
+ "model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
98
+ "model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
99
+ "model.layers.15.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
100
+ "model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
101
+ "model.layers.15.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
102
+ "model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
103
+ "model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
104
+ "model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
105
+ "model.layers.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
106
+ "model.layers.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
107
+ "model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
108
+ "model.layers.16.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
109
+ "model.layers.16.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
110
+ "model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
111
+ "model.layers.16.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
112
+ "model.layers.16.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
113
+ "model.layers.16.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
114
+ "model.layers.16.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
115
+ "model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
116
+ "model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
117
+ "model.layers.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
118
+ "model.layers.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
119
+ "model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
120
+ "model.layers.17.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
121
+ "model.layers.17.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
122
+ "model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
123
+ "model.layers.17.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
124
+ "model.layers.17.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
125
+ "model.layers.17.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
126
+ "model.layers.17.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
127
+ "model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
128
+ "model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
129
+ "model.layers.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
130
+ "model.layers.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
131
+ "model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
132
+ "model.layers.18.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
133
+ "model.layers.18.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
134
+ "model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
135
+ "model.layers.18.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
136
+ "model.layers.18.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
137
+ "model.layers.18.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
138
+ "model.layers.18.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
139
+ "model.layers.19.input_layernorm.weight": "model-00002-of-00002.safetensors",
140
+ "model.layers.19.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
141
+ "model.layers.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
142
+ "model.layers.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
143
+ "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
144
+ "model.layers.19.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
145
+ "model.layers.19.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
146
+ "model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
147
+ "model.layers.19.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
148
+ "model.layers.19.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
149
+ "model.layers.19.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
150
+ "model.layers.19.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
151
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
152
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
153
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
154
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
155
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
156
+ "model.layers.2.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
157
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
158
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
159
+ "model.layers.2.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
160
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
161
+ "model.layers.2.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
162
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
163
+ "model.layers.20.input_layernorm.weight": "model-00002-of-00002.safetensors",
164
+ "model.layers.20.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
165
+ "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
166
+ "model.layers.20.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
167
+ "model.layers.20.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
168
+ "model.layers.20.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
169
+ "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
170
+ "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
171
+ "model.layers.20.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
172
+ "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
173
+ "model.layers.20.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
174
+ "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
175
+ "model.layers.21.input_layernorm.weight": "model-00002-of-00002.safetensors",
176
+ "model.layers.21.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
177
+ "model.layers.21.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
178
+ "model.layers.21.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
179
+ "model.layers.21.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
180
+ "model.layers.21.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
181
+ "model.layers.21.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
182
+ "model.layers.21.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
183
+ "model.layers.21.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
184
+ "model.layers.21.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
185
+ "model.layers.21.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
186
+ "model.layers.21.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
187
+ "model.layers.22.input_layernorm.weight": "model-00002-of-00002.safetensors",
188
+ "model.layers.22.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
189
+ "model.layers.22.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
190
+ "model.layers.22.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
191
+ "model.layers.22.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
192
+ "model.layers.22.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
193
+ "model.layers.22.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
194
+ "model.layers.22.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
195
+ "model.layers.22.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
196
+ "model.layers.22.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
197
+ "model.layers.22.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
198
+ "model.layers.22.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
199
+ "model.layers.23.input_layernorm.weight": "model-00002-of-00002.safetensors",
200
+ "model.layers.23.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
201
+ "model.layers.23.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
202
+ "model.layers.23.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
203
+ "model.layers.23.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
204
+ "model.layers.23.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
205
+ "model.layers.23.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
206
+ "model.layers.23.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
207
+ "model.layers.23.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
208
+ "model.layers.23.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
209
+ "model.layers.23.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
210
+ "model.layers.23.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
211
+ "model.layers.24.input_layernorm.weight": "model-00002-of-00002.safetensors",
212
+ "model.layers.24.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
213
+ "model.layers.24.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
214
+ "model.layers.24.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
215
+ "model.layers.24.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
216
+ "model.layers.24.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
217
+ "model.layers.24.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
218
+ "model.layers.24.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
219
+ "model.layers.24.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
220
+ "model.layers.24.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
221
+ "model.layers.24.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
222
+ "model.layers.24.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
223
+ "model.layers.25.input_layernorm.weight": "model-00002-of-00002.safetensors",
224
+ "model.layers.25.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
225
+ "model.layers.25.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
226
+ "model.layers.25.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
227
+ "model.layers.25.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
228
+ "model.layers.25.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
229
+ "model.layers.25.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
230
+ "model.layers.25.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
231
+ "model.layers.25.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
232
+ "model.layers.25.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
233
+ "model.layers.25.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
234
+ "model.layers.25.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
235
+ "model.layers.26.input_layernorm.weight": "model-00002-of-00002.safetensors",
236
+ "model.layers.26.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
237
+ "model.layers.26.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
238
+ "model.layers.26.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
239
+ "model.layers.26.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
240
+ "model.layers.26.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
241
+ "model.layers.26.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
242
+ "model.layers.26.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
243
+ "model.layers.26.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
244
+ "model.layers.26.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
245
+ "model.layers.26.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
246
+ "model.layers.26.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
247
+ "model.layers.27.input_layernorm.weight": "model-00002-of-00002.safetensors",
248
+ "model.layers.27.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
249
+ "model.layers.27.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
250
+ "model.layers.27.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
251
+ "model.layers.27.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
252
+ "model.layers.27.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
253
+ "model.layers.27.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
254
+ "model.layers.27.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
255
+ "model.layers.27.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
256
+ "model.layers.27.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
257
+ "model.layers.27.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
258
+ "model.layers.27.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
259
+ "model.layers.28.input_layernorm.weight": "model-00002-of-00002.safetensors",
260
+ "model.layers.28.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
261
+ "model.layers.28.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
262
+ "model.layers.28.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
263
+ "model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
264
+ "model.layers.28.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
265
+ "model.layers.28.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
266
+ "model.layers.28.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
267
+ "model.layers.28.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
268
+ "model.layers.28.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
269
+ "model.layers.28.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
270
+ "model.layers.28.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
271
+ "model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
272
+ "model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
273
+ "model.layers.29.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
274
+ "model.layers.29.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
275
+ "model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
276
+ "model.layers.29.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
277
+ "model.layers.29.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
278
+ "model.layers.29.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
279
+ "model.layers.29.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
280
+ "model.layers.29.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
281
+ "model.layers.29.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
282
+ "model.layers.29.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
283
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
284
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
285
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
286
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
287
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
288
+ "model.layers.3.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
289
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
290
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
291
+ "model.layers.3.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
292
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
293
+ "model.layers.3.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
294
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
295
+ "model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
296
+ "model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
297
+ "model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
298
+ "model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
299
+ "model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
300
+ "model.layers.30.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
301
+ "model.layers.30.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
302
+ "model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
303
+ "model.layers.30.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
304
+ "model.layers.30.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
305
+ "model.layers.30.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
306
+ "model.layers.30.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
307
+ "model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
308
+ "model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
309
+ "model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
310
+ "model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
311
+ "model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
312
+ "model.layers.31.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
313
+ "model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
314
+ "model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
315
+ "model.layers.31.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
316
+ "model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
317
+ "model.layers.31.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
318
+ "model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
319
+ "model.layers.32.input_layernorm.weight": "model-00002-of-00002.safetensors",
320
+ "model.layers.32.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
321
+ "model.layers.32.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
322
+ "model.layers.32.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
323
+ "model.layers.32.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
324
+ "model.layers.32.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
325
+ "model.layers.32.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
326
+ "model.layers.32.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
327
+ "model.layers.32.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
328
+ "model.layers.32.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
329
+ "model.layers.32.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
330
+ "model.layers.32.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
331
+ "model.layers.33.input_layernorm.weight": "model-00002-of-00002.safetensors",
332
+ "model.layers.33.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
333
+ "model.layers.33.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
334
+ "model.layers.33.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
335
+ "model.layers.33.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
336
+ "model.layers.33.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
337
+ "model.layers.33.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
338
+ "model.layers.33.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
339
+ "model.layers.33.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
340
+ "model.layers.33.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
341
+ "model.layers.33.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
342
+ "model.layers.33.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
343
+ "model.layers.34.input_layernorm.weight": "model-00002-of-00002.safetensors",
344
+ "model.layers.34.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
345
+ "model.layers.34.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
346
+ "model.layers.34.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
347
+ "model.layers.34.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
348
+ "model.layers.34.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
349
+ "model.layers.34.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
350
+ "model.layers.34.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
351
+ "model.layers.34.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
352
+ "model.layers.34.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
353
+ "model.layers.34.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
354
+ "model.layers.34.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
355
+ "model.layers.35.input_layernorm.weight": "model-00002-of-00002.safetensors",
356
+ "model.layers.35.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
357
+ "model.layers.35.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
358
+ "model.layers.35.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
359
+ "model.layers.35.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
360
+ "model.layers.35.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
361
+ "model.layers.35.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
362
+ "model.layers.35.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
363
+ "model.layers.35.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
364
+ "model.layers.35.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
365
+ "model.layers.35.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
366
+ "model.layers.35.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
367
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
368
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
369
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
370
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
371
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
372
+ "model.layers.4.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
373
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
374
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
375
+ "model.layers.4.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
376
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
377
+ "model.layers.4.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
378
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
379
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
380
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
381
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
382
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
383
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
384
+ "model.layers.5.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
385
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
386
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
387
+ "model.layers.5.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
388
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
389
+ "model.layers.5.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
390
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
391
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
392
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
393
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
394
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
395
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
396
+ "model.layers.6.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
397
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
398
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
399
+ "model.layers.6.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
400
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
401
+ "model.layers.6.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
402
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
403
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
404
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
405
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
406
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
407
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
408
+ "model.layers.7.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
409
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
410
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
411
+ "model.layers.7.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
412
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
413
+ "model.layers.7.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
414
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
415
+ "model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
416
+ "model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
417
+ "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
418
+ "model.layers.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
419
+ "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
420
+ "model.layers.8.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
421
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
422
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
423
+ "model.layers.8.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
424
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
425
+ "model.layers.8.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
426
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
427
+ "model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
428
+ "model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
429
+ "model.layers.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
430
+ "model.layers.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
431
+ "model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
432
+ "model.layers.9.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
433
+ "model.layers.9.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
434
+ "model.layers.9.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
435
+ "model.layers.9.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
436
+ "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
437
+ "model.layers.9.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
438
+ "model.layers.9.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
439
+ "model.norm.weight": "model-00002-of-00002.safetensors",
440
+ "multi_vector_projector.bias": "model-00002-of-00002.safetensors",
441
+ "multi_vector_projector.weight": "model-00002-of-00002.safetensors",
442
+ "single_vector_projector.bias": "model-00002-of-00002.safetensors",
443
+ "single_vector_projector.weight": "model-00002-of-00002.safetensors",
444
+ "visual.blocks.0.attn.proj.bias": "model-00001-of-00002.safetensors",
445
+ "visual.blocks.0.attn.proj.weight": "model-00001-of-00002.safetensors",
446
+ "visual.blocks.0.attn.qkv.bias": "model-00001-of-00002.safetensors",
447
+ "visual.blocks.0.attn.qkv.weight": "model-00001-of-00002.safetensors",
448
+ "visual.blocks.0.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
449
+ "visual.blocks.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
450
+ "visual.blocks.0.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
451
+ "visual.blocks.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
452
+ "visual.blocks.0.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
453
+ "visual.blocks.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
454
+ "visual.blocks.0.norm1.weight": "model-00001-of-00002.safetensors",
455
+ "visual.blocks.0.norm2.weight": "model-00001-of-00002.safetensors",
456
+ "visual.blocks.1.attn.proj.bias": "model-00001-of-00002.safetensors",
457
+ "visual.blocks.1.attn.proj.weight": "model-00001-of-00002.safetensors",
458
+ "visual.blocks.1.attn.qkv.bias": "model-00001-of-00002.safetensors",
459
+ "visual.blocks.1.attn.qkv.weight": "model-00001-of-00002.safetensors",
460
+ "visual.blocks.1.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
461
+ "visual.blocks.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
462
+ "visual.blocks.1.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
463
+ "visual.blocks.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
464
+ "visual.blocks.1.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
465
+ "visual.blocks.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
466
+ "visual.blocks.1.norm1.weight": "model-00001-of-00002.safetensors",
467
+ "visual.blocks.1.norm2.weight": "model-00001-of-00002.safetensors",
468
+ "visual.blocks.10.attn.proj.bias": "model-00001-of-00002.safetensors",
469
+ "visual.blocks.10.attn.proj.weight": "model-00001-of-00002.safetensors",
470
+ "visual.blocks.10.attn.qkv.bias": "model-00001-of-00002.safetensors",
471
+ "visual.blocks.10.attn.qkv.weight": "model-00001-of-00002.safetensors",
472
+ "visual.blocks.10.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
473
+ "visual.blocks.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
474
+ "visual.blocks.10.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
475
+ "visual.blocks.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
476
+ "visual.blocks.10.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
477
+ "visual.blocks.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
478
+ "visual.blocks.10.norm1.weight": "model-00001-of-00002.safetensors",
479
+ "visual.blocks.10.norm2.weight": "model-00001-of-00002.safetensors",
480
+ "visual.blocks.11.attn.proj.bias": "model-00001-of-00002.safetensors",
481
+ "visual.blocks.11.attn.proj.weight": "model-00001-of-00002.safetensors",
482
+ "visual.blocks.11.attn.qkv.bias": "model-00001-of-00002.safetensors",
483
+ "visual.blocks.11.attn.qkv.weight": "model-00001-of-00002.safetensors",
484
+ "visual.blocks.11.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
485
+ "visual.blocks.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
486
+ "visual.blocks.11.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
487
+ "visual.blocks.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
488
+ "visual.blocks.11.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
489
+ "visual.blocks.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
490
+ "visual.blocks.11.norm1.weight": "model-00001-of-00002.safetensors",
491
+ "visual.blocks.11.norm2.weight": "model-00001-of-00002.safetensors",
492
+ "visual.blocks.12.attn.proj.bias": "model-00001-of-00002.safetensors",
493
+ "visual.blocks.12.attn.proj.weight": "model-00001-of-00002.safetensors",
494
+ "visual.blocks.12.attn.qkv.bias": "model-00001-of-00002.safetensors",
495
+ "visual.blocks.12.attn.qkv.weight": "model-00001-of-00002.safetensors",
496
+ "visual.blocks.12.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
497
+ "visual.blocks.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
498
+ "visual.blocks.12.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
499
+ "visual.blocks.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
500
+ "visual.blocks.12.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
501
+ "visual.blocks.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
502
+ "visual.blocks.12.norm1.weight": "model-00001-of-00002.safetensors",
503
+ "visual.blocks.12.norm2.weight": "model-00001-of-00002.safetensors",
504
+ "visual.blocks.13.attn.proj.bias": "model-00001-of-00002.safetensors",
505
+ "visual.blocks.13.attn.proj.weight": "model-00001-of-00002.safetensors",
506
+ "visual.blocks.13.attn.qkv.bias": "model-00001-of-00002.safetensors",
507
+ "visual.blocks.13.attn.qkv.weight": "model-00001-of-00002.safetensors",
508
+ "visual.blocks.13.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
509
+ "visual.blocks.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
510
+ "visual.blocks.13.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
511
+ "visual.blocks.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
512
+ "visual.blocks.13.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
513
+ "visual.blocks.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
514
+ "visual.blocks.13.norm1.weight": "model-00001-of-00002.safetensors",
515
+ "visual.blocks.13.norm2.weight": "model-00001-of-00002.safetensors",
516
+ "visual.blocks.14.attn.proj.bias": "model-00001-of-00002.safetensors",
517
+ "visual.blocks.14.attn.proj.weight": "model-00001-of-00002.safetensors",
518
+ "visual.blocks.14.attn.qkv.bias": "model-00001-of-00002.safetensors",
519
+ "visual.blocks.14.attn.qkv.weight": "model-00001-of-00002.safetensors",
520
+ "visual.blocks.14.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
521
+ "visual.blocks.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
522
+ "visual.blocks.14.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
523
+ "visual.blocks.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
524
+ "visual.blocks.14.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
525
+ "visual.blocks.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
526
+ "visual.blocks.14.norm1.weight": "model-00001-of-00002.safetensors",
527
+ "visual.blocks.14.norm2.weight": "model-00001-of-00002.safetensors",
528
+ "visual.blocks.15.attn.proj.bias": "model-00001-of-00002.safetensors",
529
+ "visual.blocks.15.attn.proj.weight": "model-00001-of-00002.safetensors",
530
+ "visual.blocks.15.attn.qkv.bias": "model-00001-of-00002.safetensors",
531
+ "visual.blocks.15.attn.qkv.weight": "model-00001-of-00002.safetensors",
532
+ "visual.blocks.15.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
533
+ "visual.blocks.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
534
+ "visual.blocks.15.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
535
+ "visual.blocks.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
536
+ "visual.blocks.15.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
537
+ "visual.blocks.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
538
+ "visual.blocks.15.norm1.weight": "model-00001-of-00002.safetensors",
539
+ "visual.blocks.15.norm2.weight": "model-00001-of-00002.safetensors",
540
+ "visual.blocks.16.attn.proj.bias": "model-00001-of-00002.safetensors",
541
+ "visual.blocks.16.attn.proj.weight": "model-00001-of-00002.safetensors",
542
+ "visual.blocks.16.attn.qkv.bias": "model-00001-of-00002.safetensors",
543
+ "visual.blocks.16.attn.qkv.weight": "model-00001-of-00002.safetensors",
544
+ "visual.blocks.16.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
545
+ "visual.blocks.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
546
+ "visual.blocks.16.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
547
+ "visual.blocks.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
548
+ "visual.blocks.16.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
549
+ "visual.blocks.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
550
+ "visual.blocks.16.norm1.weight": "model-00001-of-00002.safetensors",
551
+ "visual.blocks.16.norm2.weight": "model-00001-of-00002.safetensors",
552
+ "visual.blocks.17.attn.proj.bias": "model-00001-of-00002.safetensors",
553
+ "visual.blocks.17.attn.proj.weight": "model-00001-of-00002.safetensors",
554
+ "visual.blocks.17.attn.qkv.bias": "model-00001-of-00002.safetensors",
555
+ "visual.blocks.17.attn.qkv.weight": "model-00001-of-00002.safetensors",
556
+ "visual.blocks.17.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
557
+ "visual.blocks.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
558
+ "visual.blocks.17.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
559
+ "visual.blocks.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
560
+ "visual.blocks.17.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
561
+ "visual.blocks.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
562
+ "visual.blocks.17.norm1.weight": "model-00001-of-00002.safetensors",
563
+ "visual.blocks.17.norm2.weight": "model-00001-of-00002.safetensors",
564
+ "visual.blocks.18.attn.proj.bias": "model-00001-of-00002.safetensors",
565
+ "visual.blocks.18.attn.proj.weight": "model-00001-of-00002.safetensors",
566
+ "visual.blocks.18.attn.qkv.bias": "model-00001-of-00002.safetensors",
567
+ "visual.blocks.18.attn.qkv.weight": "model-00001-of-00002.safetensors",
568
+ "visual.blocks.18.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
569
+ "visual.blocks.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
570
+ "visual.blocks.18.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
571
+ "visual.blocks.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
572
+ "visual.blocks.18.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
573
+ "visual.blocks.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
574
+ "visual.blocks.18.norm1.weight": "model-00001-of-00002.safetensors",
575
+ "visual.blocks.18.norm2.weight": "model-00001-of-00002.safetensors",
576
+ "visual.blocks.19.attn.proj.bias": "model-00001-of-00002.safetensors",
577
+ "visual.blocks.19.attn.proj.weight": "model-00001-of-00002.safetensors",
578
+ "visual.blocks.19.attn.qkv.bias": "model-00001-of-00002.safetensors",
579
+ "visual.blocks.19.attn.qkv.weight": "model-00001-of-00002.safetensors",
580
+ "visual.blocks.19.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
581
+ "visual.blocks.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
582
+ "visual.blocks.19.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
583
+ "visual.blocks.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
584
+ "visual.blocks.19.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
585
+ "visual.blocks.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
586
+ "visual.blocks.19.norm1.weight": "model-00001-of-00002.safetensors",
587
+ "visual.blocks.19.norm2.weight": "model-00001-of-00002.safetensors",
588
+ "visual.blocks.2.attn.proj.bias": "model-00001-of-00002.safetensors",
589
+ "visual.blocks.2.attn.proj.weight": "model-00001-of-00002.safetensors",
590
+ "visual.blocks.2.attn.qkv.bias": "model-00001-of-00002.safetensors",
591
+ "visual.blocks.2.attn.qkv.weight": "model-00001-of-00002.safetensors",
592
+ "visual.blocks.2.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
593
+ "visual.blocks.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
594
+ "visual.blocks.2.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
595
+ "visual.blocks.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
596
+ "visual.blocks.2.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
597
+ "visual.blocks.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
598
+ "visual.blocks.2.norm1.weight": "model-00001-of-00002.safetensors",
599
+ "visual.blocks.2.norm2.weight": "model-00001-of-00002.safetensors",
600
+ "visual.blocks.20.attn.proj.bias": "model-00001-of-00002.safetensors",
601
+ "visual.blocks.20.attn.proj.weight": "model-00001-of-00002.safetensors",
602
+ "visual.blocks.20.attn.qkv.bias": "model-00001-of-00002.safetensors",
603
+ "visual.blocks.20.attn.qkv.weight": "model-00001-of-00002.safetensors",
604
+ "visual.blocks.20.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
605
+ "visual.blocks.20.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
606
+ "visual.blocks.20.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
607
+ "visual.blocks.20.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
608
+ "visual.blocks.20.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
609
+ "visual.blocks.20.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
610
+ "visual.blocks.20.norm1.weight": "model-00001-of-00002.safetensors",
611
+ "visual.blocks.20.norm2.weight": "model-00001-of-00002.safetensors",
612
+ "visual.blocks.21.attn.proj.bias": "model-00001-of-00002.safetensors",
613
+ "visual.blocks.21.attn.proj.weight": "model-00001-of-00002.safetensors",
614
+ "visual.blocks.21.attn.qkv.bias": "model-00001-of-00002.safetensors",
615
+ "visual.blocks.21.attn.qkv.weight": "model-00001-of-00002.safetensors",
616
+ "visual.blocks.21.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
617
+ "visual.blocks.21.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
618
+ "visual.blocks.21.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
619
+ "visual.blocks.21.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
620
+ "visual.blocks.21.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
621
+ "visual.blocks.21.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
622
+ "visual.blocks.21.norm1.weight": "model-00001-of-00002.safetensors",
623
+ "visual.blocks.21.norm2.weight": "model-00001-of-00002.safetensors",
624
+ "visual.blocks.22.attn.proj.bias": "model-00001-of-00002.safetensors",
625
+ "visual.blocks.22.attn.proj.weight": "model-00001-of-00002.safetensors",
626
+ "visual.blocks.22.attn.qkv.bias": "model-00001-of-00002.safetensors",
627
+ "visual.blocks.22.attn.qkv.weight": "model-00001-of-00002.safetensors",
628
+ "visual.blocks.22.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
629
+ "visual.blocks.22.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
630
+ "visual.blocks.22.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
631
+ "visual.blocks.22.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
632
+ "visual.blocks.22.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
633
+ "visual.blocks.22.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
634
+ "visual.blocks.22.norm1.weight": "model-00001-of-00002.safetensors",
635
+ "visual.blocks.22.norm2.weight": "model-00001-of-00002.safetensors",
636
+ "visual.blocks.23.attn.proj.bias": "model-00001-of-00002.safetensors",
637
+ "visual.blocks.23.attn.proj.weight": "model-00001-of-00002.safetensors",
638
+ "visual.blocks.23.attn.qkv.bias": "model-00001-of-00002.safetensors",
639
+ "visual.blocks.23.attn.qkv.weight": "model-00001-of-00002.safetensors",
640
+ "visual.blocks.23.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
641
+ "visual.blocks.23.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
642
+ "visual.blocks.23.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
643
+ "visual.blocks.23.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
644
+ "visual.blocks.23.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
645
+ "visual.blocks.23.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
646
+ "visual.blocks.23.norm1.weight": "model-00001-of-00002.safetensors",
647
+ "visual.blocks.23.norm2.weight": "model-00001-of-00002.safetensors",
648
+ "visual.blocks.24.attn.proj.bias": "model-00001-of-00002.safetensors",
649
+ "visual.blocks.24.attn.proj.weight": "model-00001-of-00002.safetensors",
650
+ "visual.blocks.24.attn.qkv.bias": "model-00001-of-00002.safetensors",
651
+ "visual.blocks.24.attn.qkv.weight": "model-00001-of-00002.safetensors",
652
+ "visual.blocks.24.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
653
+ "visual.blocks.24.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
654
+ "visual.blocks.24.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
655
+ "visual.blocks.24.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
656
+ "visual.blocks.24.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
657
+ "visual.blocks.24.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
658
+ "visual.blocks.24.norm1.weight": "model-00001-of-00002.safetensors",
659
+ "visual.blocks.24.norm2.weight": "model-00001-of-00002.safetensors",
660
+ "visual.blocks.25.attn.proj.bias": "model-00001-of-00002.safetensors",
661
+ "visual.blocks.25.attn.proj.weight": "model-00001-of-00002.safetensors",
662
+ "visual.blocks.25.attn.qkv.bias": "model-00001-of-00002.safetensors",
663
+ "visual.blocks.25.attn.qkv.weight": "model-00001-of-00002.safetensors",
664
+ "visual.blocks.25.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
665
+ "visual.blocks.25.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
666
+ "visual.blocks.25.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
667
+ "visual.blocks.25.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
668
+ "visual.blocks.25.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
669
+ "visual.blocks.25.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
670
+ "visual.blocks.25.norm1.weight": "model-00001-of-00002.safetensors",
671
+ "visual.blocks.25.norm2.weight": "model-00001-of-00002.safetensors",
672
+ "visual.blocks.26.attn.proj.bias": "model-00001-of-00002.safetensors",
673
+ "visual.blocks.26.attn.proj.weight": "model-00001-of-00002.safetensors",
674
+ "visual.blocks.26.attn.qkv.bias": "model-00001-of-00002.safetensors",
675
+ "visual.blocks.26.attn.qkv.weight": "model-00001-of-00002.safetensors",
676
+ "visual.blocks.26.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
677
+ "visual.blocks.26.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
678
+ "visual.blocks.26.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
679
+ "visual.blocks.26.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
680
+ "visual.blocks.26.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
681
+ "visual.blocks.26.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
682
+ "visual.blocks.26.norm1.weight": "model-00001-of-00002.safetensors",
683
+ "visual.blocks.26.norm2.weight": "model-00001-of-00002.safetensors",
684
+ "visual.blocks.27.attn.proj.bias": "model-00001-of-00002.safetensors",
685
+ "visual.blocks.27.attn.proj.weight": "model-00001-of-00002.safetensors",
686
+ "visual.blocks.27.attn.qkv.bias": "model-00001-of-00002.safetensors",
687
+ "visual.blocks.27.attn.qkv.weight": "model-00001-of-00002.safetensors",
688
+ "visual.blocks.27.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
689
+ "visual.blocks.27.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
690
+ "visual.blocks.27.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
691
+ "visual.blocks.27.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
692
+ "visual.blocks.27.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
693
+ "visual.blocks.27.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
694
+ "visual.blocks.27.norm1.weight": "model-00001-of-00002.safetensors",
695
+ "visual.blocks.27.norm2.weight": "model-00001-of-00002.safetensors",
696
+ "visual.blocks.28.attn.proj.bias": "model-00001-of-00002.safetensors",
697
+ "visual.blocks.28.attn.proj.weight": "model-00001-of-00002.safetensors",
698
+ "visual.blocks.28.attn.qkv.bias": "model-00001-of-00002.safetensors",
699
+ "visual.blocks.28.attn.qkv.weight": "model-00001-of-00002.safetensors",
700
+ "visual.blocks.28.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
701
+ "visual.blocks.28.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
702
+ "visual.blocks.28.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
703
+ "visual.blocks.28.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
704
+ "visual.blocks.28.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
705
+ "visual.blocks.28.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
706
+ "visual.blocks.28.norm1.weight": "model-00001-of-00002.safetensors",
707
+ "visual.blocks.28.norm2.weight": "model-00001-of-00002.safetensors",
708
+ "visual.blocks.29.attn.proj.bias": "model-00001-of-00002.safetensors",
709
+ "visual.blocks.29.attn.proj.weight": "model-00001-of-00002.safetensors",
710
+ "visual.blocks.29.attn.qkv.bias": "model-00001-of-00002.safetensors",
711
+ "visual.blocks.29.attn.qkv.weight": "model-00001-of-00002.safetensors",
712
+ "visual.blocks.29.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
713
+ "visual.blocks.29.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
714
+ "visual.blocks.29.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
715
+ "visual.blocks.29.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
716
+ "visual.blocks.29.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
717
+ "visual.blocks.29.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
718
+ "visual.blocks.29.norm1.weight": "model-00001-of-00002.safetensors",
719
+ "visual.blocks.29.norm2.weight": "model-00001-of-00002.safetensors",
720
+ "visual.blocks.3.attn.proj.bias": "model-00001-of-00002.safetensors",
721
+ "visual.blocks.3.attn.proj.weight": "model-00001-of-00002.safetensors",
722
+ "visual.blocks.3.attn.qkv.bias": "model-00001-of-00002.safetensors",
723
+ "visual.blocks.3.attn.qkv.weight": "model-00001-of-00002.safetensors",
724
+ "visual.blocks.3.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
725
+ "visual.blocks.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
726
+ "visual.blocks.3.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
727
+ "visual.blocks.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
728
+ "visual.blocks.3.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
729
+ "visual.blocks.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
730
+ "visual.blocks.3.norm1.weight": "model-00001-of-00002.safetensors",
731
+ "visual.blocks.3.norm2.weight": "model-00001-of-00002.safetensors",
732
+ "visual.blocks.30.attn.proj.bias": "model-00001-of-00002.safetensors",
733
+ "visual.blocks.30.attn.proj.weight": "model-00001-of-00002.safetensors",
734
+ "visual.blocks.30.attn.qkv.bias": "model-00001-of-00002.safetensors",
735
+ "visual.blocks.30.attn.qkv.weight": "model-00001-of-00002.safetensors",
736
+ "visual.blocks.30.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
737
+ "visual.blocks.30.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
738
+ "visual.blocks.30.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
739
+ "visual.blocks.30.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
740
+ "visual.blocks.30.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
741
+ "visual.blocks.30.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
742
+ "visual.blocks.30.norm1.weight": "model-00001-of-00002.safetensors",
743
+ "visual.blocks.30.norm2.weight": "model-00001-of-00002.safetensors",
744
+ "visual.blocks.31.attn.proj.bias": "model-00001-of-00002.safetensors",
745
+ "visual.blocks.31.attn.proj.weight": "model-00001-of-00002.safetensors",
746
+ "visual.blocks.31.attn.qkv.bias": "model-00001-of-00002.safetensors",
747
+ "visual.blocks.31.attn.qkv.weight": "model-00001-of-00002.safetensors",
748
+ "visual.blocks.31.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
749
+ "visual.blocks.31.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
750
+ "visual.blocks.31.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
751
+ "visual.blocks.31.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
752
+ "visual.blocks.31.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
753
+ "visual.blocks.31.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
754
+ "visual.blocks.31.norm1.weight": "model-00001-of-00002.safetensors",
755
+ "visual.blocks.31.norm2.weight": "model-00001-of-00002.safetensors",
756
+ "visual.blocks.4.attn.proj.bias": "model-00001-of-00002.safetensors",
757
+ "visual.blocks.4.attn.proj.weight": "model-00001-of-00002.safetensors",
758
+ "visual.blocks.4.attn.qkv.bias": "model-00001-of-00002.safetensors",
759
+ "visual.blocks.4.attn.qkv.weight": "model-00001-of-00002.safetensors",
760
+ "visual.blocks.4.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
761
+ "visual.blocks.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
762
+ "visual.blocks.4.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
763
+ "visual.blocks.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
764
+ "visual.blocks.4.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
765
+ "visual.blocks.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
766
+ "visual.blocks.4.norm1.weight": "model-00001-of-00002.safetensors",
767
+ "visual.blocks.4.norm2.weight": "model-00001-of-00002.safetensors",
768
+ "visual.blocks.5.attn.proj.bias": "model-00001-of-00002.safetensors",
769
+ "visual.blocks.5.attn.proj.weight": "model-00001-of-00002.safetensors",
770
+ "visual.blocks.5.attn.qkv.bias": "model-00001-of-00002.safetensors",
771
+ "visual.blocks.5.attn.qkv.weight": "model-00001-of-00002.safetensors",
772
+ "visual.blocks.5.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
773
+ "visual.blocks.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
774
+ "visual.blocks.5.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
775
+ "visual.blocks.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
776
+ "visual.blocks.5.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
777
+ "visual.blocks.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
778
+ "visual.blocks.5.norm1.weight": "model-00001-of-00002.safetensors",
779
+ "visual.blocks.5.norm2.weight": "model-00001-of-00002.safetensors",
780
+ "visual.blocks.6.attn.proj.bias": "model-00001-of-00002.safetensors",
781
+ "visual.blocks.6.attn.proj.weight": "model-00001-of-00002.safetensors",
782
+ "visual.blocks.6.attn.qkv.bias": "model-00001-of-00002.safetensors",
783
+ "visual.blocks.6.attn.qkv.weight": "model-00001-of-00002.safetensors",
784
+ "visual.blocks.6.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
785
+ "visual.blocks.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
786
+ "visual.blocks.6.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
787
+ "visual.blocks.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
788
+ "visual.blocks.6.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
789
+ "visual.blocks.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
790
+ "visual.blocks.6.norm1.weight": "model-00001-of-00002.safetensors",
791
+ "visual.blocks.6.norm2.weight": "model-00001-of-00002.safetensors",
792
+ "visual.blocks.7.attn.proj.bias": "model-00001-of-00002.safetensors",
793
+ "visual.blocks.7.attn.proj.weight": "model-00001-of-00002.safetensors",
794
+ "visual.blocks.7.attn.qkv.bias": "model-00001-of-00002.safetensors",
795
+ "visual.blocks.7.attn.qkv.weight": "model-00001-of-00002.safetensors",
796
+ "visual.blocks.7.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
797
+ "visual.blocks.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
798
+ "visual.blocks.7.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
799
+ "visual.blocks.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
800
+ "visual.blocks.7.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
801
+ "visual.blocks.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
802
+ "visual.blocks.7.norm1.weight": "model-00001-of-00002.safetensors",
803
+ "visual.blocks.7.norm2.weight": "model-00001-of-00002.safetensors",
804
+ "visual.blocks.8.attn.proj.bias": "model-00001-of-00002.safetensors",
805
+ "visual.blocks.8.attn.proj.weight": "model-00001-of-00002.safetensors",
806
+ "visual.blocks.8.attn.qkv.bias": "model-00001-of-00002.safetensors",
807
+ "visual.blocks.8.attn.qkv.weight": "model-00001-of-00002.safetensors",
808
+ "visual.blocks.8.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
809
+ "visual.blocks.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
810
+ "visual.blocks.8.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
811
+ "visual.blocks.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
812
+ "visual.blocks.8.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
813
+ "visual.blocks.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
814
+ "visual.blocks.8.norm1.weight": "model-00001-of-00002.safetensors",
815
+ "visual.blocks.8.norm2.weight": "model-00001-of-00002.safetensors",
816
+ "visual.blocks.9.attn.proj.bias": "model-00001-of-00002.safetensors",
817
+ "visual.blocks.9.attn.proj.weight": "model-00001-of-00002.safetensors",
818
+ "visual.blocks.9.attn.qkv.bias": "model-00001-of-00002.safetensors",
819
+ "visual.blocks.9.attn.qkv.weight": "model-00001-of-00002.safetensors",
820
+ "visual.blocks.9.mlp.down_proj.bias": "model-00001-of-00002.safetensors",
821
+ "visual.blocks.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
822
+ "visual.blocks.9.mlp.gate_proj.bias": "model-00001-of-00002.safetensors",
823
+ "visual.blocks.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
824
+ "visual.blocks.9.mlp.up_proj.bias": "model-00001-of-00002.safetensors",
825
+ "visual.blocks.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
826
+ "visual.blocks.9.norm1.weight": "model-00001-of-00002.safetensors",
827
+ "visual.blocks.9.norm2.weight": "model-00001-of-00002.safetensors",
828
+ "visual.merger.ln_q.weight": "model-00001-of-00002.safetensors",
829
+ "visual.merger.mlp.0.bias": "model-00001-of-00002.safetensors",
830
+ "visual.merger.mlp.0.weight": "model-00001-of-00002.safetensors",
831
+ "visual.merger.mlp.2.bias": "model-00001-of-00002.safetensors",
832
+ "visual.merger.mlp.2.weight": "model-00001-of-00002.safetensors",
833
+ "visual.patch_embed.proj.weight": "model-00001-of-00002.safetensors"
834
+ }
835
+ }
modeling_colqwen_duo.py ADDED
@@ -0,0 +1,683 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import os
3
+ import math
4
+ import numpy as np
5
+
6
+ from abc import ABC, abstractmethod
7
+ from dataclasses import dataclass
8
+ from typing import Any, Callable, ClassVar, Dict, List, Optional, Union, cast
9
+ from typing_extensions import Unpack
10
+
11
+ import torch
12
+ from torch import nn
13
+ from torch.utils.data import DataLoader
14
+
15
+ from functools import partial
16
+ from PIL import Image
17
+ from tqdm import tqdm
18
+ from enum import Enum
19
+
20
+ from transformers import BatchEncoding, BatchFeature
21
+ from transformers.modeling_utils import PreTrainedModel
22
+
23
+ from transformers.models.qwen2_vl.modeling_qwen2_vl import Qwen2VLCausalLMOutputWithPast
24
+
25
+ from transformers.models.qwen2_5_vl import Qwen2_5_VLProcessor, Qwen2_5_VLForConditionalGeneration
26
+
27
+ from transformers.processing_utils import (
28
+ AllKwargsForChatTemplate,
29
+ ImageInput,
30
+ PreTokenizedInput,
31
+ TextInput,
32
+ VideoInput,
33
+ )
34
+
35
+ from huggingface_hub import snapshot_download
36
+
37
+ from .configuration_colqwen_duo import ColQwen25DuoConfig
38
+
39
+
40
+ def get_torch_device(device: str = "auto") -> str:
41
+ """
42
+ Returns the device (string) to be used by PyTorch.
43
+
44
+ `device` arg defaults to "auto" which will use:
45
+ - "cuda:0" if available
46
+ - else "mps" if available
47
+ - else "cpu".
48
+ """
49
+
50
+ if device == "auto":
51
+ if torch.cuda.is_available():
52
+ device = "cuda:0"
53
+ elif torch.backends.mps.is_available(): # for Apple Silicon
54
+ device = "mps"
55
+ else:
56
+ device = "cpu"
57
+ logger.info(f"Using device: {device}")
58
+
59
+ return device
60
+
61
+
62
+ class PromptType(str, Enum):
63
+ query = "query"
64
+ passage = "passage"
65
+
66
+
67
+
68
+
69
+ class BaseVisualRetrieverProcessor(ABC):
70
+ """
71
+ Base class for visual retriever processors.
72
+ """
73
+
74
+ @abstractmethod
75
+ def process_images(
76
+ self,
77
+ images: List[Image.Image],
78
+ ) -> Union[BatchFeature, BatchEncoding]:
79
+ pass
80
+
81
+ @abstractmethod
82
+ def process_texts(
83
+ self,
84
+ texts: List[str],
85
+ max_length: int = 50,
86
+ suffix: Optional[str] = None,
87
+ prefix: Optional[str] = None,
88
+ ) -> Union[BatchFeature, BatchEncoding]:
89
+ pass
90
+
91
+ @abstractmethod
92
+ def score(
93
+ self,
94
+ qs: List[torch.Tensor],
95
+ ps: List[torch.Tensor],
96
+ device: Optional[Union[str, torch.device]] = None,
97
+ **kwargs,
98
+ ) -> torch.Tensor:
99
+ pass
100
+
101
+ @staticmethod
102
+ def score_single_vector(
103
+ qs: List[torch.Tensor],
104
+ ps: List[torch.Tensor],
105
+ device: Optional[Union[str, torch.device]] = None,
106
+ ) -> torch.Tensor:
107
+ """
108
+ Compute the dot product score for the given single-vector query and passage embeddings.
109
+ """
110
+ device = device or get_torch_device("auto")
111
+
112
+ if len(qs) == 0:
113
+ raise ValueError("No queries provided")
114
+ if len(ps) == 0:
115
+ raise ValueError("No passages provided")
116
+
117
+ qs_stacked = torch.stack(qs).to(device)
118
+ ps_stacked = torch.stack(ps).to(device)
119
+
120
+ scores = torch.einsum("bd,cd->bc", qs_stacked, ps_stacked)
121
+ assert scores.shape[0] == len(qs), f"Expected {len(qs)} scores, got {scores.shape[0]}"
122
+
123
+ scores = scores.to(torch.float32)
124
+ return scores
125
+
126
+ @staticmethod
127
+ def score_multi_vector(
128
+ qs: List[torch.Tensor],
129
+ ps: List[torch.Tensor],
130
+ batch_size: int = 128,
131
+ device: Optional[Union[str, torch.device]] = None,
132
+ ) -> torch.Tensor:
133
+ """
134
+ Compute the MaxSim score (ColBERT-like) for the given multi-vector query and passage embeddings.
135
+ """
136
+ device = device or get_torch_device("auto")
137
+
138
+ if len(qs) == 0:
139
+ raise ValueError("No queries provided")
140
+ if len(ps) == 0:
141
+ raise ValueError("No passages provided")
142
+
143
+ scores_list: List[torch.Tensor] = []
144
+
145
+ for i in range(0, len(qs), batch_size):
146
+ scores_batch = []
147
+ qs_batch = torch.nn.utils.rnn.pad_sequence(qs[i : i + batch_size], batch_first=True, padding_value=0).to(
148
+ device
149
+ )
150
+ for j in range(0, len(ps), batch_size):
151
+ ps_batch = torch.nn.utils.rnn.pad_sequence(
152
+ ps[j : j + batch_size], batch_first=True, padding_value=0
153
+ ).to(device)
154
+ scores_batch.append(torch.einsum("bnd,csd->bcns", qs_batch, ps_batch).max(dim=3)[0].sum(dim=2))
155
+ scores_batch = torch.cat(scores_batch, dim=1).cpu()
156
+ scores_list.append(scores_batch)
157
+
158
+ scores = torch.cat(scores_list, dim=0)
159
+ assert scores.shape[0] == len(qs), f"Expected {len(qs)} scores, got {scores.shape[0]}"
160
+
161
+ scores = scores.to(torch.float32)
162
+ return scores
163
+
164
+
165
+ class QwenVLProcessor(ABC):
166
+
167
+ def __call__(
168
+ self,
169
+ images: Optional[ImageInput] = None,
170
+ text: Optional[Union[TextInput, PreTokenizedInput, List[PreTokenizedInput]]] = None,
171
+ videos: Optional[VideoInput] = None,
172
+ **kwargs,
173
+ ) -> BatchFeature:
174
+ return super().__call__(images=images, text=text, videos=videos, **kwargs) # type: ignore
175
+
176
+ def apply_chat_template(
177
+ self,
178
+ conversation: Union[List[Dict[str, str]], List[List[Dict[str, str]]]],
179
+ chat_template: Optional[str] = None,
180
+ **kwargs: Unpack[AllKwargsForChatTemplate],
181
+ ) -> str:
182
+ return super().apply_chat_template(conversation=conversation, chat_template=chat_template, **kwargs) # type: ignore
183
+
184
+
185
+ class QwenVLEmbeddingProcessorBase(BaseVisualRetrieverProcessor, QwenVLProcessor):
186
+
187
+ assistant_prefix_len: int = 58 # length of prefix created by
188
+ # super().apply_chat_template(conversation=conversation, chat_template=chat_template, **kwargs)
189
+
190
+ @staticmethod
191
+ def round_by_factor(number: float, factor: int) -> int:
192
+ """Returns the closest integer to 'number' that is divisible by 'factor'."""
193
+ return round(number / factor) * factor
194
+
195
+ @staticmethod
196
+ def ceil_by_factor(number: float, factor: int) -> int:
197
+ """Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'."""
198
+ return math.ceil(number / factor) * factor
199
+
200
+ @staticmethod
201
+ def floor_by_factor(number: float, factor: int) -> int:
202
+ """Returns the largest integer less than or equal to 'number' that is divisible by 'factor'."""
203
+ return math.floor(number / factor) * factor
204
+
205
+ def process_images(
206
+ self,
207
+ images: Union[List[Image.Image], List[List[Image.Image]]],
208
+ ) -> BatchFeature:
209
+
210
+ if isinstance(images[0], list):
211
+ images = cast(List[List[Image.Image]], images)
212
+ text_doc = []
213
+ for i in range(len(images)):
214
+ conversation = [{"role": "user", "content": [{"type": "image"}] * len(images[i])}]
215
+ template = self.apply_chat_template(conversation, add_generation_prompt=False)
216
+ text_doc.append(template[self.assistant_prefix_len :])
217
+
218
+ else:
219
+ images = cast(List[Image.Image], images)
220
+ text_doc = [
221
+ "<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Describe the image.<|im_end|>\n"
222
+ ] * len(images)
223
+
224
+ # The following code is a hack to make sure the scatter in DDP is done correctly when training on multiple GPUs
225
+ batch_doc = self(text=text_doc, images=images, padding="longest", return_tensors="pt") # type: ignore
226
+ # Separate pixel_values for each image
227
+ offsets = batch_doc["image_grid_thw"][:, 1] * batch_doc["image_grid_thw"][:, 2]
228
+ # Pad pixel_values to the same length to be able to make it into a tensor
229
+ pixel_values = torch.split(batch_doc["pixel_values"], offsets.tolist())
230
+
231
+ max_length = max([len(pv) for pv in pixel_values])
232
+
233
+ pixel_values = [
234
+ torch.cat([pv, torch.zeros((max_length - len(pv), pv.shape[1]), dtype=pv.dtype, device=pv.device)])
235
+ for pv in pixel_values
236
+ ]
237
+
238
+ batch_doc["pixel_values"] = torch.stack(pixel_values)
239
+ return batch_doc
240
+
241
+ def process_texts(
242
+ self,
243
+ texts: List[str],
244
+ max_length: int = 8192,
245
+ suffix: Optional[str] = None,
246
+ prefix: Optional[str] = None,
247
+ padding: Optional[str] = None,
248
+ ) -> BatchFeature:
249
+
250
+ if suffix is None:
251
+ suffix = "<pad>" * 10
252
+
253
+ padded_texts: List[str] = []
254
+
255
+ for text in texts:
256
+ if prefix:
257
+ text = f"{prefix}: {text}"
258
+ text += suffix
259
+ padded_texts.append(text)
260
+
261
+ text_batch = self(
262
+ text=padded_texts,
263
+ return_tensors="pt",
264
+ padding=padding or "longest",
265
+ max_length=max_length,
266
+ truncation=True,
267
+ )
268
+
269
+ return text_batch
270
+
271
+
272
+ class ColQwenDuoProcessorBase(QwenVLEmbeddingProcessorBase):
273
+ """
274
+ Processor for ColQwenDuo. Mirrors the `ColQwen2Processor` class.
275
+ """
276
+
277
+ def score(
278
+ self,
279
+ qs: List[torch.Tensor],
280
+ ps: List[torch.Tensor],
281
+ vector_type: str,
282
+ device: Optional[Union[str, torch.device]] = None,
283
+ truncate: Optional[int] = None,
284
+ **kwargs,
285
+ ) -> torch.Tensor:
286
+ """
287
+ Compute the MaxSim score (ColBERT-like) for the given multi-vector query and passage embeddings.
288
+ """
289
+ if truncate:
290
+ qs = [q[..., :truncate] for q in qs]
291
+ ps = [p[..., :truncate] for p in ps]
292
+
293
+ if vector_type == "single_vector":
294
+ return self.score_single_vector(qs, ps, device=device)
295
+ elif vector_type == "multi_vector":
296
+ return self.score_multi_vector(qs, ps, device=device, **kwargs)
297
+ else:
298
+ raise ValueError('vector_type must be one of the following: [`single_vector`, `multi_vector`]')
299
+
300
+
301
+ class ColQwen25DuoProcessor(ColQwenDuoProcessorBase, Qwen2_5_VLProcessor):
302
+ def __init__(self, *args, **kwargs) -> None:
303
+ Qwen2_5_VLProcessor.__init__(self, *args, **kwargs)
304
+
305
+
306
+ @dataclass
307
+ class HybridModelOutput:
308
+ """
309
+ Base class for the Hybrid Model outputs.
310
+ Args:
311
+ vlm_last_hidden_states (torch.Tensor, optional): Last hidden states of the VLM.
312
+ single_vec_emb (torch.Tensor, optional): Single-vector embeddings.
313
+ multi_vec_emb (torch.Tensor, optional): Multi-vector embeddings.
314
+ """
315
+
316
+ vlm_last_hidden_states: Optional[torch.Tensor] = None
317
+ single_vec_emb: Optional[torch.Tensor] = None
318
+ multi_vec_emb: Optional[torch.Tensor] = None
319
+
320
+ class EncodeMixin:
321
+ """
322
+ Interface to encode data for MTEB and ViDoRe evaluations.
323
+ """
324
+
325
+ def _process_batches(
326
+ self,
327
+ data: List[Union[str, Image.Image]],
328
+ processor_fn: Callable,
329
+ desc: str,
330
+ vector_type: Optional[str] = None,
331
+ return_numpy: bool = False,
332
+ **kwargs,
333
+ ) -> Union[np.ndarray, List[torch.Tensor]]:
334
+ dataloader = DataLoader(
335
+ dataset=data,
336
+ batch_size=kwargs.get("batch_size", 32),
337
+ shuffle=False,
338
+ collate_fn=processor_fn,
339
+ )
340
+ results = []
341
+ self.eval()
342
+ for batch in tqdm(dataloader, desc=desc):
343
+ with torch.no_grad():
344
+ batch = {k: v.to(self.device) for k, v in batch.items()}
345
+ with torch.autocast(device_type=torch.device(self.device).type):
346
+ embeddings = self(**batch)
347
+ if isinstance(embeddings, HybridModelOutput) and (vector_type == "single_vector"):
348
+ embeddings = embeddings.single_vec_emb
349
+ elif isinstance(embeddings, HybridModelOutput) and (vector_type == "multi_vector"):
350
+ embeddings = embeddings.multi_vec_emb
351
+ elif not vector_type and isinstance(embeddings, HybridModelOutput):
352
+ embeddings = embeddings.single_vec_emb # get single-vectors for text2text tasks by default
353
+ results.append(embeddings.cpu() if return_numpy else list(torch.unbind(embeddings)))
354
+ if return_numpy:
355
+ return np.concatenate([result.numpy() for result in results], axis=0)
356
+ return [item for sublist in results for item in sublist]
357
+
358
+ def encode(
359
+ self,
360
+ sentences: List[str],
361
+ max_length: int = 8192,
362
+ batch_size: int = 8,
363
+ prefixes: Optional[List[str]] = None,
364
+ desc: Optional[str] = None,
365
+ vector_type: Optional[str] = None,
366
+ padding: Optional[str] = None,
367
+ prompt_type: Optional[PromptType] = None,
368
+ **kwargs,
369
+ ) -> np.ndarray:
370
+ prefix = None
371
+ if isinstance(prefixes, list) and len(prefixes) > 0:
372
+ if prompt_type:
373
+ desc = f"MTEB: Encode {prompt_type.value}..."
374
+ prefix = prefixes[0] if prompt_type.value == "query" else prefixes[1]
375
+ else:
376
+ prefix = prefixes[0]
377
+ processor_fn = partial(self.processor.process_texts, max_length=max_length, prefix=prefix, padding=padding)
378
+ desc = desc or "MTEB: Encode texts..."
379
+ return self._process_batches(
380
+ data=sentences,
381
+ processor_fn=processor_fn,
382
+ desc=desc,
383
+ vector_type=vector_type,
384
+ batch_size=batch_size,
385
+ **kwargs,
386
+ )
387
+
388
+ def encode_texts(
389
+ self,
390
+ queries: List[str],
391
+ max_length: int = 8192,
392
+ batch_size: int = 8,
393
+ vector_type: Optional[str] = None,
394
+ desc: Optional[str] = None,
395
+ **kwargs,
396
+ ) -> List[torch.Tensor]:
397
+ processor_fn = partial(self.processor.process_texts, max_length=max_length, prefix="Query")
398
+ return self._process_batches(
399
+ data=queries,
400
+ processor_fn=processor_fn,
401
+ desc=desc or "Encode queries...",
402
+ vector_type=vector_type,
403
+ batch_size=batch_size,
404
+ **kwargs,
405
+ )
406
+
407
+ def encode_images(
408
+ self,
409
+ documents: List[Image.Image],
410
+ batch_size: int = 8,
411
+ vector_type: Optional[str] = None,
412
+ desc: Optional[str] = None,
413
+ **kwargs,
414
+ ) -> List[torch.Tensor]:
415
+ return self._process_batches(
416
+ data=documents,
417
+ processor_fn=self.processor.process_images,
418
+ desc=desc or "Encode documents...",
419
+ vector_type=vector_type,
420
+ batch_size=batch_size,
421
+ **kwargs,
422
+ )
423
+
424
+ class QwenVLModel(ABC):
425
+
426
+ def get_rope_index(
427
+ self,
428
+ input_ids: torch.LongTensor,
429
+ image_grid_thw: Union[torch.LongTensor, None],
430
+ attention_mask: torch.Tensor,
431
+ ) -> tuple[torch.LongTensor, torch.Tensor]:
432
+ return super().get_rope_index( # type: ignore
433
+ input_ids=input_ids,
434
+ image_grid_thw=image_grid_thw,
435
+ attention_mask=attention_mask,
436
+ )
437
+
438
+ def forward(
439
+ self,
440
+ input_ids: torch.LongTensor,
441
+ attention_mask: torch.Tensor,
442
+ position_ids: torch.LongTensor,
443
+ rope_deltas: torch.Tensor,
444
+ output_hidden_states: bool,
445
+ use_cache: bool,
446
+ **kwargs,
447
+ ) -> Qwen2VLCausalLMOutputWithPast:
448
+ return super().forward( # type: ignore
449
+ input_ids=input_ids,
450
+ attention_mask=attention_mask,
451
+ position_ids=position_ids,
452
+ rope_deltas=rope_deltas,
453
+ output_hidden_states=output_hidden_states,
454
+ use_cache=use_cache,
455
+ **kwargs,
456
+ )
457
+
458
+
459
+ class QwenVLEmbeddingBase(EncodeMixin, QwenVLModel):
460
+ main_input_name: ClassVar[str] = "doc_input_ids"
461
+
462
+ def get_vlm_last_hidden_states(
463
+ self,
464
+ input_ids: torch.LongTensor,
465
+ attention_mask: torch.Tensor,
466
+ **kwargs,
467
+ ) -> torch.Tensor:
468
+ if "pixel_values" in kwargs:
469
+ offsets = kwargs["image_grid_thw"][:, 1] * kwargs["image_grid_thw"][:, 2]
470
+ kwargs["pixel_values"] = torch.cat([pv[:o] for pv, o in zip(kwargs["pixel_values"], offsets)], dim=0)
471
+
472
+ position_ids, rope_deltas = self.get_rope_index(
473
+ input_ids=input_ids,
474
+ image_grid_thw=kwargs.get("image_grid_thw", None),
475
+ attention_mask=attention_mask,
476
+ )
477
+
478
+ outputs = super().forward(
479
+ input_ids,
480
+ attention_mask,
481
+ **kwargs,
482
+ position_ids=position_ids,
483
+ rope_deltas=rope_deltas,
484
+ output_hidden_states=True,
485
+ use_cache=False,
486
+ )
487
+
488
+ hidden_states = outputs.hidden_states
489
+ if not hidden_states:
490
+ raise ValueError("Hidden states not found in model output")
491
+
492
+ return hidden_states[-1]
493
+
494
+
495
+ class AbstractHybridModel(ABC):
496
+ """
497
+ Abstract class for a hybrid model (single-vector and multi-vector embeddings).
498
+ """
499
+
500
+ @property
501
+ def single_vector_projector_dim(self) -> int:
502
+ return self.config.single_vector_projector_dim
503
+
504
+ @property
505
+ def multi_vector_projector_dim(self) -> int:
506
+ return self.config.multi_vector_projector_dim
507
+
508
+ @abstractmethod
509
+ def forward(
510
+ self,
511
+ input_ids: torch.LongTensor,
512
+ attention_mask: torch.Tensor,
513
+ output_vlm_last_hidden_states: bool = False,
514
+ *args,
515
+ **kwargs,
516
+ ) -> HybridModelOutput:
517
+ """
518
+ Forward pass through the model. Returns both single-vector and multi-vector embeddings.
519
+ Must be implemented by subclasses.
520
+ """
521
+ pass
522
+
523
+ def _init_projection_layers(self, config) -> None:
524
+ """
525
+ Initializes projection layers.
526
+ """
527
+ self.config.single_vector_projector_dim = config.single_vector_projector_dim
528
+ self.config.multi_vector_projector_dim = config.multi_vector_projector_dim
529
+
530
+ self.single_vector_projector = nn.Linear(
531
+ in_features=self.config.hidden_size,
532
+ out_features=self.config.single_vector_projector_dim,
533
+ )
534
+
535
+ self.multi_vector_projector = nn.Linear(
536
+ in_features=self.config.hidden_size,
537
+ out_features=self.config.multi_vector_projector_dim,
538
+ )
539
+
540
+ @staticmethod
541
+ def _delete_redundant_forward_kwargs(kwargs: Dict[str, Any]) -> None:
542
+ """
543
+ Delete redundant kwargs before passing them to the forward method. In-place operation.
544
+ """
545
+ for key in ["input_ids", "attention_mask", "output_hidden_states"]:
546
+ kwargs.pop(key, None)
547
+
548
+ def project_to_single_vector_embeddings(
549
+ self,
550
+ hidden_states: torch.Tensor,
551
+ attention_mask: torch.Tensor,
552
+ input_ids: Optional[torch.LongTensor] = None,
553
+ ) -> torch.Tensor:
554
+ """
555
+ Project the hidden states to single-vector embeddings.
556
+ """
557
+
558
+ pooling_method = self.config.single_vector_pool_strategy
559
+
560
+ if pooling_method == "mean" and input_ids is None:
561
+ print("Warning: `input_ids` is None. Using `legacy-mean` pooling strategy instead.")
562
+ pooling_method = "legacy-mean"
563
+
564
+ if pooling_method == "last-token":
565
+ pooled_output = hidden_states[:, -1, :]
566
+ elif pooling_method == "mean":
567
+ if self._input_has_image(input_ids[0]): # got document image(s)
568
+ # getting start and end positions of image tokens; torch.where returns
569
+ # (1) a list of indices of input sequences
570
+ # (shape corresponds to the total number of images in the batch)
571
+ # (2) a list of positions of image tokens in the input sequence
572
+ # (shape corresponds to the total number of images in the batch)
573
+ input_seq_idx, img_start_pos = torch.where(
574
+ input_ids == self.config.vision_start_token_id
575
+ ) # (total number of images), (total number of images)
576
+ _, img_end_pos = torch.where(
577
+ input_ids == self.config.vision_end_token_id
578
+ ) # (total number of images), (total number of images)
579
+ means = []
580
+ for i in range(input_seq_idx.shape[0]):
581
+ vector_pos = input_seq_idx[i]
582
+ start = img_start_pos[i]
583
+ end = img_end_pos[i]
584
+ mean_value = hidden_states[vector_pos][start : end + 1].mean(dim=0)
585
+ means.append(mean_value)
586
+ pooled_output = torch.stack(means)
587
+
588
+ else: # got query text
589
+ pooled_output = torch.sum(hidden_states * attention_mask.unsqueeze(-1), dim=1) / torch.sum(
590
+ attention_mask, dim=1, keepdim=True
591
+ )
592
+
593
+ elif pooling_method == "legacy-mean":
594
+ pooled_output = torch.sum(hidden_states * attention_mask.unsqueeze(-1), dim=1) / torch.sum(
595
+ attention_mask, dim=1, keepdim=True
596
+ )
597
+ else:
598
+ raise ValueError(f"Invalid pooling strategy: {pooling_method}")
599
+ single_vec_emb = self.single_vector_projector(pooled_output)
600
+ return torch.nn.functional.normalize(single_vec_emb, dim=-1)
601
+
602
+ def project_to_multi_vector_embeddings(
603
+ self,
604
+ hidden_states: torch.Tensor,
605
+ attention_mask: torch.Tensor,
606
+ ) -> torch.Tensor:
607
+ """
608
+ Project the hidden states to multi-vector embeddings.
609
+ """
610
+ multi_vec_emb = self.multi_vector_projector(hidden_states)
611
+ multi_vec_emb = torch.nn.functional.normalize(multi_vec_emb, dim=-1)
612
+ return multi_vec_emb * attention_mask.unsqueeze(-1)
613
+
614
+ def _input_has_image(self, input_ids):
615
+ return self.config.vision_start_token_id in input_ids
616
+
617
+ class ColQwenDuoBase(AbstractHybridModel, QwenVLEmbeddingBase):
618
+
619
+ def forward(
620
+ self,
621
+ input_ids: torch.LongTensor,
622
+ attention_mask: torch.Tensor,
623
+ output_vlm_last_hidden_states: bool = False,
624
+ **kwargs,
625
+ ) -> HybridModelOutput:
626
+ """
627
+ Forward pass through ColQwenDuo. Returns both single-vector and multi-vector embeddings.
628
+ Args:
629
+ input_ids (torch.LongTensor): The input tokens tensor.
630
+ attention_mask (torch.LongTensor): The attention mask tensor.
631
+ Returns:
632
+ HybridModelOutput:
633
+ single_vector (torch.Tensor): Single-vector embeddings of shape (batch_size, dim).
634
+ multi_vector (torch.Tensor): Multi-vector embeddings of shape (batch_size, num_tokens, dim).
635
+ """
636
+ # Delete redundant kwargs
637
+ self._delete_redundant_forward_kwargs(kwargs)
638
+
639
+ # Forward pass through the VLM
640
+ hidden_states = self.get_vlm_last_hidden_states(
641
+ input_ids=input_ids, attention_mask=attention_mask, **kwargs
642
+ ) # (batch_size, seq_length, hidden_size)
643
+
644
+ # Compute the embeddings
645
+ single_vec_emb = self.project_to_single_vector_embeddings(hidden_states, attention_mask, input_ids=input_ids)
646
+ multi_vec_emb = self.project_to_multi_vector_embeddings(hidden_states, attention_mask)
647
+
648
+ return HybridModelOutput(
649
+ vlm_last_hidden_states=hidden_states if output_vlm_last_hidden_states else None,
650
+ single_vec_emb=single_vec_emb,
651
+ multi_vec_emb=multi_vec_emb,
652
+ )
653
+
654
+
655
+ class ColQwen25Duo(ColQwenDuoBase, Qwen2_5_VLForConditionalGeneration):
656
+ config_class = ColQwen25DuoConfig
657
+ def __init__(self, config: ColQwen25DuoConfig):
658
+ Qwen2_5_VLForConditionalGeneration.__init__(self, config)
659
+ self._init_projection_layers(config)
660
+ self.post_init()
661
+ self.processor = ColQwen25DuoProcessor.from_pretrained(self.name_or_path, trust_remote_code=True)
662
+
663
+ @classmethod
664
+ def from_pretrained(
665
+ cls,
666
+ *args,
667
+ **kwargs,
668
+ ):
669
+ if not "torch_dtype" in kwargs:
670
+ kwargs["torch_dtype"] = "auto"
671
+ model = super().from_pretrained(*args, **kwargs)
672
+ if model.config.pretrained_peft_model_name_or_path:
673
+ if os.path.isdir(model.name_or_path):
674
+ model.load_adapter(f'{model.name_or_path}/{model.config.pretrained_peft_model_name_or_path}')
675
+ else:
676
+ adapter_cache_path = snapshot_download(
677
+ repo_id=model.name_or_path,
678
+ allow_patterns=[os.path.join(model.config.pretrained_peft_model_name_or_path, '*')] # Only download files in adapter/
679
+ )
680
+ adapter_path = os.path.join(adapter_cache_path, model.config.pretrained_peft_model_name_or_path)
681
+ model.load_adapter(adapter_path)
682
+ return model
683
+
preprocessor_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.48145466,
8
+ 0.4578275,
9
+ 0.40821073
10
+ ],
11
+ "image_processor_type": "Qwen2VLImageProcessor",
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "max_pixels": 12845056,
18
+ "merge_size": 2,
19
+ "min_pixels": 3136,
20
+ "patch_size": 14,
21
+ "processor_class": "ColQwen25DuoProcessor",
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "longest_edge": 12845056,
26
+ "shortest_edge": 3136
27
+ },
28
+ "temporal_patch_size": 2
29
+ }
processing_colqwen_duo.py ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import math
3
+
4
+ from abc import ABC, abstractmethod
5
+ from PIL import Image
6
+
7
+ from typing import Dict, List, Optional, Union, cast
8
+ from typing_extensions import Unpack
9
+
10
+ from transformers import BatchEncoding, BatchFeature
11
+ from transformers.processing_utils import (
12
+ AllKwargsForChatTemplate,
13
+ ImageInput,
14
+ PreTokenizedInput,
15
+ TextInput,
16
+ VideoInput,
17
+ )
18
+ from transformers.models.qwen2_vl import Qwen2VLProcessor
19
+
20
+
21
+ def get_torch_device(device: str = "auto") -> str:
22
+ """
23
+ Returns the device (string) to be used by PyTorch.
24
+
25
+ `device` arg defaults to "auto" which will use:
26
+ - "cuda:0" if available
27
+ - else "mps" if available
28
+ - else "cpu".
29
+ """
30
+ if device == "auto":
31
+ if torch.cuda.is_available():
32
+ device = "cuda:0"
33
+ elif torch.backends.mps.is_available(): # for Apple Silicon
34
+ device = "mps"
35
+ else:
36
+ device = "cpu"
37
+ return device
38
+
39
+ class BaseVisualRetrieverProcessor(ABC):
40
+ """
41
+ Base class for visual retriever processors.
42
+ """
43
+
44
+ @abstractmethod
45
+ def process_images(
46
+ self,
47
+ images: List[Image.Image],
48
+ ) -> Union[BatchFeature, BatchEncoding]:
49
+ pass
50
+
51
+ @abstractmethod
52
+ def process_texts(
53
+ self,
54
+ texts: List[str],
55
+ max_length: int = 50,
56
+ suffix: Optional[str] = None,
57
+ prefix: Optional[str] = None,
58
+ ) -> Union[BatchFeature, BatchEncoding]:
59
+ pass
60
+
61
+ @abstractmethod
62
+ def score(
63
+ self,
64
+ qs: List[torch.Tensor],
65
+ ps: List[torch.Tensor],
66
+ device: Optional[Union[str, torch.device]] = None,
67
+ **kwargs,
68
+ ) -> torch.Tensor:
69
+ pass
70
+
71
+ @staticmethod
72
+ def score_single_vector(
73
+ qs: List[torch.Tensor],
74
+ ps: List[torch.Tensor],
75
+ device: Optional[Union[str, torch.device]] = None,
76
+ ) -> torch.Tensor:
77
+ """
78
+ Compute the dot product score for the given single-vector query and passage embeddings.
79
+ """
80
+ device = device or get_torch_device("auto")
81
+
82
+ if len(qs) == 0:
83
+ raise ValueError("No queries provided")
84
+ if len(ps) == 0:
85
+ raise ValueError("No passages provided")
86
+
87
+ qs_stacked = torch.stack(qs).to(device)
88
+ ps_stacked = torch.stack(ps).to(device)
89
+
90
+ scores = torch.einsum("bd,cd->bc", qs_stacked, ps_stacked)
91
+ assert scores.shape[0] == len(qs), f"Expected {len(qs)} scores, got {scores.shape[0]}"
92
+
93
+ scores = scores.to(torch.float32)
94
+ return scores
95
+
96
+ @staticmethod
97
+ def score_multi_vector(
98
+ qs: List[torch.Tensor],
99
+ ps: List[torch.Tensor],
100
+ batch_size: int = 128,
101
+ device: Optional[Union[str, torch.device]] = None,
102
+ ) -> torch.Tensor:
103
+ """
104
+ Compute the MaxSim score (ColBERT-like) for the given multi-vector query and passage embeddings.
105
+ """
106
+ device = device or get_torch_device("auto")
107
+
108
+ if len(qs) == 0:
109
+ raise ValueError("No queries provided")
110
+ if len(ps) == 0:
111
+ raise ValueError("No passages provided")
112
+
113
+ scores_list: List[torch.Tensor] = []
114
+
115
+ for i in range(0, len(qs), batch_size):
116
+ scores_batch = []
117
+ qs_batch = torch.nn.utils.rnn.pad_sequence(qs[i : i + batch_size], batch_first=True, padding_value=0).to(
118
+ device
119
+ )
120
+ for j in range(0, len(ps), batch_size):
121
+ ps_batch = torch.nn.utils.rnn.pad_sequence(
122
+ ps[j : j + batch_size], batch_first=True, padding_value=0
123
+ ).to(device)
124
+ scores_batch.append(torch.einsum("bnd,csd->bcns", qs_batch, ps_batch).max(dim=3)[0].sum(dim=2))
125
+ scores_batch = torch.cat(scores_batch, dim=1).cpu()
126
+ scores_list.append(scores_batch)
127
+
128
+ scores = torch.cat(scores_list, dim=0)
129
+ assert scores.shape[0] == len(qs), f"Expected {len(qs)} scores, got {scores.shape[0]}"
130
+
131
+ scores = scores.to(torch.float32)
132
+ return scores
133
+
134
+
135
+
136
+ class QwenVLProcessor(ABC):
137
+
138
+ def __call__(
139
+ self,
140
+ images: Optional[ImageInput] = None,
141
+ text: Optional[Union[TextInput, PreTokenizedInput, List[PreTokenizedInput]]] = None,
142
+ videos: Optional[VideoInput] = None,
143
+ **kwargs,
144
+ ) -> BatchFeature:
145
+ return super().__call__(images=images, text=text, videos=videos, **kwargs) # type: ignore
146
+
147
+ def apply_chat_template(
148
+ self,
149
+ conversation: Union[List[Dict[str, str]], List[List[Dict[str, str]]]],
150
+ chat_template: Optional[str] = None,
151
+ **kwargs: Unpack[AllKwargsForChatTemplate],
152
+ ) -> str:
153
+ return super().apply_chat_template(conversation=conversation, chat_template=chat_template, **kwargs) # type: ignore
154
+
155
+
156
+ class QwenVLEmbeddingProcessorBase(BaseVisualRetrieverProcessor, QwenVLProcessor):
157
+
158
+ assistant_prefix_len: int = 58 # length of prefix created by
159
+ # super().apply_chat_template(conversation=conversation, chat_template=chat_template, **kwargs)
160
+
161
+ @staticmethod
162
+ def round_by_factor(number: float, factor: int) -> int:
163
+ """Returns the closest integer to 'number' that is divisible by 'factor'."""
164
+ return round(number / factor) * factor
165
+
166
+ @staticmethod
167
+ def ceil_by_factor(number: float, factor: int) -> int:
168
+ """Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'."""
169
+ return math.ceil(number / factor) * factor
170
+
171
+ @staticmethod
172
+ def floor_by_factor(number: float, factor: int) -> int:
173
+ """Returns the largest integer less than or equal to 'number' that is divisible by 'factor'."""
174
+ return math.floor(number / factor) * factor
175
+
176
+ def process_images(
177
+ self,
178
+ images: Union[List[Image.Image], List[List[Image.Image]]],
179
+ ) -> BatchFeature:
180
+
181
+ if isinstance(images[0], list):
182
+ images = cast(List[List[Image.Image]], images)
183
+ text_doc = []
184
+ for i in range(len(images)):
185
+ conversation = [{"role": "user", "content": [{"type": "image"}] * len(images[i])}]
186
+ template = self.apply_chat_template(conversation, add_generation_prompt=False)
187
+ text_doc.append(template[self.assistant_prefix_len :])
188
+
189
+ else:
190
+ images = cast(List[Image.Image], images)
191
+ text_doc = [
192
+ "<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Describe the image.<|im_end|>\n"
193
+ ] * len(images)
194
+
195
+ # The following code is a hack to make sure the scatter in DDP is done correctly when training on multiple GPUs
196
+ batch_doc = self(text=text_doc, images=images, padding="longest", return_tensors="pt") # type: ignore
197
+ # Separate pixel_values for each image
198
+ offsets = batch_doc["image_grid_thw"][:, 1] * batch_doc["image_grid_thw"][:, 2]
199
+ # Pad pixel_values to the same length to be able to make it into a tensor
200
+ pixel_values = torch.split(batch_doc["pixel_values"], offsets.tolist())
201
+
202
+ max_length = max([len(pv) for pv in pixel_values])
203
+
204
+ pixel_values = [
205
+ torch.cat([pv, torch.zeros((max_length - len(pv), pv.shape[1]), dtype=pv.dtype, device=pv.device)])
206
+ for pv in pixel_values
207
+ ]
208
+
209
+ batch_doc["pixel_values"] = torch.stack(pixel_values)
210
+ return batch_doc
211
+
212
+ def process_texts(
213
+ self,
214
+ texts: List[str],
215
+ max_length: int,
216
+ suffix: Optional[str] = None,
217
+ prefix: Optional[str] = None,
218
+ padding: Optional[str] = None,
219
+ ) -> BatchFeature:
220
+
221
+ if suffix is None:
222
+ suffix = "<pad>" * 10
223
+
224
+ padded_texts: List[str] = []
225
+
226
+ for text in texts:
227
+ if prefix:
228
+ text = f"{prefix}: {text}"
229
+ text += suffix
230
+ padded_texts.append(text)
231
+
232
+ text_batch = self(
233
+ text=padded_texts,
234
+ return_tensors="pt",
235
+ padding=padding or "longest",
236
+ max_length=max_length,
237
+ truncation=True,
238
+ )
239
+
240
+ return text_batch
241
+
242
+
243
+
244
+
245
+ class ColQwenDuoProcessorBase(QwenVLEmbeddingProcessorBase):
246
+ """
247
+ Processor for ColQwenDuo. Mirrors the `ColQwen2Processor` class.
248
+ """
249
+
250
+ def score(
251
+ self,
252
+ qs: List[torch.Tensor],
253
+ ps: List[torch.Tensor],
254
+ vector_type: str,
255
+ device: Optional[Union[str, torch.device]] = None,
256
+ truncate: Optional[int] = None,
257
+ **kwargs,
258
+ ) -> torch.Tensor:
259
+ """
260
+ Compute the MaxSim score (ColBERT-like) for the given multi-vector query and passage embeddings.
261
+ """
262
+ if truncate:
263
+ qs = [q[..., :truncate] for q in qs]
264
+ ps = [p[..., :truncate] for p in ps]
265
+
266
+ if vector_type == "single_vector":
267
+ return self.score_single_vector(qs, ps, device=device)
268
+ elif vector_type == "multi_vector":
269
+ return self.score_multi_vector(qs, ps, device=device, **kwargs)
270
+ else:
271
+ raise ValueError('vector_type must be one of the following: [`single_vector`, `multi_vector`]')
272
+
273
+
274
+ class ColQwen2DuoProcessor(ColQwenDuoProcessorBase, Qwen2VLProcessor):
275
+ def __init__(self, *args, **kwargs) -> None:
276
+ Qwen2VLProcessor.__init__(self, *args, **kwargs)
277
+
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
3
+ size 11421896
tokenizer_config.json ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ }
181
+ },
182
+ "additional_special_tokens": [
183
+ "<|im_start|>",
184
+ "<|im_end|>",
185
+ "<|object_ref_start|>",
186
+ "<|object_ref_end|>",
187
+ "<|box_start|>",
188
+ "<|box_end|>",
189
+ "<|quad_start|>",
190
+ "<|quad_end|>",
191
+ "<|vision_start|>",
192
+ "<|vision_end|>",
193
+ "<|vision_pad|>",
194
+ "<|image_pad|>",
195
+ "<|video_pad|>"
196
+ ],
197
+ "bos_token": null,
198
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
+ "clean_up_tokenization_spaces": false,
200
+ "eos_token": "<|im_end|>",
201
+ "errors": "replace",
202
+ "extra_special_tokens": {},
203
+ "model_max_length": 131072,
204
+ "pad_token": "<|endoftext|>",
205
+ "processor_class": "ColQwen25DuoProcessor",
206
+ "split_special_tokens": false,
207
+ "tokenizer_class": "Qwen2Tokenizer",
208
+ "unk_token": null
209
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff