abdebug2003 littlebird13 commited on
Commit
ea57de7
·
0 Parent(s):

Duplicate from Qwen/Qwen3-VL-Embedding-8B

Browse files

Co-authored-by: cheng <littlebird13@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "embedding_dimension": 4096,
3
+ "pooling_mode": "lasttoken",
4
+ "include_prompt": true
5
+ }
README.md ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: sentence-transformers
4
+ pipeline_tag: sentence-similarity
5
+
6
+ base_model:
7
+ - Qwen/Qwen3-VL-8B-Instruct
8
+ tags:
9
+ - sentence-transformers
10
+ - transformers
11
+ - multimodal embedding
12
+ - qwen
13
+ - embedding
14
+ ---
15
+
16
+ # Qwen3-VL-Embedding-8B
17
+
18
+ <p align="center">
19
+ <img src="https://model-demo.oss-cn-hangzhou.aliyuncs.com/Qwen3-VL-Embedding.png" width="400"/>
20
+ <p>
21
+
22
+ ## Highlights
23
+
24
+ The **Qwen3-VL-Embedding** and **Qwen3-VL-Reranker** model series are the latest additions to the Qwen family, built upon the recently open-sourced and powerful Qwen3-VL foundation model. Specifically designed for multimodal information retrieval and cross-modal understanding, this suite accepts diverse inputs including text, images, screenshots, and videos, as well as inputs containing a mixture of these modalities.
25
+
26
+ While the Embedding model generates high-dimensional vectors for broad applications like retrieval and clustering, the Reranker model is engineered to refine these results, establishing a comprehensive pipeline for state-of-the-art multimodal search.
27
+
28
+ - **Multimodal Versatility**: Both models seamlessly handle a wide range of inputs—including text, images, screenshots, and video—within a unified framework. They deliver state-of-the-art performance across diverse multimodal tasks such as image-text retrieval, video-text matching, visual question answering (VQA), and multimodal content clustering.
29
+
30
+ - **Unified Representation Learning (Embedding)**: By leveraging the Qwen3-VL architecture, the Embedding model generates semantically rich vectors that capture both visual and textual information in a shared space. This facilitates efficient similarity computation and retrieval across different modalities.
31
+
32
+ - **High-Precision Reranking (Reranker)**: We also introduce the Qwen3-VL-Reranker series to complement the embedding model. The reranker takes a (query, document) pair as input—where both query and document may contain arbitrary single or mixed modalities—and outputs a precise relevance score. In retrieval pipelines, the two models are typically used in tandem: the embedding model performs efficient initial recall, while the reranker refines results in a subsequent re-ranking stage. This two-stage approach significantly boosts retrieval accuracy.
33
+
34
+ - **Exceptional Practicality**: Inheriting Qwen3-VL’s multilingual capabilities, the series supports over 30 languages, making it ideal for global applications. It is highly practical for real-world scenarios, offering flexible vector dimensions, customizable instructions for specific use cases, and strong performance even with quantized embeddings. These capabilities enable developers to seamlessly integrate both models into existing pipelines, unlocking powerful cross-lingual and cross-modal understanding.
35
+
36
+ ## Model Overview
37
+
38
+ **Qwen3-VL-Embedding-8B** has the following features:
39
+
40
+ - Model Type: MultiModal Embedding
41
+ - Supported Languages: 30+ Languages
42
+ - Supported Input Modalities: Text, images, screenshots, videos, and arbitrary multimodal combinations (e.g., text + image, text + video)
43
+ - Number of Parameters: 8B
44
+ - Context Length: 32k
45
+ - Embedding Dimension: Up to 4096, supports user-defined output dimensions ranging from 64 to 4096
46
+
47
+ For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our [technical report](https://arxiv.org/abs/2601.04720), [blog](https://qwen.ai/blog?id=qwen3-vl-embedding), [GitHub](https://github.com/QwenLM/Qwen3-VL-Embedding).
48
+
49
+ ## Qwen3-VL-Embedding and Qwen3-VL-Reranker Model list
50
+
51
+ | Model | Size | Model Layers | Sequence Length | Embedding Dimension | Quantization Support | MRL Support | Instruction Aware |
52
+ |---|---|---|---|---|----------------------|---|---|
53
+ | [Qwen3-VL-Embedding-2B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-2B) | 2B | 28 | 32K | 2048 | Yes | Yes | Yes |
54
+ | [Qwen3-VL-Embedding-8B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-8B) | 8B | 36 | 32K | 4096 | Yes | Yes | Yes |
55
+ | [Qwen3-VL-Reranker-2B](https://huggingface.co/Qwen/Qwen3-VL-Reranker-2B) | 2B | 28 | 32K | - | - | - | Yes |
56
+ | [Qwen3-VL-Reranker-8B](https://huggingface.co/Qwen/Qwen3-VL-Reranker-8B) | 8B | 36 | 32K | - | - | - | Yes |
57
+
58
+ > **Note**:
59
+ > - `Quantization Support` indicates the supported quantization post process for the output embedding.
60
+ > - `MRL Support` indicates whether the embedding model supports custom dimensions for the final embedding.
61
+ > - `Instruction Aware` notes whether the embedding or reranking model supports customizing the input instruction according to different tasks.
62
+ > Our evaluation indicates that, for most downstream tasks, using instructions (instruct) typically yields an improvement of 1% to 5% compared to not using them. Therefore, we recommend that developers create tailored instructions specific to their tasks and scenarios. In multilingual contexts, we also advise users to write their instructions in English, as most instructions utilized during the model training process were originally written in English.
63
+
64
+ ## Model Performance
65
+
66
+ ### Evaluation Results on [MMEB-V2](https://huggingface.co/spaces/TIGER-Lab/MMEB-Leaderboard)
67
+
68
+ Results on the MMEB-V2 benchmark. All models except IFM-TTE have been re-evaluated on the updated VisDoc OOD split. CLS: classification, QA: question answering, RET: retrieval, GD: grounding, MRET: moment retrieval, VDR: ViDoRe, VR: VisRAG, OOD: out-of-distribution.
69
+
70
+ | Model | Model Size | Image CLS | Image QA | Image RET | Image GD | Image Overall | Video CLS | Video QA | Video RET | Video MRET | Video Overall | VisDoc VDRv1 | VisDoc VDRv2 | VisDoc VR | VisDoc OOD | VisDoc Overall | All |
71
+ |----------------------------|---------|-------|------|------|------|-----------|------|------|------|------|------|-------|------|--------|------|------|--------|
72
+ | **# of Datasets →** | | 10 | 10 | 12 | 4 | 36 | 5 | 5 | 5 | 3 | 18 | 10 | 4 | 6 | 4 | 24 | 78 |
73
+ | VLM2Vec | 2B | 58.7 | 49.3 | 65.0 | 72.9 | 59.7 | 33.4 | 30.5 | 20.6 | 30.7 | 28.6 | 49.8 | 13.5 | 51.8 | 48.2 | 44.0 | 47.7 |
74
+ | VLM2Vec-V2 | 2B | 62.9 | 56.3 | 69.5 | 77.3 | 64.9 | 39.3 | 34.3 | 28.8 | 36.8 | 34.6 | 75.5 | 44.9 | 79.4 | 62.2 | 69.2 | 59.2 |
75
+ | GME-2B | 2B | 54.4 | 29.9 | 66.9 | 55.5 | 51.9 | 34.9 | 42.0 | 25.6 | 31.1 | 33.6 | 86.1 | 54.0 | 82.5 | 67.5 | 76.8 | 55.3 |
76
+ | GME-7B | 7B | 57.7 | 34.7 | 71.2 | 59.3 | 56.0 | 37.4 | 50.4 | 28.4 | 37.0 | 38.4 | 89.4 | 55.6 | 85.0 | 68.3 | 79.3 | 59.1 |
77
+ | Ops-MM-embedding-v1 | 8B | 69.7 | 69.6 | 73.1 | 87.2 | 72.7 | 59.7 | 62.2 | 45.7 | 43.2 | 53.8 | 80.1 | 59.6 | 79.3 | 67.8 | 74.4 | 68.9 |
78
+ | IFM-TTE | 8B | 76.7 | 78.5 | 74.6 | 89.3 | 77.9 | 60.5 | 67.9 | 51.7 | 54.9 | 59.2 | 85.2 | 71.5 | 92.7 | 53.3 | 79.5 | 74.1 |
79
+ | RzenEmbed | 8B | 70.6 | 71.7 | 78.5 | 92.1 | 75.9 | 58.8 | 63.5 | 51.0 | 45.5 | 55.7 | 89.7 | 60.7 | 88.7 | 69.9 | 81.3 | 72.9 |
80
+ | Seed-1.6-embedding-1215 | unknown | 75.0 | 74.9 | 79.3 | 89.0 | 78.0 | 85.2 | 66.7 | 59.1 | 54.8 | 67.7 | 90.0 | 60.3 | 90.0 | 70.7 | 82.2 | 76.9 |
81
+ | **Qwen3-VL-Embedding-2B** | 2B | 70.2 | 74.4 | 74.9 | 88.6 | 75.0 | 72.8 | 63.8 | 52.3 | 51.6 | 61.1 | 85.2 | 66.0 | 86.3 | 74.3 | 80.2 | 73.4 |
82
+ | **Qwen3-VL-Embedding-8B** | 8B | 74.4 | 81.0 | 80.0 | 92.2 | 80.1 | 79.1 | 70.1 | 57.0 | 53.2 | 66.1 | 88.2 | 69.9 | 88.8 | 78.3 | 83.3 | **77.9** |
83
+
84
+ ### Evaluation Results on [MMTEB](https://huggingface.co/spaces/mteb/leaderboard)
85
+
86
+ Results on the MMTEB benchmark.
87
+
88
+ | Model | Size | Mean (Task) | Mean (Type) | Bitxt Mining | Class. | Clust. | Inst. Retri. | Multi. Class. | Pair. Class. | Rerank | Retri. | STS |
89
+ |----------------------------------|:-------:|:-------------:|:-------------:|:--------------:|:--------:|:--------:|:--------------:|:---------------:|:--------------:|:--------:|:--------:|:------:|
90
+ | NV-Embed-v2 | 7B | 56.29 | 49.58 | 57.84 | 57.29 | 40.80 | 1.04 | 18.63 | 78.94 | 63.82 | 56.72 | 71.10|
91
+ | GritLM-7B | 7B | 60.92 | 53.74 | 70.53 | 61.83 | 49.75 | 3.45 | 22.77 | 79.94 | 63.78 | 58.31 | 73.33|
92
+ | BGE-M3 | 0.6B | 59.56 | 52.18 | 79.11 | 60.35 | 40.88 | -3.11 | 20.1 | 80.76 | 62.79 | 54.60 | 74.12|
93
+ | multilingual-e5-large-instruct | 0.6B | 63.22 | 55.08 | 80.13 | 64.94 | 50.75 | -0.40 | 22.91 | 80.86 | 62.61 | 57.12 | 76.81|
94
+ | gte-Qwen2-1.5B-instruct | 1.5B | 59.45 | 52.69 | 62.51 | 58.32 | 52.05 | 0.74 | 24.02 | 81.58 | 62.58 | 60.78 | 71.61|
95
+ | gte-Qwen2-7b-Instruct | 7B | 62.51 | 55.93 | 73.92 | 61.55 | 52.77 | 4.94 | 25.48 | 85.13 | 65.55 | 60.08 | 73.98|
96
+ | text-embedding-3-large | - | 58.93 | 51.41 | 62.17 | 60.27 | 46.89 | -2.68 | 22.03 | 79.17 | 63.89 | 59.27 | 71.68|
97
+ | Cohere-embed-multilingual-v3.0 | - | 61.12 | 53.23 | 70.50 | 62.95 | 46.89 | -1.89 | 22.74 | 79.88 | 64.07 | 59.16 | 74.80|
98
+ | Gemini Embedding | - | 68.37 | 59.59 | 79.28 | 71.82 | 54.59 | 5.18 | **29.16** | 83.63 | 65.58 | 67.71 | 79.40|
99
+ | Qwen3-Embedding-0.6B | 0.6B | 64.33 | 56.00 | 72.22 | 66.83 | 52.33 | 5.09 | 24.59 | 80.83 | 61.41 | 64.64 | 76.17|
100
+ | Qwen3-Embedding-4B | 4B | 69.45 | 60.86 | 79.36 | 72.33 | 57.15 | **11.56** | 26.77 | 85.05 | 65.08 | 69.60 | 80.86|
101
+ | Qwen3-Embedding-8B | 8B | **70.58** | **61.69** | **80.89** | **74.00** | **57.65** | 10.06 | 28.66 | **86.40** | **65.63** | **70.88** | **81.08** |
102
+ | Qwen3-VL-Embedding-2B | 2B | 63.87 | 55.84 | 69.51 | 65.86 | 52.50 | 3.87 | 26.08 | 78.50 | 64.80 | 67.12 | 74.29 |
103
+ | Qwen3-VL-Embedding-8B | 8B | 67.88 | 58.88 | 77.48 | 71.95 | 55.82 | 4.46 | 28.59 | 81.08 | 65.72 | 69.41 | 75.41 |
104
+
105
+
106
+ ## Usage
107
+
108
+ ### Sentence Transformers
109
+
110
+ Install Sentence Transformers with `pip install sentence-transformers`, then use the model like this:
111
+
112
+ ```python
113
+ from sentence_transformers import SentenceTransformer
114
+
115
+ # Load the model
116
+ model = SentenceTransformer("Qwen/Qwen3-VL-Embedding-8B")
117
+
118
+ # Text queries
119
+ queries = [
120
+ "A woman playing with her dog on a beach at sunset.",
121
+ "Pet owner training dog outdoors near water.",
122
+ "Woman surfing on waves during a sunny day.",
123
+ "City skyline view from a high-rise building at night.",
124
+ ]
125
+
126
+ # Documents: text, image, and text+image
127
+ documents = [
128
+ "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.",
129
+ "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
130
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
131
+ ]
132
+
133
+ # Encode queries and documents
134
+ query_embeddings = model.encode(queries)
135
+ doc_embeddings = model.encode(documents)
136
+ print(query_embeddings.shape, doc_embeddings.shape)
137
+ # (4, 4096) (3, 4096)
138
+
139
+ # Compute similarities
140
+ similarities = model.similarity(query_embeddings, doc_embeddings)
141
+ print(similarities)
142
+ # tensor([[0.7438, 0.6556, 0.6244],
143
+ # [0.4430, 0.3323, 0.3929],
144
+ # [0.3685, 0.2310, 0.2874],
145
+ # [0.0602, -0.0162, 0.0167]])
146
+ ```
147
+
148
+ By default, all inputs are wrapped with the `"Represent the user's input."` instruction via a system prompt. You can customize this by passing a different prompt:
149
+
150
+ ```python
151
+ # With a custom prompt
152
+ model.encode(queries, prompt="Retrieve relevant documents for the query.")
153
+ ```
154
+
155
+ ### Using transformers
156
+
157
+ - **requirements**
158
+ ```text
159
+ transformers>=4.57.0
160
+ qwen-vl-utils>=0.0.14
161
+ torch==2.8.0
162
+ ```
163
+
164
+ ### Basic Usage Example
165
+
166
+ ```python
167
+ from scripts.qwen3_vl_embedding import Qwen3VLEmbedder
168
+
169
+ # Define a list of query texts
170
+ queries = [
171
+ {"text": "A woman playing with her dog on a beach at sunset."},
172
+ {"text": "Pet owner training dog outdoors near water."},
173
+ {"text": "Woman surfing on waves during a sunny day."},
174
+ {"text": "City skyline view from a high-rise building at night."}
175
+ ]
176
+
177
+ # Define a list of document texts and images
178
+ documents = [
179
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust."},
180
+ {"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
181
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"}
182
+ ]
183
+
184
+ # Specify the model path
185
+ model_name_or_path = "Qwen/Qwen3-VL-Embedding-8B"
186
+
187
+ # Initialize the Qwen3VLEmbedder model
188
+ model = Qwen3VLEmbedder(model_name_or_path=model_name_or_path)
189
+ # We recommend enabling flash_attention_2 for better acceleration and memory saving,
190
+ # model = Qwen3VLEmbedder(model_name_or_path=model_name_or_path, torch_dtype=torch.float16, attn_implementation="flash_attention_2")
191
+
192
+ # Combine queries and documents into a single input list
193
+ inputs = queries + documents
194
+
195
+ # Process the inputs to get embeddings
196
+ embeddings = model.process(inputs)
197
+
198
+ # Compute similarity scores between query embeddings and document embeddings
199
+ similarity_scores = (embeddings[:4] @ embeddings[4:].T)
200
+
201
+ # Print out the similarity scores in a list format
202
+ print(similarity_scores.tolist())
203
+
204
+ # [[0.74267578125, 0.6630859375, 0.6328125], [0.443603515625, 0.33349609375, 0.396484375], [0.3671875, 0.2354736328125, 0.289306640625], [0.060821533203125, -0.01557159423828125, 0.0165863037109375]]
205
+ ```
206
+
207
+ ### vLLM Basic Usage Example
208
+ ```python
209
+ import argparse
210
+ import numpy as np
211
+ import os
212
+ from typing import List, Dict, Any
213
+ from vllm import LLM, EngineArgs
214
+ from vllm.multimodal.utils import fetch_image
215
+
216
+
217
+ # Define a list of query texts
218
+ queries = [
219
+ {"text": "A woman playing with her dog on a beach at sunset."},
220
+ {"text": "Pet owner training dog outdoors near water."},
221
+ {"text": "Woman surfing on waves during a sunny day."},
222
+ {"text": "City skyline view from a high-rise building at night."}
223
+ ]
224
+
225
+ # Define a list of document texts and images
226
+ documents = [
227
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust."},
228
+ {"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
229
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"}
230
+ ]
231
+
232
+ def format_input_to_conversation(input_dict: Dict[str, Any], instruction: str = "Represent the user's input.") -> List[Dict]:
233
+ content = []
234
+
235
+ text = input_dict.get('text')
236
+ image = input_dict.get('image')
237
+
238
+ if image:
239
+ image_content = None
240
+ if isinstance(image, str):
241
+ if image.startswith(('http', 'https', 'oss')):
242
+ image_content = image
243
+ else:
244
+ abs_image_path = os.path.abspath(image)
245
+ image_content = 'file://' + abs_image_path
246
+ else:
247
+ image_content = image
248
+
249
+ if image_content:
250
+ content.append({
251
+ 'type': 'image',
252
+ 'image': image_content,
253
+ })
254
+
255
+ if text:
256
+ content.append({'type': 'text', 'text': text})
257
+
258
+ if not content:
259
+ content.append({'type': 'text', 'text': ""})
260
+
261
+ conversation = [
262
+ {"role": "system", "content": [{"type": "text", "text": instruction}]},
263
+ {"role": "user", "content": content}
264
+ ]
265
+
266
+ return conversation
267
+
268
+ def prepare_vllm_inputs(input_dict: Dict[str, Any], llm, instruction: str = "Represent the user's input.") -> Dict[str, Any]:
269
+ text = input_dict.get('text')
270
+ image = input_dict.get('image')
271
+
272
+ conversation = format_input_to_conversation(input_dict, instruction)
273
+
274
+ prompt_text = llm.llm_engine.tokenizer.apply_chat_template(
275
+ conversation,
276
+ tokenize=False,
277
+ add_generation_prompt=True
278
+ )
279
+
280
+ multi_modal_data = None
281
+ if image:
282
+ if isinstance(image, str):
283
+ if image.startswith(('http', 'https', 'oss')):
284
+ try:
285
+ image_obj = fetch_image(image)
286
+ multi_modal_data = {"image": image_obj}
287
+ except Exception as e:
288
+ print(f"Warning: Failed to fetch image {image}: {e}")
289
+ else:
290
+ abs_image_path = os.path.abspath(image)
291
+ if os.path.exists(abs_image_path):
292
+ from PIL import Image
293
+ image_obj = Image.open(abs_image_path)
294
+ multi_modal_data = {"image": image_obj}
295
+ else:
296
+ print(f"Warning: Image file not found: {abs_image_path}")
297
+ else:
298
+ multi_modal_data = {"image": image}
299
+
300
+ result = {
301
+ "prompt": prompt_text,
302
+ "multi_modal_data": multi_modal_data
303
+ }
304
+ return result
305
+
306
+ def main():
307
+ parser = argparse.ArgumentParser(description="Offline Similarity Check with vLLM")
308
+ parser.add_argument("--model-path", type=str, default="models/Qwen3-VL-Embedding-8B", help="Path to the model")
309
+ parser.add_argument("--dtype", type=str, default="bfloat16", help="Data type (e.g., bfloat16)")
310
+ args = parser.parse_args()
311
+
312
+ print(f"Loading model from {args.model_path}...")
313
+
314
+ engine_args = EngineArgs(
315
+ model=args.model_path,
316
+ runner="pooling",
317
+ dtype=args.dtype,
318
+ trust_remote_code=True,
319
+ )
320
+
321
+ llm = LLM(**vars(engine_args))
322
+
323
+ all_inputs = queries + documents
324
+ vllm_inputs = [prepare_vllm_inputs(inp, llm) for inp in all_inputs]
325
+
326
+
327
+ outputs = llm.embed(vllm_inputs)
328
+
329
+ embeddings_list = []
330
+ for i, output in enumerate(outputs):
331
+ emb = output.outputs.embedding
332
+ embeddings_list.append(emb)
333
+ print(f"Input {i} embedding shape: {len(emb)}")
334
+
335
+ embeddings = np.array(embeddings_list)
336
+ print(f"\nEmbeddings shape: {embeddings.shape}")
337
+
338
+ num_queries = len(queries)
339
+ query_embeddings = embeddings[:num_queries]
340
+ doc_embeddings = embeddings[num_queries:]
341
+
342
+ similarity_scores = query_embeddings @ doc_embeddings.T
343
+
344
+ print("\nSimilarity Scores:")
345
+ print(similarity_scores.tolist())
346
+
347
+
348
+ if __name__ == "__main__":
349
+ main()
350
+ ```
351
+
352
+ ### SGLang Basic Usage Example
353
+ ```python
354
+ import argparse
355
+ import numpy as np
356
+ import torch
357
+ import os
358
+ from typing import List, Dict, Any
359
+ from sglang.srt.entrypoints.engine import Engine
360
+
361
+ # Define a list of query texts
362
+ queries = [
363
+ {"text": "A woman playing with her dog on a beach at sunset."},
364
+ {"text": "Pet owner training dog outdoors near water."},
365
+ {"text": "Woman surfing on waves during a sunny day."},
366
+ {"text": "City skyline view from a high-rise building at night."}
367
+ ]
368
+
369
+ # Define a list of document texts and images
370
+ documents = [
371
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust."},
372
+ {"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
373
+ {"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"}
374
+ ]
375
+
376
+ def format_input_to_conversation(input_dict: Dict[str, Any], instruction: str = "Represent the user's input.") -> List[Dict]:
377
+ content = []
378
+
379
+ text = input_dict.get('text')
380
+ image = input_dict.get('image')
381
+
382
+ if image:
383
+ image_content = None
384
+ if isinstance(image, str):
385
+ if image.startswith(('http', 'oss')):
386
+ image_content = image
387
+ else:
388
+ abs_image_path = os.path.abspath(image)
389
+ image_content = 'file://' + abs_image_path
390
+ else:
391
+ image_content = image
392
+ if image_content:
393
+ content.append({
394
+ 'type': 'image', 'image': image_content,
395
+ })
396
+
397
+ if text:
398
+ content.append({'type': 'text', 'text': text})
399
+
400
+ if not content:
401
+ content.append({'type': 'text', 'text': ""})
402
+
403
+ conversation = [
404
+ {"role": "system", "content": [{"type": "text", "text": instruction}]},
405
+ {"role": "user", "content": content}
406
+ ]
407
+
408
+ return conversation
409
+
410
+ def convert_to_sglang_format(input_dict: Dict[str, Any], engine: Engine, instruction: str = "Represent the user's input.") -> Dict[str, Any]:
411
+ conversation = format_input_to_conversation(input_dict, instruction)
412
+
413
+ text_for_api = engine.tokenizer_manager.tokenizer.apply_chat_template(
414
+ conversation,
415
+ tokenize=False,
416
+ add_generation_prompt=True
417
+ )
418
+
419
+ result = {"text": text_for_api}
420
+
421
+ image = input_dict.get('image')
422
+ if image and isinstance(image, str):
423
+ result["image"] = image
424
+
425
+
426
+ return result
427
+
428
+ def main():
429
+ parser = argparse.ArgumentParser(description="Offline Similarity Check with SGLang")
430
+ parser.add_argument("--model-path", type=str, default="models/Qwen3-VL-Embedding-8B", help="Path to the model")
431
+ parser.add_argument("--dtype", type=str, default="bfloat16", help="Data type (e.g., bfloat16)")
432
+ args = parser.parse_args()
433
+
434
+ print(f"Loading model from {args.model_path}...")
435
+
436
+ engine = Engine(
437
+ model_path=args.model_path,
438
+ is_embedding=True,
439
+ dtype=args.dtype,
440
+ trust_remote_code=True,
441
+ )
442
+
443
+ inputs = queries + documents
444
+ sglang_inputs = [convert_to_sglang_format(inp, engine) for inp in inputs]
445
+ print(sglang_inputs[:])
446
+ print(f"sglang_inputs: {sglang_inputs}")
447
+ print(f"Processing {len(sglang_inputs)} inputs...")
448
+
449
+ prompts = [inp['text'] for inp in sglang_inputs]
450
+ images = [inp.get('image') for inp in sglang_inputs]
451
+
452
+
453
+ results = engine.encode(prompts, image_data=images)
454
+
455
+ embeddings_list = []
456
+ for res in results:
457
+ embeddings_list.append(res['embedding'])
458
+
459
+ embeddings = np.array(embeddings_list)
460
+ print(f"Embeddings shape: {embeddings.shape}")
461
+
462
+ num_queries = len(queries)
463
+ query_embeddings = embeddings[:num_queries]
464
+ doc_embeddings = embeddings[num_queries:]
465
+
466
+ similarity_scores = (query_embeddings @ doc_embeddings.T)
467
+
468
+ print("\nSimilarity Scores:")
469
+ print(similarity_scores.tolist())
470
+
471
+ if __name__ == "__main__":
472
+ main()
473
+ ```
474
+
475
+ For more usage examples, please visit our [GitHub repository](https://github.com/QwenLM/Qwen3-VL-Embedding).
476
+
477
+
478
+ ## Citation
479
+
480
+ If you find our work helpful, feel free to give us a cite.
481
+
482
+ ```
483
+ @article{qwen3vlembedding,
484
+ title={Qwen3-VL-Embedding and Qwen3-VL-Reranker: A Unified Framework for State-of-the-Art Multimodal Retrieval and Ranking},
485
+ author={Li, Mingxin and Zhang, Yanzhao and Long, Dingkun and Chen Keqin and Song, Sibo and Bai, Shuai and Yang, Zhibo and Xie, Pengjun and Yang, An and Liu, Dayiheng and Zhou, Jingren and Lin, Junyang},
486
+ journal={arXiv preprint arXiv:2601.04720},
487
+ year={2026}
488
+ }
489
+ ```
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
chat_template.jinja ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set default_system_message = 'Represent the user\'s input.' -%}
2
+ {%- if tools %}
3
+ {{- '<|im_start|>system\n' }}
4
+ {%- if messages[0].role == 'system' %}
5
+ {%- if messages[0].content is string %}
6
+ {{- messages[0].content }}
7
+ {%- else %}
8
+ {%- for content in messages[0].content %}
9
+ {%- if 'text' in content %}
10
+ {{- content.text }}
11
+ {%- endif %}
12
+ {%- endfor %}
13
+ {%- endif %}
14
+ {{- '\n\n' }}
15
+ {%- else %}
16
+ {{- default_system_message + '\n\n' }}
17
+ {%- endif %}
18
+ {{- "# 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>" }}
19
+ {%- for tool in tools %}
20
+ {{- "\n" }}
21
+ {{- tool | tojson }}
22
+ {%- endfor %}
23
+ {{- "\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" }}
24
+ {%- else %}
25
+ {%- if messages[0].role == 'system' %}
26
+ {{- '<|im_start|>system\n' }}
27
+ {%- if messages[0].content is string %}
28
+ {{- messages[0].content }}
29
+ {%- else %}
30
+ {%- for content in messages[0].content %}
31
+ {%- if 'text' in content %}
32
+ {{- content.text }}
33
+ {%- endif %}
34
+ {%- endfor %}
35
+ {%- endif %}
36
+ {{- '<|im_end|>\n' }}
37
+ {%- else %}
38
+ {{- '<|im_start|>system\n' + default_system_message + '<|im_end|>\n' }}
39
+ {%- endif %}
40
+ {%- endif %}
41
+ {%- set image_count = namespace(value=0) %}
42
+ {%- set video_count = namespace(value=0) %}
43
+ {%- for message in messages %}
44
+ {%- if message.role == "user" %}
45
+ {{- '<|im_start|>' + message.role + '\n' }}
46
+ {%- if message.content is string %}
47
+ {{- message.content }}
48
+ {%- else %}
49
+ {%- for content in message.content %}
50
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
51
+ {%- set image_count.value = image_count.value + 1 %}
52
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
53
+ <|vision_start|><|image_pad|><|vision_end|>
54
+ {%- elif content.type == 'video' or 'video' in content %}
55
+ {%- set video_count.value = video_count.value + 1 %}
56
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
57
+ <|vision_start|><|video_pad|><|vision_end|>
58
+ {%- elif 'text' in content %}
59
+ {{- content.text }}
60
+ {%- endif %}
61
+ {%- endfor %}
62
+ {%- endif %}
63
+ {{- '<|im_end|>\n' }}
64
+ {%- elif message.role == "assistant" %}
65
+ {{- '<|im_start|>' + message.role + '\n' }}
66
+ {%- if message.content is string %}
67
+ {{- message.content }}
68
+ {%- else %}
69
+ {%- for content_item in message.content %}
70
+ {%- if 'text' in content_item %}
71
+ {{- content_item.text }}
72
+ {%- endif %}
73
+ {%- endfor %}
74
+ {%- endif %}
75
+ {%- if message.tool_calls %}
76
+ {%- for tool_call in message.tool_calls %}
77
+ {%- if (loop.first and message.content) or (not loop.first) %}
78
+ {{- '\n' }}
79
+ {%- endif %}
80
+ {%- if tool_call.function %}
81
+ {%- set tool_call = tool_call.function %}
82
+ {%- endif %}
83
+ {{- '<tool_call>\n{"name": "' }}
84
+ {{- tool_call.name }}
85
+ {{- '", "arguments": ' }}
86
+ {%- if tool_call.arguments is string %}
87
+ {{- tool_call.arguments }}
88
+ {%- else %}
89
+ {{- tool_call.arguments | tojson }}
90
+ {%- endif %}
91
+ {{- '}\n</tool_call>' }}
92
+ {%- endfor %}
93
+ {%- endif %}
94
+ {{- '<|im_end|>\n' }}
95
+ {%- elif message.role == "tool" %}
96
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
97
+ {{- '<|im_start|>user' }}
98
+ {%- endif %}
99
+ {{- '\n<tool_response>\n' }}
100
+ {%- if message.content is string %}
101
+ {{- message.content }}
102
+ {%- else %}
103
+ {%- for content in message.content %}
104
+ {%- if content.type == 'image' or 'image' in content or 'image_url' in content %}
105
+ {%- set image_count.value = image_count.value + 1 %}
106
+ {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%}
107
+ <|vision_start|><|image_pad|><|vision_end|>
108
+ {%- elif content.type == 'video' or 'video' in content %}
109
+ {%- set video_count.value = video_count.value + 1 %}
110
+ {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%}
111
+ <|vision_start|><|video_pad|><|vision_end|>
112
+ {%- elif 'text' in content %}
113
+ {{- content.text }}
114
+ {%- endif %}
115
+ {%- endfor %}
116
+ {%- endif %}
117
+ {{- '\n</tool_response>' }}
118
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
119
+ {{- '<|im_end|>\n' }}
120
+ {%- endif %}
121
+ {%- endif %}
122
+ {%- endfor %}
123
+ {%- if add_generation_prompt %}
124
+ {{- '<|im_start|>assistant\n' }}
125
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3VLForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "image_token_id": 151655,
7
+ "model_type": "qwen3_vl",
8
+ "text_config": {
9
+ "attention_bias": false,
10
+ "attention_dropout": 0.0,
11
+ "bos_token_id": 151643,
12
+ "dtype": "bfloat16",
13
+ "eos_token_id": 151645,
14
+ "head_dim": 128,
15
+ "hidden_act": "silu",
16
+ "hidden_size": 4096,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 12288,
19
+ "max_position_embeddings": 262144,
20
+ "model_type": "qwen3_vl_text",
21
+ "num_attention_heads": 32,
22
+ "num_hidden_layers": 36,
23
+ "num_key_value_heads": 8,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_scaling": {
26
+ "mrope_interleaved": true,
27
+ "mrope_section": [
28
+ 24,
29
+ 20,
30
+ 20
31
+ ],
32
+ "rope_type": "default"
33
+ },
34
+ "rope_theta": 5000000,
35
+ "use_cache": true,
36
+ "vocab_size": 151936
37
+ },
38
+ "tie_word_embeddings": false,
39
+ "transformers_version": "4.57.1",
40
+ "use_cache": false,
41
+ "video_token_id": 151656,
42
+ "vision_config": {
43
+ "deepstack_visual_indexes": [
44
+ 8,
45
+ 16,
46
+ 24
47
+ ],
48
+ "depth": 27,
49
+ "dtype": "bfloat16",
50
+ "hidden_act": "gelu_pytorch_tanh",
51
+ "hidden_size": 1152,
52
+ "in_channels": 3,
53
+ "initializer_range": 0.02,
54
+ "intermediate_size": 4304,
55
+ "model_type": "qwen3_vl",
56
+ "num_heads": 16,
57
+ "num_position_embeddings": 2304,
58
+ "out_hidden_size": 4096,
59
+ "patch_size": 16,
60
+ "spatial_merge_size": 2,
61
+ "temporal_patch_size": 2
62
+ },
63
+ "vision_end_token_id": 151653,
64
+ "vision_start_token_id": 151652
65
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.4.0"
4
+ },
5
+ "default_prompt_name": "default",
6
+ "model_type": "SentenceTransformer",
7
+ "prompts": {
8
+ "default": "Represent the user's input."
9
+ },
10
+ "similarity_fn_name": "cosine"
11
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79ef275ec5f751d5fb59357c00d473268f9fd74abf5e38aa30137d268e7733c4
3
+ size 4998056552
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4da61f512e84fc0f0b80bcb7bcc5137eb3bf25b658a7d55f84f4056078545f0
3
+ size 4915962464
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fb17cf8f06d6fe5aaacf114e85c4e6d8318799f24b517f50d1ec154a8d47007
3
+ size 4915962496
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:000213b6d1d03ed9023fac23716da51ec4c5be221a04526c2f732d31d8fed1f5
3
+ size 1459698112
model.safetensors.index.json ADDED
@@ -0,0 +1,757 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_parameters": 8144793840,
4
+ "total_size": 16289587680
5
+ },
6
+ "weight_map": {
7
+ "model.language_model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.language_model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.language_model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.language_model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.language_model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.language_model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.language_model.layers.0.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
14
+ "model.language_model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.language_model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.language_model.layers.0.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
17
+ "model.language_model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
18
+ "model.language_model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.language_model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
20
+ "model.language_model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.language_model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
22
+ "model.language_model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.language_model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
24
+ "model.language_model.layers.1.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
25
+ "model.language_model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.language_model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
27
+ "model.language_model.layers.1.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
28
+ "model.language_model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
29
+ "model.language_model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
30
+ "model.language_model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
31
+ "model.language_model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
32
+ "model.language_model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.language_model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.language_model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
35
+ "model.language_model.layers.10.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
36
+ "model.language_model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
37
+ "model.language_model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.language_model.layers.10.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
39
+ "model.language_model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
40
+ "model.language_model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
41
+ "model.language_model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
42
+ "model.language_model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.language_model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.language_model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
45
+ "model.language_model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
46
+ "model.language_model.layers.11.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
47
+ "model.language_model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.language_model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
49
+ "model.language_model.layers.11.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
50
+ "model.language_model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.language_model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.language_model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
53
+ "model.language_model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
54
+ "model.language_model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.language_model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.language_model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
57
+ "model.language_model.layers.12.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
58
+ "model.language_model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.language_model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.language_model.layers.12.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
61
+ "model.language_model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.language_model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
63
+ "model.language_model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
64
+ "model.language_model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.language_model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.language_model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
67
+ "model.language_model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
68
+ "model.language_model.layers.13.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
69
+ "model.language_model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.language_model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.language_model.layers.13.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
72
+ "model.language_model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.language_model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.language_model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
75
+ "model.language_model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
76
+ "model.language_model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
77
+ "model.language_model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.language_model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
79
+ "model.language_model.layers.14.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
80
+ "model.language_model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
81
+ "model.language_model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.language_model.layers.14.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
83
+ "model.language_model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.language_model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
85
+ "model.language_model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
86
+ "model.language_model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.language_model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.language_model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.language_model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
90
+ "model.language_model.layers.15.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
91
+ "model.language_model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.language_model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.language_model.layers.15.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
94
+ "model.language_model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.language_model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.language_model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
97
+ "model.language_model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.language_model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
99
+ "model.language_model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.language_model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
101
+ "model.language_model.layers.16.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
102
+ "model.language_model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
103
+ "model.language_model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.language_model.layers.16.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
105
+ "model.language_model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.language_model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.language_model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
108
+ "model.language_model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
109
+ "model.language_model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
110
+ "model.language_model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
111
+ "model.language_model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
112
+ "model.language_model.layers.17.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
113
+ "model.language_model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.language_model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.language_model.layers.17.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
116
+ "model.language_model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
117
+ "model.language_model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
118
+ "model.language_model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
119
+ "model.language_model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
120
+ "model.language_model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
121
+ "model.language_model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
122
+ "model.language_model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
123
+ "model.language_model.layers.18.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
124
+ "model.language_model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
125
+ "model.language_model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
126
+ "model.language_model.layers.18.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
127
+ "model.language_model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
128
+ "model.language_model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
129
+ "model.language_model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.language_model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
131
+ "model.language_model.layers.19.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
132
+ "model.language_model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
133
+ "model.language_model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
134
+ "model.language_model.layers.19.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
135
+ "model.language_model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
136
+ "model.language_model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
137
+ "model.language_model.layers.19.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
138
+ "model.language_model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
139
+ "model.language_model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
140
+ "model.language_model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
141
+ "model.language_model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
142
+ "model.language_model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
143
+ "model.language_model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
144
+ "model.language_model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
145
+ "model.language_model.layers.2.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
146
+ "model.language_model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
147
+ "model.language_model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
148
+ "model.language_model.layers.2.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
149
+ "model.language_model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
150
+ "model.language_model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
151
+ "model.language_model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
152
+ "model.language_model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
153
+ "model.language_model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.language_model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.language_model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
156
+ "model.language_model.layers.20.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
157
+ "model.language_model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
158
+ "model.language_model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.language_model.layers.20.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
160
+ "model.language_model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.language_model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
162
+ "model.language_model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
163
+ "model.language_model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.language_model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.language_model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
166
+ "model.language_model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
167
+ "model.language_model.layers.21.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
168
+ "model.language_model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.language_model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.language_model.layers.21.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
171
+ "model.language_model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.language_model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.language_model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
174
+ "model.language_model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
175
+ "model.language_model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.language_model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.language_model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
178
+ "model.language_model.layers.22.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
179
+ "model.language_model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
180
+ "model.language_model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
181
+ "model.language_model.layers.22.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
182
+ "model.language_model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.language_model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
184
+ "model.language_model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
185
+ "model.language_model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.language_model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.language_model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.language_model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.language_model.layers.23.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
190
+ "model.language_model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.language_model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.language_model.layers.23.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
193
+ "model.language_model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.language_model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.language_model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
196
+ "model.language_model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.language_model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
198
+ "model.language_model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
199
+ "model.language_model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
200
+ "model.language_model.layers.24.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
201
+ "model.language_model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
202
+ "model.language_model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.language_model.layers.24.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
204
+ "model.language_model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.language_model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.language_model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
207
+ "model.language_model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.language_model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.language_model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.language_model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.language_model.layers.25.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
212
+ "model.language_model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.language_model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.language_model.layers.25.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
215
+ "model.language_model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
216
+ "model.language_model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
217
+ "model.language_model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
218
+ "model.language_model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
219
+ "model.language_model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
220
+ "model.language_model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
221
+ "model.language_model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
222
+ "model.language_model.layers.26.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
223
+ "model.language_model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
224
+ "model.language_model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
225
+ "model.language_model.layers.26.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
226
+ "model.language_model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.language_model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
228
+ "model.language_model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
229
+ "model.language_model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
230
+ "model.language_model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.language_model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.language_model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
233
+ "model.language_model.layers.27.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
234
+ "model.language_model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
235
+ "model.language_model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
236
+ "model.language_model.layers.27.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
237
+ "model.language_model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
238
+ "model.language_model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
239
+ "model.language_model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
240
+ "model.language_model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
241
+ "model.language_model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
242
+ "model.language_model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
243
+ "model.language_model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
244
+ "model.language_model.layers.28.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
245
+ "model.language_model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
246
+ "model.language_model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
247
+ "model.language_model.layers.28.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
248
+ "model.language_model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
249
+ "model.language_model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
250
+ "model.language_model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
251
+ "model.language_model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
252
+ "model.language_model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
253
+ "model.language_model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
254
+ "model.language_model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
255
+ "model.language_model.layers.29.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
256
+ "model.language_model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
257
+ "model.language_model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
258
+ "model.language_model.layers.29.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
259
+ "model.language_model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
260
+ "model.language_model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
261
+ "model.language_model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
262
+ "model.language_model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.language_model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.language_model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
265
+ "model.language_model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
266
+ "model.language_model.layers.3.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
267
+ "model.language_model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.language_model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.language_model.layers.3.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
270
+ "model.language_model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
271
+ "model.language_model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.language_model.layers.30.input_layernorm.weight": "model-00003-of-00004.safetensors",
273
+ "model.language_model.layers.30.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
274
+ "model.language_model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
275
+ "model.language_model.layers.30.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
276
+ "model.language_model.layers.30.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
277
+ "model.language_model.layers.30.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
278
+ "model.language_model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
279
+ "model.language_model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
280
+ "model.language_model.layers.30.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
281
+ "model.language_model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
282
+ "model.language_model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
283
+ "model.language_model.layers.31.input_layernorm.weight": "model-00003-of-00004.safetensors",
284
+ "model.language_model.layers.31.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
285
+ "model.language_model.layers.31.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
286
+ "model.language_model.layers.31.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
287
+ "model.language_model.layers.31.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
288
+ "model.language_model.layers.31.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
289
+ "model.language_model.layers.31.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
290
+ "model.language_model.layers.31.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
291
+ "model.language_model.layers.31.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
292
+ "model.language_model.layers.31.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
293
+ "model.language_model.layers.31.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
294
+ "model.language_model.layers.32.input_layernorm.weight": "model-00004-of-00004.safetensors",
295
+ "model.language_model.layers.32.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
296
+ "model.language_model.layers.32.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
297
+ "model.language_model.layers.32.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
298
+ "model.language_model.layers.32.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
299
+ "model.language_model.layers.32.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
300
+ "model.language_model.layers.32.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
301
+ "model.language_model.layers.32.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
302
+ "model.language_model.layers.32.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
303
+ "model.language_model.layers.32.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
304
+ "model.language_model.layers.32.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
305
+ "model.language_model.layers.33.input_layernorm.weight": "model-00004-of-00004.safetensors",
306
+ "model.language_model.layers.33.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
307
+ "model.language_model.layers.33.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
308
+ "model.language_model.layers.33.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
309
+ "model.language_model.layers.33.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
310
+ "model.language_model.layers.33.self_attn.k_norm.weight": "model-00004-of-00004.safetensors",
311
+ "model.language_model.layers.33.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
312
+ "model.language_model.layers.33.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
313
+ "model.language_model.layers.33.self_attn.q_norm.weight": "model-00004-of-00004.safetensors",
314
+ "model.language_model.layers.33.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
315
+ "model.language_model.layers.33.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
316
+ "model.language_model.layers.34.input_layernorm.weight": "model-00004-of-00004.safetensors",
317
+ "model.language_model.layers.34.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
318
+ "model.language_model.layers.34.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
319
+ "model.language_model.layers.34.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
320
+ "model.language_model.layers.34.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
321
+ "model.language_model.layers.34.self_attn.k_norm.weight": "model-00004-of-00004.safetensors",
322
+ "model.language_model.layers.34.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
323
+ "model.language_model.layers.34.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
324
+ "model.language_model.layers.34.self_attn.q_norm.weight": "model-00004-of-00004.safetensors",
325
+ "model.language_model.layers.34.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
326
+ "model.language_model.layers.34.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
327
+ "model.language_model.layers.35.input_layernorm.weight": "model-00004-of-00004.safetensors",
328
+ "model.language_model.layers.35.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
329
+ "model.language_model.layers.35.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
330
+ "model.language_model.layers.35.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
331
+ "model.language_model.layers.35.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
332
+ "model.language_model.layers.35.self_attn.k_norm.weight": "model-00004-of-00004.safetensors",
333
+ "model.language_model.layers.35.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
334
+ "model.language_model.layers.35.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
335
+ "model.language_model.layers.35.self_attn.q_norm.weight": "model-00004-of-00004.safetensors",
336
+ "model.language_model.layers.35.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
337
+ "model.language_model.layers.35.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
338
+ "model.language_model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
339
+ "model.language_model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
340
+ "model.language_model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
341
+ "model.language_model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
342
+ "model.language_model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
343
+ "model.language_model.layers.4.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
344
+ "model.language_model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
345
+ "model.language_model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
346
+ "model.language_model.layers.4.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
347
+ "model.language_model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
348
+ "model.language_model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
349
+ "model.language_model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
350
+ "model.language_model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
351
+ "model.language_model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
352
+ "model.language_model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
353
+ "model.language_model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
354
+ "model.language_model.layers.5.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
355
+ "model.language_model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
356
+ "model.language_model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
357
+ "model.language_model.layers.5.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
358
+ "model.language_model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
359
+ "model.language_model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
360
+ "model.language_model.layers.6.input_layernorm.weight": "model-00002-of-00004.safetensors",
361
+ "model.language_model.layers.6.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
362
+ "model.language_model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
363
+ "model.language_model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
364
+ "model.language_model.layers.6.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
365
+ "model.language_model.layers.6.self_attn.k_norm.weight": "model-00001-of-00004.safetensors",
366
+ "model.language_model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
367
+ "model.language_model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
368
+ "model.language_model.layers.6.self_attn.q_norm.weight": "model-00001-of-00004.safetensors",
369
+ "model.language_model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
370
+ "model.language_model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
371
+ "model.language_model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
372
+ "model.language_model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
373
+ "model.language_model.layers.7.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
374
+ "model.language_model.layers.7.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
375
+ "model.language_model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
376
+ "model.language_model.layers.7.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
377
+ "model.language_model.layers.7.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
378
+ "model.language_model.layers.7.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
379
+ "model.language_model.layers.7.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
380
+ "model.language_model.layers.7.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
381
+ "model.language_model.layers.7.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
382
+ "model.language_model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
383
+ "model.language_model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
384
+ "model.language_model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
385
+ "model.language_model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
386
+ "model.language_model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
387
+ "model.language_model.layers.8.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
388
+ "model.language_model.layers.8.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
389
+ "model.language_model.layers.8.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
390
+ "model.language_model.layers.8.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
391
+ "model.language_model.layers.8.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
392
+ "model.language_model.layers.8.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
393
+ "model.language_model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
394
+ "model.language_model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
395
+ "model.language_model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
396
+ "model.language_model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
397
+ "model.language_model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
398
+ "model.language_model.layers.9.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
399
+ "model.language_model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
400
+ "model.language_model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
401
+ "model.language_model.layers.9.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
402
+ "model.language_model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
403
+ "model.language_model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
404
+ "model.language_model.norm.weight": "model-00004-of-00004.safetensors",
405
+ "model.visual.blocks.0.attn.proj.bias": "model-00001-of-00004.safetensors",
406
+ "model.visual.blocks.0.attn.proj.weight": "model-00001-of-00004.safetensors",
407
+ "model.visual.blocks.0.attn.qkv.bias": "model-00001-of-00004.safetensors",
408
+ "model.visual.blocks.0.attn.qkv.weight": "model-00001-of-00004.safetensors",
409
+ "model.visual.blocks.0.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
410
+ "model.visual.blocks.0.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
411
+ "model.visual.blocks.0.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
412
+ "model.visual.blocks.0.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
413
+ "model.visual.blocks.0.norm1.bias": "model-00001-of-00004.safetensors",
414
+ "model.visual.blocks.0.norm1.weight": "model-00001-of-00004.safetensors",
415
+ "model.visual.blocks.0.norm2.bias": "model-00001-of-00004.safetensors",
416
+ "model.visual.blocks.0.norm2.weight": "model-00001-of-00004.safetensors",
417
+ "model.visual.blocks.1.attn.proj.bias": "model-00001-of-00004.safetensors",
418
+ "model.visual.blocks.1.attn.proj.weight": "model-00001-of-00004.safetensors",
419
+ "model.visual.blocks.1.attn.qkv.bias": "model-00001-of-00004.safetensors",
420
+ "model.visual.blocks.1.attn.qkv.weight": "model-00001-of-00004.safetensors",
421
+ "model.visual.blocks.1.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
422
+ "model.visual.blocks.1.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
423
+ "model.visual.blocks.1.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
424
+ "model.visual.blocks.1.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
425
+ "model.visual.blocks.1.norm1.bias": "model-00001-of-00004.safetensors",
426
+ "model.visual.blocks.1.norm1.weight": "model-00001-of-00004.safetensors",
427
+ "model.visual.blocks.1.norm2.bias": "model-00001-of-00004.safetensors",
428
+ "model.visual.blocks.1.norm2.weight": "model-00001-of-00004.safetensors",
429
+ "model.visual.blocks.10.attn.proj.bias": "model-00001-of-00004.safetensors",
430
+ "model.visual.blocks.10.attn.proj.weight": "model-00001-of-00004.safetensors",
431
+ "model.visual.blocks.10.attn.qkv.bias": "model-00001-of-00004.safetensors",
432
+ "model.visual.blocks.10.attn.qkv.weight": "model-00001-of-00004.safetensors",
433
+ "model.visual.blocks.10.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
434
+ "model.visual.blocks.10.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
435
+ "model.visual.blocks.10.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
436
+ "model.visual.blocks.10.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
437
+ "model.visual.blocks.10.norm1.bias": "model-00001-of-00004.safetensors",
438
+ "model.visual.blocks.10.norm1.weight": "model-00001-of-00004.safetensors",
439
+ "model.visual.blocks.10.norm2.bias": "model-00001-of-00004.safetensors",
440
+ "model.visual.blocks.10.norm2.weight": "model-00001-of-00004.safetensors",
441
+ "model.visual.blocks.11.attn.proj.bias": "model-00001-of-00004.safetensors",
442
+ "model.visual.blocks.11.attn.proj.weight": "model-00001-of-00004.safetensors",
443
+ "model.visual.blocks.11.attn.qkv.bias": "model-00001-of-00004.safetensors",
444
+ "model.visual.blocks.11.attn.qkv.weight": "model-00001-of-00004.safetensors",
445
+ "model.visual.blocks.11.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
446
+ "model.visual.blocks.11.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
447
+ "model.visual.blocks.11.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
448
+ "model.visual.blocks.11.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
449
+ "model.visual.blocks.11.norm1.bias": "model-00001-of-00004.safetensors",
450
+ "model.visual.blocks.11.norm1.weight": "model-00001-of-00004.safetensors",
451
+ "model.visual.blocks.11.norm2.bias": "model-00001-of-00004.safetensors",
452
+ "model.visual.blocks.11.norm2.weight": "model-00001-of-00004.safetensors",
453
+ "model.visual.blocks.12.attn.proj.bias": "model-00001-of-00004.safetensors",
454
+ "model.visual.blocks.12.attn.proj.weight": "model-00001-of-00004.safetensors",
455
+ "model.visual.blocks.12.attn.qkv.bias": "model-00001-of-00004.safetensors",
456
+ "model.visual.blocks.12.attn.qkv.weight": "model-00001-of-00004.safetensors",
457
+ "model.visual.blocks.12.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
458
+ "model.visual.blocks.12.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
459
+ "model.visual.blocks.12.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
460
+ "model.visual.blocks.12.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
461
+ "model.visual.blocks.12.norm1.bias": "model-00001-of-00004.safetensors",
462
+ "model.visual.blocks.12.norm1.weight": "model-00001-of-00004.safetensors",
463
+ "model.visual.blocks.12.norm2.bias": "model-00001-of-00004.safetensors",
464
+ "model.visual.blocks.12.norm2.weight": "model-00001-of-00004.safetensors",
465
+ "model.visual.blocks.13.attn.proj.bias": "model-00001-of-00004.safetensors",
466
+ "model.visual.blocks.13.attn.proj.weight": "model-00001-of-00004.safetensors",
467
+ "model.visual.blocks.13.attn.qkv.bias": "model-00001-of-00004.safetensors",
468
+ "model.visual.blocks.13.attn.qkv.weight": "model-00001-of-00004.safetensors",
469
+ "model.visual.blocks.13.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
470
+ "model.visual.blocks.13.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
471
+ "model.visual.blocks.13.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
472
+ "model.visual.blocks.13.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
473
+ "model.visual.blocks.13.norm1.bias": "model-00001-of-00004.safetensors",
474
+ "model.visual.blocks.13.norm1.weight": "model-00001-of-00004.safetensors",
475
+ "model.visual.blocks.13.norm2.bias": "model-00001-of-00004.safetensors",
476
+ "model.visual.blocks.13.norm2.weight": "model-00001-of-00004.safetensors",
477
+ "model.visual.blocks.14.attn.proj.bias": "model-00001-of-00004.safetensors",
478
+ "model.visual.blocks.14.attn.proj.weight": "model-00001-of-00004.safetensors",
479
+ "model.visual.blocks.14.attn.qkv.bias": "model-00001-of-00004.safetensors",
480
+ "model.visual.blocks.14.attn.qkv.weight": "model-00001-of-00004.safetensors",
481
+ "model.visual.blocks.14.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
482
+ "model.visual.blocks.14.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
483
+ "model.visual.blocks.14.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
484
+ "model.visual.blocks.14.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
485
+ "model.visual.blocks.14.norm1.bias": "model-00001-of-00004.safetensors",
486
+ "model.visual.blocks.14.norm1.weight": "model-00001-of-00004.safetensors",
487
+ "model.visual.blocks.14.norm2.bias": "model-00001-of-00004.safetensors",
488
+ "model.visual.blocks.14.norm2.weight": "model-00001-of-00004.safetensors",
489
+ "model.visual.blocks.15.attn.proj.bias": "model-00001-of-00004.safetensors",
490
+ "model.visual.blocks.15.attn.proj.weight": "model-00001-of-00004.safetensors",
491
+ "model.visual.blocks.15.attn.qkv.bias": "model-00001-of-00004.safetensors",
492
+ "model.visual.blocks.15.attn.qkv.weight": "model-00001-of-00004.safetensors",
493
+ "model.visual.blocks.15.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
494
+ "model.visual.blocks.15.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
495
+ "model.visual.blocks.15.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
496
+ "model.visual.blocks.15.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
497
+ "model.visual.blocks.15.norm1.bias": "model-00001-of-00004.safetensors",
498
+ "model.visual.blocks.15.norm1.weight": "model-00001-of-00004.safetensors",
499
+ "model.visual.blocks.15.norm2.bias": "model-00001-of-00004.safetensors",
500
+ "model.visual.blocks.15.norm2.weight": "model-00001-of-00004.safetensors",
501
+ "model.visual.blocks.16.attn.proj.bias": "model-00001-of-00004.safetensors",
502
+ "model.visual.blocks.16.attn.proj.weight": "model-00001-of-00004.safetensors",
503
+ "model.visual.blocks.16.attn.qkv.bias": "model-00001-of-00004.safetensors",
504
+ "model.visual.blocks.16.attn.qkv.weight": "model-00001-of-00004.safetensors",
505
+ "model.visual.blocks.16.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
506
+ "model.visual.blocks.16.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
507
+ "model.visual.blocks.16.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
508
+ "model.visual.blocks.16.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
509
+ "model.visual.blocks.16.norm1.bias": "model-00001-of-00004.safetensors",
510
+ "model.visual.blocks.16.norm1.weight": "model-00001-of-00004.safetensors",
511
+ "model.visual.blocks.16.norm2.bias": "model-00001-of-00004.safetensors",
512
+ "model.visual.blocks.16.norm2.weight": "model-00001-of-00004.safetensors",
513
+ "model.visual.blocks.17.attn.proj.bias": "model-00001-of-00004.safetensors",
514
+ "model.visual.blocks.17.attn.proj.weight": "model-00001-of-00004.safetensors",
515
+ "model.visual.blocks.17.attn.qkv.bias": "model-00001-of-00004.safetensors",
516
+ "model.visual.blocks.17.attn.qkv.weight": "model-00001-of-00004.safetensors",
517
+ "model.visual.blocks.17.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
518
+ "model.visual.blocks.17.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
519
+ "model.visual.blocks.17.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
520
+ "model.visual.blocks.17.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
521
+ "model.visual.blocks.17.norm1.bias": "model-00001-of-00004.safetensors",
522
+ "model.visual.blocks.17.norm1.weight": "model-00001-of-00004.safetensors",
523
+ "model.visual.blocks.17.norm2.bias": "model-00001-of-00004.safetensors",
524
+ "model.visual.blocks.17.norm2.weight": "model-00001-of-00004.safetensors",
525
+ "model.visual.blocks.18.attn.proj.bias": "model-00001-of-00004.safetensors",
526
+ "model.visual.blocks.18.attn.proj.weight": "model-00001-of-00004.safetensors",
527
+ "model.visual.blocks.18.attn.qkv.bias": "model-00001-of-00004.safetensors",
528
+ "model.visual.blocks.18.attn.qkv.weight": "model-00001-of-00004.safetensors",
529
+ "model.visual.blocks.18.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
530
+ "model.visual.blocks.18.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
531
+ "model.visual.blocks.18.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
532
+ "model.visual.blocks.18.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
533
+ "model.visual.blocks.18.norm1.bias": "model-00001-of-00004.safetensors",
534
+ "model.visual.blocks.18.norm1.weight": "model-00001-of-00004.safetensors",
535
+ "model.visual.blocks.18.norm2.bias": "model-00001-of-00004.safetensors",
536
+ "model.visual.blocks.18.norm2.weight": "model-00001-of-00004.safetensors",
537
+ "model.visual.blocks.19.attn.proj.bias": "model-00001-of-00004.safetensors",
538
+ "model.visual.blocks.19.attn.proj.weight": "model-00001-of-00004.safetensors",
539
+ "model.visual.blocks.19.attn.qkv.bias": "model-00001-of-00004.safetensors",
540
+ "model.visual.blocks.19.attn.qkv.weight": "model-00001-of-00004.safetensors",
541
+ "model.visual.blocks.19.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
542
+ "model.visual.blocks.19.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
543
+ "model.visual.blocks.19.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
544
+ "model.visual.blocks.19.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
545
+ "model.visual.blocks.19.norm1.bias": "model-00001-of-00004.safetensors",
546
+ "model.visual.blocks.19.norm1.weight": "model-00001-of-00004.safetensors",
547
+ "model.visual.blocks.19.norm2.bias": "model-00001-of-00004.safetensors",
548
+ "model.visual.blocks.19.norm2.weight": "model-00001-of-00004.safetensors",
549
+ "model.visual.blocks.2.attn.proj.bias": "model-00001-of-00004.safetensors",
550
+ "model.visual.blocks.2.attn.proj.weight": "model-00001-of-00004.safetensors",
551
+ "model.visual.blocks.2.attn.qkv.bias": "model-00001-of-00004.safetensors",
552
+ "model.visual.blocks.2.attn.qkv.weight": "model-00001-of-00004.safetensors",
553
+ "model.visual.blocks.2.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
554
+ "model.visual.blocks.2.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
555
+ "model.visual.blocks.2.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
556
+ "model.visual.blocks.2.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
557
+ "model.visual.blocks.2.norm1.bias": "model-00001-of-00004.safetensors",
558
+ "model.visual.blocks.2.norm1.weight": "model-00001-of-00004.safetensors",
559
+ "model.visual.blocks.2.norm2.bias": "model-00001-of-00004.safetensors",
560
+ "model.visual.blocks.2.norm2.weight": "model-00001-of-00004.safetensors",
561
+ "model.visual.blocks.20.attn.proj.bias": "model-00001-of-00004.safetensors",
562
+ "model.visual.blocks.20.attn.proj.weight": "model-00001-of-00004.safetensors",
563
+ "model.visual.blocks.20.attn.qkv.bias": "model-00001-of-00004.safetensors",
564
+ "model.visual.blocks.20.attn.qkv.weight": "model-00001-of-00004.safetensors",
565
+ "model.visual.blocks.20.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
566
+ "model.visual.blocks.20.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
567
+ "model.visual.blocks.20.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
568
+ "model.visual.blocks.20.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
569
+ "model.visual.blocks.20.norm1.bias": "model-00001-of-00004.safetensors",
570
+ "model.visual.blocks.20.norm1.weight": "model-00001-of-00004.safetensors",
571
+ "model.visual.blocks.20.norm2.bias": "model-00001-of-00004.safetensors",
572
+ "model.visual.blocks.20.norm2.weight": "model-00001-of-00004.safetensors",
573
+ "model.visual.blocks.21.attn.proj.bias": "model-00001-of-00004.safetensors",
574
+ "model.visual.blocks.21.attn.proj.weight": "model-00001-of-00004.safetensors",
575
+ "model.visual.blocks.21.attn.qkv.bias": "model-00001-of-00004.safetensors",
576
+ "model.visual.blocks.21.attn.qkv.weight": "model-00001-of-00004.safetensors",
577
+ "model.visual.blocks.21.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
578
+ "model.visual.blocks.21.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
579
+ "model.visual.blocks.21.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
580
+ "model.visual.blocks.21.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
581
+ "model.visual.blocks.21.norm1.bias": "model-00001-of-00004.safetensors",
582
+ "model.visual.blocks.21.norm1.weight": "model-00001-of-00004.safetensors",
583
+ "model.visual.blocks.21.norm2.bias": "model-00001-of-00004.safetensors",
584
+ "model.visual.blocks.21.norm2.weight": "model-00001-of-00004.safetensors",
585
+ "model.visual.blocks.22.attn.proj.bias": "model-00001-of-00004.safetensors",
586
+ "model.visual.blocks.22.attn.proj.weight": "model-00001-of-00004.safetensors",
587
+ "model.visual.blocks.22.attn.qkv.bias": "model-00001-of-00004.safetensors",
588
+ "model.visual.blocks.22.attn.qkv.weight": "model-00001-of-00004.safetensors",
589
+ "model.visual.blocks.22.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
590
+ "model.visual.blocks.22.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
591
+ "model.visual.blocks.22.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
592
+ "model.visual.blocks.22.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
593
+ "model.visual.blocks.22.norm1.bias": "model-00001-of-00004.safetensors",
594
+ "model.visual.blocks.22.norm1.weight": "model-00001-of-00004.safetensors",
595
+ "model.visual.blocks.22.norm2.bias": "model-00001-of-00004.safetensors",
596
+ "model.visual.blocks.22.norm2.weight": "model-00001-of-00004.safetensors",
597
+ "model.visual.blocks.23.attn.proj.bias": "model-00001-of-00004.safetensors",
598
+ "model.visual.blocks.23.attn.proj.weight": "model-00001-of-00004.safetensors",
599
+ "model.visual.blocks.23.attn.qkv.bias": "model-00001-of-00004.safetensors",
600
+ "model.visual.blocks.23.attn.qkv.weight": "model-00001-of-00004.safetensors",
601
+ "model.visual.blocks.23.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
602
+ "model.visual.blocks.23.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
603
+ "model.visual.blocks.23.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
604
+ "model.visual.blocks.23.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
605
+ "model.visual.blocks.23.norm1.bias": "model-00001-of-00004.safetensors",
606
+ "model.visual.blocks.23.norm1.weight": "model-00001-of-00004.safetensors",
607
+ "model.visual.blocks.23.norm2.bias": "model-00001-of-00004.safetensors",
608
+ "model.visual.blocks.23.norm2.weight": "model-00001-of-00004.safetensors",
609
+ "model.visual.blocks.24.attn.proj.bias": "model-00001-of-00004.safetensors",
610
+ "model.visual.blocks.24.attn.proj.weight": "model-00001-of-00004.safetensors",
611
+ "model.visual.blocks.24.attn.qkv.bias": "model-00001-of-00004.safetensors",
612
+ "model.visual.blocks.24.attn.qkv.weight": "model-00001-of-00004.safetensors",
613
+ "model.visual.blocks.24.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
614
+ "model.visual.blocks.24.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
615
+ "model.visual.blocks.24.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
616
+ "model.visual.blocks.24.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
617
+ "model.visual.blocks.24.norm1.bias": "model-00001-of-00004.safetensors",
618
+ "model.visual.blocks.24.norm1.weight": "model-00001-of-00004.safetensors",
619
+ "model.visual.blocks.24.norm2.bias": "model-00001-of-00004.safetensors",
620
+ "model.visual.blocks.24.norm2.weight": "model-00001-of-00004.safetensors",
621
+ "model.visual.blocks.25.attn.proj.bias": "model-00001-of-00004.safetensors",
622
+ "model.visual.blocks.25.attn.proj.weight": "model-00001-of-00004.safetensors",
623
+ "model.visual.blocks.25.attn.qkv.bias": "model-00001-of-00004.safetensors",
624
+ "model.visual.blocks.25.attn.qkv.weight": "model-00001-of-00004.safetensors",
625
+ "model.visual.blocks.25.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
626
+ "model.visual.blocks.25.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
627
+ "model.visual.blocks.25.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
628
+ "model.visual.blocks.25.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
629
+ "model.visual.blocks.25.norm1.bias": "model-00001-of-00004.safetensors",
630
+ "model.visual.blocks.25.norm1.weight": "model-00001-of-00004.safetensors",
631
+ "model.visual.blocks.25.norm2.bias": "model-00001-of-00004.safetensors",
632
+ "model.visual.blocks.25.norm2.weight": "model-00001-of-00004.safetensors",
633
+ "model.visual.blocks.26.attn.proj.bias": "model-00001-of-00004.safetensors",
634
+ "model.visual.blocks.26.attn.proj.weight": "model-00001-of-00004.safetensors",
635
+ "model.visual.blocks.26.attn.qkv.bias": "model-00001-of-00004.safetensors",
636
+ "model.visual.blocks.26.attn.qkv.weight": "model-00001-of-00004.safetensors",
637
+ "model.visual.blocks.26.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
638
+ "model.visual.blocks.26.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
639
+ "model.visual.blocks.26.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
640
+ "model.visual.blocks.26.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
641
+ "model.visual.blocks.26.norm1.bias": "model-00001-of-00004.safetensors",
642
+ "model.visual.blocks.26.norm1.weight": "model-00001-of-00004.safetensors",
643
+ "model.visual.blocks.26.norm2.bias": "model-00001-of-00004.safetensors",
644
+ "model.visual.blocks.26.norm2.weight": "model-00001-of-00004.safetensors",
645
+ "model.visual.blocks.3.attn.proj.bias": "model-00001-of-00004.safetensors",
646
+ "model.visual.blocks.3.attn.proj.weight": "model-00001-of-00004.safetensors",
647
+ "model.visual.blocks.3.attn.qkv.bias": "model-00001-of-00004.safetensors",
648
+ "model.visual.blocks.3.attn.qkv.weight": "model-00001-of-00004.safetensors",
649
+ "model.visual.blocks.3.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
650
+ "model.visual.blocks.3.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
651
+ "model.visual.blocks.3.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
652
+ "model.visual.blocks.3.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
653
+ "model.visual.blocks.3.norm1.bias": "model-00001-of-00004.safetensors",
654
+ "model.visual.blocks.3.norm1.weight": "model-00001-of-00004.safetensors",
655
+ "model.visual.blocks.3.norm2.bias": "model-00001-of-00004.safetensors",
656
+ "model.visual.blocks.3.norm2.weight": "model-00001-of-00004.safetensors",
657
+ "model.visual.blocks.4.attn.proj.bias": "model-00001-of-00004.safetensors",
658
+ "model.visual.blocks.4.attn.proj.weight": "model-00001-of-00004.safetensors",
659
+ "model.visual.blocks.4.attn.qkv.bias": "model-00001-of-00004.safetensors",
660
+ "model.visual.blocks.4.attn.qkv.weight": "model-00001-of-00004.safetensors",
661
+ "model.visual.blocks.4.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
662
+ "model.visual.blocks.4.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
663
+ "model.visual.blocks.4.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
664
+ "model.visual.blocks.4.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
665
+ "model.visual.blocks.4.norm1.bias": "model-00001-of-00004.safetensors",
666
+ "model.visual.blocks.4.norm1.weight": "model-00001-of-00004.safetensors",
667
+ "model.visual.blocks.4.norm2.bias": "model-00001-of-00004.safetensors",
668
+ "model.visual.blocks.4.norm2.weight": "model-00001-of-00004.safetensors",
669
+ "model.visual.blocks.5.attn.proj.bias": "model-00001-of-00004.safetensors",
670
+ "model.visual.blocks.5.attn.proj.weight": "model-00001-of-00004.safetensors",
671
+ "model.visual.blocks.5.attn.qkv.bias": "model-00001-of-00004.safetensors",
672
+ "model.visual.blocks.5.attn.qkv.weight": "model-00001-of-00004.safetensors",
673
+ "model.visual.blocks.5.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
674
+ "model.visual.blocks.5.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
675
+ "model.visual.blocks.5.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
676
+ "model.visual.blocks.5.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
677
+ "model.visual.blocks.5.norm1.bias": "model-00001-of-00004.safetensors",
678
+ "model.visual.blocks.5.norm1.weight": "model-00001-of-00004.safetensors",
679
+ "model.visual.blocks.5.norm2.bias": "model-00001-of-00004.safetensors",
680
+ "model.visual.blocks.5.norm2.weight": "model-00001-of-00004.safetensors",
681
+ "model.visual.blocks.6.attn.proj.bias": "model-00001-of-00004.safetensors",
682
+ "model.visual.blocks.6.attn.proj.weight": "model-00001-of-00004.safetensors",
683
+ "model.visual.blocks.6.attn.qkv.bias": "model-00001-of-00004.safetensors",
684
+ "model.visual.blocks.6.attn.qkv.weight": "model-00001-of-00004.safetensors",
685
+ "model.visual.blocks.6.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
686
+ "model.visual.blocks.6.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
687
+ "model.visual.blocks.6.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
688
+ "model.visual.blocks.6.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
689
+ "model.visual.blocks.6.norm1.bias": "model-00001-of-00004.safetensors",
690
+ "model.visual.blocks.6.norm1.weight": "model-00001-of-00004.safetensors",
691
+ "model.visual.blocks.6.norm2.bias": "model-00001-of-00004.safetensors",
692
+ "model.visual.blocks.6.norm2.weight": "model-00001-of-00004.safetensors",
693
+ "model.visual.blocks.7.attn.proj.bias": "model-00001-of-00004.safetensors",
694
+ "model.visual.blocks.7.attn.proj.weight": "model-00001-of-00004.safetensors",
695
+ "model.visual.blocks.7.attn.qkv.bias": "model-00001-of-00004.safetensors",
696
+ "model.visual.blocks.7.attn.qkv.weight": "model-00001-of-00004.safetensors",
697
+ "model.visual.blocks.7.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
698
+ "model.visual.blocks.7.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
699
+ "model.visual.blocks.7.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
700
+ "model.visual.blocks.7.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
701
+ "model.visual.blocks.7.norm1.bias": "model-00001-of-00004.safetensors",
702
+ "model.visual.blocks.7.norm1.weight": "model-00001-of-00004.safetensors",
703
+ "model.visual.blocks.7.norm2.bias": "model-00001-of-00004.safetensors",
704
+ "model.visual.blocks.7.norm2.weight": "model-00001-of-00004.safetensors",
705
+ "model.visual.blocks.8.attn.proj.bias": "model-00001-of-00004.safetensors",
706
+ "model.visual.blocks.8.attn.proj.weight": "model-00001-of-00004.safetensors",
707
+ "model.visual.blocks.8.attn.qkv.bias": "model-00001-of-00004.safetensors",
708
+ "model.visual.blocks.8.attn.qkv.weight": "model-00001-of-00004.safetensors",
709
+ "model.visual.blocks.8.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
710
+ "model.visual.blocks.8.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
711
+ "model.visual.blocks.8.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
712
+ "model.visual.blocks.8.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
713
+ "model.visual.blocks.8.norm1.bias": "model-00001-of-00004.safetensors",
714
+ "model.visual.blocks.8.norm1.weight": "model-00001-of-00004.safetensors",
715
+ "model.visual.blocks.8.norm2.bias": "model-00001-of-00004.safetensors",
716
+ "model.visual.blocks.8.norm2.weight": "model-00001-of-00004.safetensors",
717
+ "model.visual.blocks.9.attn.proj.bias": "model-00001-of-00004.safetensors",
718
+ "model.visual.blocks.9.attn.proj.weight": "model-00001-of-00004.safetensors",
719
+ "model.visual.blocks.9.attn.qkv.bias": "model-00001-of-00004.safetensors",
720
+ "model.visual.blocks.9.attn.qkv.weight": "model-00001-of-00004.safetensors",
721
+ "model.visual.blocks.9.mlp.linear_fc1.bias": "model-00001-of-00004.safetensors",
722
+ "model.visual.blocks.9.mlp.linear_fc1.weight": "model-00001-of-00004.safetensors",
723
+ "model.visual.blocks.9.mlp.linear_fc2.bias": "model-00001-of-00004.safetensors",
724
+ "model.visual.blocks.9.mlp.linear_fc2.weight": "model-00001-of-00004.safetensors",
725
+ "model.visual.blocks.9.norm1.bias": "model-00001-of-00004.safetensors",
726
+ "model.visual.blocks.9.norm1.weight": "model-00001-of-00004.safetensors",
727
+ "model.visual.blocks.9.norm2.bias": "model-00001-of-00004.safetensors",
728
+ "model.visual.blocks.9.norm2.weight": "model-00001-of-00004.safetensors",
729
+ "model.visual.deepstack_merger_list.0.linear_fc1.bias": "model-00001-of-00004.safetensors",
730
+ "model.visual.deepstack_merger_list.0.linear_fc1.weight": "model-00001-of-00004.safetensors",
731
+ "model.visual.deepstack_merger_list.0.linear_fc2.bias": "model-00001-of-00004.safetensors",
732
+ "model.visual.deepstack_merger_list.0.linear_fc2.weight": "model-00001-of-00004.safetensors",
733
+ "model.visual.deepstack_merger_list.0.norm.bias": "model-00001-of-00004.safetensors",
734
+ "model.visual.deepstack_merger_list.0.norm.weight": "model-00001-of-00004.safetensors",
735
+ "model.visual.deepstack_merger_list.1.linear_fc1.bias": "model-00001-of-00004.safetensors",
736
+ "model.visual.deepstack_merger_list.1.linear_fc1.weight": "model-00001-of-00004.safetensors",
737
+ "model.visual.deepstack_merger_list.1.linear_fc2.bias": "model-00001-of-00004.safetensors",
738
+ "model.visual.deepstack_merger_list.1.linear_fc2.weight": "model-00001-of-00004.safetensors",
739
+ "model.visual.deepstack_merger_list.1.norm.bias": "model-00001-of-00004.safetensors",
740
+ "model.visual.deepstack_merger_list.1.norm.weight": "model-00001-of-00004.safetensors",
741
+ "model.visual.deepstack_merger_list.2.linear_fc1.bias": "model-00001-of-00004.safetensors",
742
+ "model.visual.deepstack_merger_list.2.linear_fc1.weight": "model-00001-of-00004.safetensors",
743
+ "model.visual.deepstack_merger_list.2.linear_fc2.bias": "model-00001-of-00004.safetensors",
744
+ "model.visual.deepstack_merger_list.2.linear_fc2.weight": "model-00001-of-00004.safetensors",
745
+ "model.visual.deepstack_merger_list.2.norm.bias": "model-00001-of-00004.safetensors",
746
+ "model.visual.deepstack_merger_list.2.norm.weight": "model-00001-of-00004.safetensors",
747
+ "model.visual.merger.linear_fc1.bias": "model-00001-of-00004.safetensors",
748
+ "model.visual.merger.linear_fc1.weight": "model-00001-of-00004.safetensors",
749
+ "model.visual.merger.linear_fc2.bias": "model-00001-of-00004.safetensors",
750
+ "model.visual.merger.linear_fc2.weight": "model-00001-of-00004.safetensors",
751
+ "model.visual.merger.norm.bias": "model-00001-of-00004.safetensors",
752
+ "model.visual.merger.norm.weight": "model-00001-of-00004.safetensors",
753
+ "model.visual.patch_embed.proj.bias": "model-00001-of-00004.safetensors",
754
+ "model.visual.patch_embed.proj.weight": "model-00001-of-00004.safetensors",
755
+ "model.visual.pos_embed.weight": "model-00001-of-00004.safetensors"
756
+ }
757
+ }
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.base.modules.transformer.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.sentence_transformer.modules.normalize.Normalize"
19
+ }
20
+ ]
preprocessor_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": true,
9
+ "do_normalize": true,
10
+ "do_pad": null,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_processor_type": "Qwen2VLImageProcessorFast",
19
+ "image_std": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "input_data_format": null,
25
+ "max_pixels": 1310720,
26
+ "merge_size": 2,
27
+ "min_pixels": 4096,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_tensors": null,
34
+ "size": {
35
+ "longest_edge": 1310720,
36
+ "shortest_edge": 4096
37
+ },
38
+ "temporal_patch_size": 2
39
+ }
scripts/qwen3_vl_embedding.py ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn.functional as F
3
+ import unicodedata
4
+ import numpy as np
5
+ import logging
6
+
7
+ from PIL import Image
8
+ from dataclasses import dataclass
9
+ from typing import Optional, List, Union, Dict, Any
10
+ from transformers.models.qwen3_vl.modeling_qwen3_vl import Qwen3VLPreTrainedModel, Qwen3VLModel, Qwen3VLConfig
11
+ from transformers.models.qwen3_vl.processing_qwen3_vl import Qwen3VLProcessor
12
+ from transformers.modeling_outputs import ModelOutput
13
+ from transformers.processing_utils import Unpack
14
+ from transformers.utils import TransformersKwargs
15
+ from transformers.cache_utils import Cache
16
+ from transformers.utils.generic import check_model_inputs
17
+ from qwen_vl_utils.vision_process import process_vision_info
18
+
19
+ logger = logging.getLogger(__name__)
20
+
21
+ # Constants for configuration
22
+ MAX_LENGTH = 8192
23
+ IMAGE_BASE_FACTOR = 16
24
+ IMAGE_FACTOR = IMAGE_BASE_FACTOR * 2
25
+ MIN_PIXELS = 4 * IMAGE_FACTOR * IMAGE_FACTOR
26
+ MAX_PIXELS = 1800 * IMAGE_FACTOR * IMAGE_FACTOR
27
+ FPS = 1
28
+ MAX_FRAMES = 64
29
+ FRAME_MAX_PIXELS = 768 * IMAGE_FACTOR * IMAGE_FACTOR
30
+ MAX_TOTAL_PIXELS = 10 * FRAME_MAX_PIXELS
31
+ PAD_TOKEN = "<|endoftext|>"
32
+
33
+ # Define output structure for embeddings
34
+ @dataclass
35
+ class Qwen3VLForEmbeddingOutput(ModelOutput):
36
+ last_hidden_state: Optional[torch.FloatTensor] = None
37
+ attention_mask: Optional[torch.Tensor] = None
38
+
39
+ # Define model class to compute embeddings
40
+ class Qwen3VLForEmbedding(Qwen3VLPreTrainedModel):
41
+ _checkpoint_conversion_mapping = {}
42
+ accepts_loss_kwargs = False
43
+ config: Qwen3VLConfig
44
+
45
+ def __init__(self, config):
46
+ super().__init__(config)
47
+ self.model = Qwen3VLModel(config)
48
+ self.post_init()
49
+
50
+ def get_input_embeddings(self):
51
+ return self.model.get_input_embeddings()
52
+
53
+ def set_input_embeddings(self, value):
54
+ self.model.set_input_embeddings(value)
55
+
56
+ def set_decoder(self, decoder):
57
+ self.model.set_decoder(decoder)
58
+
59
+ def get_decoder(self):
60
+ return self.model.get_decoder()
61
+
62
+ # Extract video features from model
63
+ def get_video_features(self, pixel_values_videos: torch.FloatTensor,
64
+ video_grid_thw: Optional[torch.LongTensor] = None):
65
+ return self.model.get_video_features(pixel_values_videos, video_grid_thw)
66
+
67
+ # Extract image features from model
68
+ def get_image_features(self, pixel_values: torch.FloatTensor,
69
+ image_grid_thw: Optional[torch.LongTensor] = None):
70
+ return self.model.get_image_features(pixel_values, image_grid_thw)
71
+
72
+ # Make modules accessible through properties
73
+ @property
74
+ def language_model(self):
75
+ return self.model.language_model
76
+
77
+ @property
78
+ def visual(self):
79
+ return self.model.visual
80
+
81
+ # Forward pass through model with input parameters
82
+ # @check_model_inputs
83
+ def forward(self,
84
+ input_ids: torch.LongTensor = None,
85
+ attention_mask: Optional[torch.Tensor] = None,
86
+ position_ids: Optional[torch.LongTensor] = None,
87
+ past_key_values: Optional[Cache] = None,
88
+ inputs_embeds: Optional[torch.FloatTensor] = None,
89
+ pixel_values: Optional[torch.Tensor] = None,
90
+ pixel_values_videos: Optional[torch.FloatTensor] = None,
91
+ image_grid_thw: Optional[torch.LongTensor] = None,
92
+ video_grid_thw: Optional[torch.LongTensor] = None,
93
+ cache_position: Optional[torch.LongTensor] = None,
94
+ logits_to_keep: Union[int, torch.Tensor] = 0,
95
+ **kwargs: Unpack[TransformersKwargs],
96
+ ) -> Union[tuple, Qwen3VLForEmbeddingOutput]:
97
+ # Pass inputs through the model
98
+ outputs = self.model(
99
+ input_ids=input_ids,
100
+ pixel_values=pixel_values,
101
+ pixel_values_videos=pixel_values_videos,
102
+ image_grid_thw=image_grid_thw,
103
+ video_grid_thw=video_grid_thw,
104
+ position_ids=position_ids,
105
+ attention_mask=attention_mask,
106
+ past_key_values=past_key_values,
107
+ inputs_embeds=inputs_embeds,
108
+ cache_position=cache_position,
109
+ **kwargs,
110
+ )
111
+ # Return the model output
112
+ return Qwen3VLForEmbeddingOutput(
113
+ last_hidden_state=outputs.last_hidden_state,
114
+ attention_mask=attention_mask,
115
+ )
116
+
117
+ def sample_frames(frames: List[Union[str, Image.Image]], num_segments: int, max_segments: int) -> List[str]:
118
+ duration = len(frames)
119
+ frame_id_array = np.linspace(0, duration - 1, num_segments, dtype=int)
120
+ frame_id_list = frame_id_array.tolist()
121
+ last_frame_id = frame_id_list[-1]
122
+
123
+ # Create a list of sampled frames
124
+ sampled_frames = []
125
+ for frame_idx in frame_id_list:
126
+ try:
127
+ sampled_frames.append(frames[frame_idx])
128
+ except:
129
+ break
130
+ # Ensure the sampled list meets the required segment count
131
+ while len(sampled_frames) < num_segments:
132
+ sampled_frames.append(frames[last_frame_id])
133
+ return sampled_frames[:max_segments]
134
+
135
+ # Define embedder class for processing inputs and generating embeddings
136
+ class Qwen3VLEmbedder():
137
+ def __init__(
138
+ self,
139
+ model_name_or_path: str,
140
+ max_length: int = MAX_LENGTH,
141
+ min_pixels: int = MIN_PIXELS,
142
+ max_pixels: int = MAX_PIXELS,
143
+ total_pixels: int = MAX_TOTAL_PIXELS,
144
+ fps: float = FPS,
145
+ num_frames: int = MAX_FRAMES,
146
+ max_frames: int = MAX_FRAMES,
147
+ default_instruction: str = "Represent the user's input.",
148
+ **kwargs
149
+ ):
150
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
151
+
152
+ self.max_length = max_length
153
+ self.min_pixels = min_pixels
154
+ self.max_pixels = max_pixels
155
+ self.total_pixels = total_pixels
156
+ self.fps = fps
157
+ self.num_frames = num_frames
158
+ self.max_frames = max_frames
159
+
160
+ self.default_instruction = default_instruction
161
+
162
+ self.model = Qwen3VLForEmbedding.from_pretrained(
163
+ model_name_or_path, trust_remote_code=True, **kwargs
164
+ ).to(device)
165
+ self.processor = Qwen3VLProcessor.from_pretrained(
166
+ model_name_or_path, padding_side='right'
167
+ )
168
+ self.model.eval()
169
+
170
+ @torch.no_grad()
171
+ def forward(self, inputs: Dict[str, Any]) -> Dict[str, torch.Tensor]:
172
+ outputs = self.model(**inputs)
173
+ return {
174
+ 'last_hidden_state': outputs.last_hidden_state,
175
+ 'attention_mask': inputs.get('attention_mask')
176
+ }
177
+
178
+ # Truncate token sequence to a specified max length
179
+ def _truncate_tokens(self, token_ids: List[int], max_length: int) -> List[int]:
180
+ if len(token_ids) <= max_length:
181
+ return token_ids
182
+
183
+ special_token_ids = set(self.processor.tokenizer.all_special_ids)
184
+ num_special = sum(1 for token_idx in token_ids if token_idx in special_token_ids)
185
+ num_non_special_to_keep = max_length - num_special
186
+
187
+ final_token_ids = []
188
+ non_special_kept_count = 0
189
+ # Ensure retention of special tokens while truncating the rest
190
+ for token_idx in token_ids:
191
+ if token_idx in special_token_ids:
192
+ final_token_ids.append(token_idx)
193
+ elif non_special_kept_count < num_non_special_to_keep:
194
+ final_token_ids.append(token_idx)
195
+ non_special_kept_count += 1
196
+ return final_token_ids
197
+
198
+ # Format input based on provided text, image, video, and instruction
199
+ def format_model_input(
200
+ self, text: Optional[str] = None,
201
+ image: Optional[Union[str, Image.Image]] = None,
202
+ video: Optional[Union[str, List[Union[str, Image.Image]]]] = None,
203
+ instruction: Optional[str] = None,
204
+ fps: Optional[float] = None,
205
+ max_frames: Optional[int] = None
206
+ ) -> List[Dict]:
207
+
208
+ # Ensure instruction ends with punctuation
209
+ if instruction:
210
+ instruction = instruction.strip()
211
+ if instruction and not unicodedata.category(instruction[-1]).startswith('P'):
212
+ instruction = instruction + '.'
213
+
214
+ # Initialize conversation with system prompts
215
+ content = []
216
+ conversation = [
217
+ {"role": "system", "content": [{"type": "text", "text": instruction or self.default_instruction}]},
218
+ {"role": "user", "content": content}
219
+ ]
220
+
221
+ # Add text, image, or video content to conversation
222
+ if not text and not image and not video:
223
+ content.append({'type': 'text', 'text': "NULL"})
224
+ return conversation
225
+
226
+ if video:
227
+ video_content = None
228
+ video_kwargs = { 'total_pixels': self.total_pixels }
229
+ if isinstance(video, list):
230
+ video_content = video
231
+ if self.num_frames is not None or self.max_frames is not None:
232
+ video_content = sample_frames(video_content, self.num_frames, self.max_frames)
233
+ video_content = [
234
+ ('file://' + ele if isinstance(ele, str) else ele)
235
+ for ele in video_content
236
+ ]
237
+ elif isinstance(video, str):
238
+ video_content = video if video.startswith(('http://', 'https://')) else 'file://' + video
239
+ video_kwargs = {'fps': fps or self.fps, 'max_frames': max_frames or self.max_frames,}
240
+ else:
241
+ raise TypeError(f"Unrecognized video type: {type(video)}")
242
+
243
+ # Add video input details to content
244
+ if video_content:
245
+ content.append({
246
+ 'type': 'video', 'video': video_content,
247
+ **video_kwargs
248
+ })
249
+
250
+ if image:
251
+ image_content = None
252
+ if isinstance(image, Image.Image):
253
+ image_content = image
254
+ elif isinstance(image, str):
255
+ image_content = image if image.startswith(('http', 'oss')) else 'file://' + image
256
+ else:
257
+ raise TypeError(f"Unrecognized image type: {type(image)}")
258
+
259
+ # Add image input details to content
260
+ if image_content:
261
+ content.append({
262
+ 'type': 'image', 'image': image_content,
263
+ "min_pixels": self.min_pixels,
264
+ "max_pixels": self.max_pixels
265
+ })
266
+
267
+ if text:
268
+ content.append({'type': 'text', 'text': text})
269
+
270
+ return conversation
271
+
272
+ # Preprocess input conversations for model consumption
273
+ def _preprocess_inputs(self, conversations: List[List[Dict]]) -> Dict[str, torch.Tensor]:
274
+ text = self.processor.apply_chat_template(
275
+ conversations, add_generation_prompt=True, tokenize=False
276
+ )
277
+
278
+ try:
279
+ images, video_inputs, video_kwargs = process_vision_info(
280
+ conversations, image_patch_size=16,
281
+ return_video_metadata=True, return_video_kwargs=True
282
+ )
283
+ except Exception as e:
284
+ logger.error(f"Error in processing vision info: {e}")
285
+ images = None
286
+ video_inputs = None
287
+ video_kwargs = {'do_sample_frames': False}
288
+ text = self.processor.apply_chat_template(
289
+ [{'role': 'user', 'content': [{'type': 'text', 'text': 'NULL'}]}],
290
+ add_generation_prompt=True, tokenize=False
291
+ )
292
+
293
+ if video_inputs is not None:
294
+ videos, video_metadata = zip(*video_inputs)
295
+ videos = list(videos)
296
+ video_metadata = list(video_metadata)
297
+ else:
298
+ videos, video_metadata = None, None
299
+
300
+ inputs = self.processor(
301
+ text=text, images=images, videos=videos, video_metadata=video_metadata, truncation=True,
302
+ max_length=self.max_length, padding=True, do_resize=False, return_tensors='pt',
303
+ **video_kwargs
304
+ )
305
+ return inputs
306
+
307
+ # Pool the last hidden state by attention mask for embeddings
308
+ @staticmethod
309
+ def _pooling_last(hidden_state: torch.Tensor, attention_mask: torch.Tensor) -> torch.Tensor:
310
+ flipped_tensor = attention_mask.flip(dims=[1])
311
+ last_one_positions = flipped_tensor.argmax(dim=1)
312
+ col = attention_mask.shape[1] - last_one_positions - 1
313
+ row = torch.arange(hidden_state.shape[0], device=hidden_state.device)
314
+ return hidden_state[row, col]
315
+
316
+ # Process inputs to generate normalized embeddings
317
+ def process(self, inputs: List[Dict[str, Any]], normalize: bool = True) -> tuple:
318
+ conversations = [self.format_model_input(
319
+ text=ele.get('text'),
320
+ image=ele.get('image'),
321
+ video=ele.get('video'),
322
+ instruction=ele.get('instruction'),
323
+ fps=ele.get('fps'),
324
+ max_frames=ele.get('max_frames')
325
+ ) for ele in inputs]
326
+
327
+ processed_inputs = self._preprocess_inputs(conversations)
328
+ processed_inputs = {k: v.to(self.model.device) for k, v in processed_inputs.items()}
329
+
330
+ outputs = self.forward(processed_inputs)
331
+ embeddings = self._pooling_last(outputs['last_hidden_state'], outputs['attention_mask'])
332
+
333
+ # Normalize the embeddings if specified
334
+ if normalize:
335
+ embeddings = F.normalize(embeddings, p=2, dim=-1)
336
+
337
+ return embeddings
sentence_bert_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "transformer_task": "feature-extraction",
3
+ "modality_config": {
4
+ "text": {
5
+ "method": "forward",
6
+ "method_output_name": "last_hidden_state"
7
+ },
8
+ "image": {
9
+ "method": "forward",
10
+ "method_output_name": "last_hidden_state"
11
+ },
12
+ "video": {
13
+ "method": "forward",
14
+ "method_output_name": "last_hidden_state"
15
+ },
16
+ "message": {
17
+ "method": "forward",
18
+ "method_output_name": "last_hidden_state",
19
+ "format": "structured"
20
+ }
21
+ },
22
+ "module_output_name": "token_embeddings",
23
+ "processing_kwargs": {
24
+ "chat_template": {
25
+ "add_generation_prompt": true
26
+ }
27
+ },
28
+ "unpad_inputs": false
29
+ }
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:def76fb086971c7867b829c23a26261e38d9d74e02139253b38aeb9df8b4b50a
3
+ size 11423705
tokenizer_config.json ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 262144,
235
+ "pad_token": "<|endoftext|>",
236
+ "split_special_tokens": false,
237
+ "tokenizer_class": "Qwen2Tokenizer",
238
+ "unk_token": null
239
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "do_center_crop": null,
7
+ "do_convert_rgb": true,
8
+ "do_normalize": true,
9
+ "do_rescale": true,
10
+ "do_resize": true,
11
+ "do_sample_frames": true,
12
+ "fps": 2,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_std": [
19
+ 0.5,
20
+ 0.5,
21
+ 0.5
22
+ ],
23
+ "input_data_format": null,
24
+ "max_frames": 768,
25
+ "merge_size": 2,
26
+ "min_frames": 4,
27
+ "num_frames": null,
28
+ "pad_size": null,
29
+ "patch_size": 16,
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "resample": 3,
32
+ "rescale_factor": 0.00392156862745098,
33
+ "return_metadata": false,
34
+ "size": {
35
+ "longest_edge": 25165824,
36
+ "shortest_edge": 4096
37
+ },
38
+ "temporal_patch_size": 2,
39
+ "video_metadata": null,
40
+ "video_processor_type": "Qwen3VLVideoProcessor"
41
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff