tomaarsen HF Staff commited on
Commit
f6d5fbe
·
verified ·
1 Parent(s): 5cfe10a

Add new MultiVectorEncoder model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/example_image_0.jpg filter=lfs diff=lfs merge=lfs -text
37
+ assets/example_image_1.jpg filter=lfs diff=lfs merge=lfs -text
38
+ assets/image_0.jpg filter=lfs diff=lfs merge=lfs -text
39
+ assets/image_1.jpg filter=lfs diff=lfs merge=lfs -text
40
+ assets/image_2.jpg filter=lfs diff=lfs merge=lfs -text
41
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Dense/config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "in_features": 2048,
3
+ "out_features": 128,
4
+ "bias": false,
5
+ "activation_function": "torch.nn.modules.linear.Identity",
6
+ "module_input_name": "token_embeddings",
7
+ "module_output_name": "token_embeddings"
8
+ }
1_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aee1706dce651e897768f8d9b1a03805f11f4b282021316c872263665f048111
3
+ size 524376
2_MultiVectorMask/config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "skiplist_words": [],
3
+ "keep_only_token_ids": null
4
+ }
3_Normalize/config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "module_input_name": "token_embeddings",
3
+ "module_output_name": "token_embeddings"
4
+ }
README.md ADDED
@@ -0,0 +1,467 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - multi-vector
5
+ - colbert
6
+ - late-interaction
7
+ - generated_from_trainer
8
+ - dataset_size:10000
9
+ - loss:CachedMultiVectorMultipleNegativesRankingLoss
10
+ base_model: Qwen/Qwen3-VL-Embedding-2B
11
+ widget:
12
+ - text: What are the traditional practices of indigenous peoples in managing their
13
+ lands and territories?
14
+ - text: How does the tracking and commission distribution work in affiliate marketing
15
+ when a user makes a purchase?
16
+ - text: How many climate adaptation activities by Indigenous peoples are identified?
17
+ - text: What is the founding novel of the cyberpunk subgenre?
18
+ - text: Where can observable equity security prices be found, as per ASC 321-10?
19
+ pipeline_tag: feature-extraction
20
+ library_name: sentence-transformers
21
+ metrics:
22
+ - maxsim_accuracy@1
23
+ - maxsim_accuracy@3
24
+ - maxsim_accuracy@5
25
+ - maxsim_accuracy@10
26
+ - maxsim_precision@1
27
+ - maxsim_precision@3
28
+ - maxsim_precision@5
29
+ - maxsim_precision@10
30
+ - maxsim_recall@1
31
+ - maxsim_recall@3
32
+ - maxsim_recall@5
33
+ - maxsim_recall@10
34
+ - maxsim_ndcg@10
35
+ - maxsim_mrr@10
36
+ - maxsim_map@100
37
+ model-index:
38
+ - name: Multi-Vector Encoder
39
+ results:
40
+ - task:
41
+ type: multi-vector-information-retrieval
42
+ name: Multi Vector Information Retrieval
43
+ dataset:
44
+ name: vdr eval hard
45
+ type: vdr-eval-hard
46
+ metrics:
47
+ - type: maxsim_accuracy@1
48
+ value: 0.8466666666666667
49
+ name: Maxsim Accuracy@1
50
+ - type: maxsim_accuracy@3
51
+ value: 0.9566666666666667
52
+ name: Maxsim Accuracy@3
53
+ - type: maxsim_accuracy@5
54
+ value: 0.98
55
+ name: Maxsim Accuracy@5
56
+ - type: maxsim_accuracy@10
57
+ value: 0.9966666666666667
58
+ name: Maxsim Accuracy@10
59
+ - type: maxsim_precision@1
60
+ value: 0.8466666666666667
61
+ name: Maxsim Precision@1
62
+ - type: maxsim_precision@3
63
+ value: 0.31888888888888883
64
+ name: Maxsim Precision@3
65
+ - type: maxsim_precision@5
66
+ value: 0.19599999999999998
67
+ name: Maxsim Precision@5
68
+ - type: maxsim_precision@10
69
+ value: 0.09966666666666665
70
+ name: Maxsim Precision@10
71
+ - type: maxsim_recall@1
72
+ value: 0.8466666666666667
73
+ name: Maxsim Recall@1
74
+ - type: maxsim_recall@3
75
+ value: 0.9566666666666667
76
+ name: Maxsim Recall@3
77
+ - type: maxsim_recall@5
78
+ value: 0.98
79
+ name: Maxsim Recall@5
80
+ - type: maxsim_recall@10
81
+ value: 0.9966666666666667
82
+ name: Maxsim Recall@10
83
+ - type: maxsim_ndcg@10
84
+ value: 0.9277675716215076
85
+ name: Maxsim Ndcg@10
86
+ - type: maxsim_mrr@10
87
+ value: 0.9049907407407407
88
+ name: Maxsim Mrr@10
89
+ - type: maxsim_map@100
90
+ value: 0.905293771043771
91
+ name: Maxsim Map@100
92
+ ---
93
+
94
+ # Multi-Vector Encoder
95
+
96
+ This is a [Multi-Vector Encoder](https://www.sbert.net/docs/multi_vector_encoder/usage/usage.html) model finetuned from [Qwen/Qwen3-VL-Embedding-2B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-2B) on the llamaindex-vdr-en-train-preprocessed dataset using the [sentence-transformers](https://www.SBERT.net) library. It maps inputs to sequences of 128-dimensional token-level vectors and scores them with late interaction (MaxSim), useful for semantic search with late interaction.
97
+ ## Model Details
98
+
99
+ ### Model Description
100
+ - **Model Type:** Multi-Vector Encoder
101
+ - **Base model:** [Qwen/Qwen3-VL-Embedding-2B](https://huggingface.co/Qwen/Qwen3-VL-Embedding-2B) <!-- at revision 9f2f7e710d6d81056aa5c0a4f04764fec6bb7bda -->
102
+ - **Maximum Sequence Length:** 262144 tokens
103
+ - **Output Dimensionality:** 128 dimensions
104
+ - **Similarity Function:** maxsim
105
+ - **Supported Modalities:** Text, Image, Video, Message
106
+ - **Training Dataset:**
107
+ - llamaindex-vdr-en-train-preprocessed
108
+ <!-- - **Language:** Unknown -->
109
+ <!-- - **License:** Unknown -->
110
+
111
+ ### Model Sources
112
+
113
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
114
+ - **Documentation:** [Multi-Vector Encoder Documentation](https://www.sbert.net/docs/multi_vector_encoder/usage/usage.html)
115
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
116
+ - **Hugging Face:** [Multi-Vector Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=multi-vector)
117
+
118
+ ### Full Model Architecture
119
+
120
+ ```
121
+ MultiVectorEncoder(
122
+ (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'image': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'video': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'message': {'method': 'forward', 'method_output_name': 'last_hidden_state', 'format': 'structured'}}, 'module_output_name': 'token_embeddings', 'processing_kwargs': {'chat_template': {'add_generation_prompt': True}}, 'unpad_inputs': False, 'architecture': 'Qwen3VLModel'})
123
+ (1): Dense({'in_features': 2048, 'out_features': 128, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'token_embeddings', 'module_output_name': 'token_embeddings'})
124
+ (2): MultiVectorMask({'skiplist_words': [], 'keep_only_token_ids': None})
125
+ (3): Normalize({'module_input_name': 'token_embeddings', 'module_output_name': 'token_embeddings'})
126
+ )
127
+ ```
128
+
129
+ ## Usage
130
+
131
+ ### Direct Usage (Sentence Transformers)
132
+
133
+ First install the Sentence Transformers library:
134
+
135
+ ```bash
136
+ pip install -U sentence-transformers
137
+ ```
138
+ Then you can load this model and run inference.
139
+ ```python
140
+ from sentence_transformers import MultiVectorEncoder
141
+
142
+ # Download from the 🤗 Hub
143
+ model = MultiVectorEncoder("tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr")
144
+ # Run inference: each input becomes a sequence of per-token vectors (variable length).
145
+ queries = [
146
+ 'What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003?',
147
+ ]
148
+ documents = [
149
+ 'https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/image_0.jpg',
150
+ 'https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/image_1.jpg',
151
+ 'https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/image_2.jpg',
152
+ ]
153
+ query_embeddings = model.encode_query(queries)
154
+ document_embeddings = model.encode_document(documents)
155
+ print(query_embeddings[0].shape, document_embeddings[0].shape)
156
+ # (48, 128) (352, 128)
157
+
158
+ # Get the MaxSim similarity scores
159
+ similarities = model.similarity(query_embeddings, document_embeddings)
160
+ print(similarities)
161
+ # tensor([[37.0712, 33.5348, 23.2705]])
162
+ ```
163
+ <!--
164
+ ### Direct Usage (Transformers)
165
+
166
+ <details><summary>Click to see the direct usage in Transformers</summary>
167
+
168
+ </details>
169
+ -->
170
+
171
+ <!--
172
+ ### Downstream Usage (Sentence Transformers)
173
+
174
+ You can finetune this model on your own dataset.
175
+
176
+ <details><summary>Click to expand</summary>
177
+
178
+ </details>
179
+ -->
180
+
181
+ <!--
182
+ ### Out-of-Scope Use
183
+
184
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
185
+ -->
186
+
187
+ ## Evaluation
188
+
189
+ ### Metrics
190
+
191
+ #### Multi Vector Information Retrieval
192
+
193
+ * Dataset: `vdr-eval-hard`
194
+ * Evaluated with [<code>MultiVectorInformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/multi_vector_encoder/evaluation.html#sentence_transformers.multi_vector_encoder.evaluation.MultiVectorInformationRetrievalEvaluator)
195
+
196
+ | Metric | Value |
197
+ |:--------------------|:-----------|
198
+ | maxsim_accuracy@1 | 0.8467 |
199
+ | maxsim_accuracy@3 | 0.9567 |
200
+ | maxsim_accuracy@5 | 0.98 |
201
+ | maxsim_accuracy@10 | 0.9967 |
202
+ | maxsim_precision@1 | 0.8467 |
203
+ | maxsim_precision@3 | 0.3189 |
204
+ | maxsim_precision@5 | 0.196 |
205
+ | maxsim_precision@10 | 0.0997 |
206
+ | maxsim_recall@1 | 0.8467 |
207
+ | maxsim_recall@3 | 0.9567 |
208
+ | maxsim_recall@5 | 0.98 |
209
+ | maxsim_recall@10 | 0.9967 |
210
+ | **maxsim_ndcg@10** | **0.9278** |
211
+ | maxsim_mrr@10 | 0.905 |
212
+ | maxsim_map@100 | 0.9053 |
213
+
214
+ <!--
215
+ ## Bias, Risks and Limitations
216
+
217
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
218
+ -->
219
+
220
+ <!--
221
+ ### Recommendations
222
+
223
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
224
+ -->
225
+
226
+ ## Training Details
227
+
228
+ ### Training Dataset
229
+
230
+ #### llamaindex-vdr-en-train-preprocessed
231
+
232
+ * Dataset: llamaindex-vdr-en-train-preprocessed
233
+ * Size: 10,000 training samples
234
+ * Columns: <code>query</code>, <code>image</code>, and <code>negative_0</code>
235
+ * Approximate statistics based on the first 100 samples:
236
+ | | query | image | negative_0 |
237
+ |:---------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|
238
+ | type | string | image | image |
239
+ | modality | text | image | image |
240
+ | details | <ul><li>min: 27 tokens</li><li>mean: 35.59 tokens</li><li>max: 50 tokens</li></ul> | <ul><li>min: 1000x756 px</li><li>mean: 1437x1628 px</li><li>max: 2044x1869 px</li></ul> | <ul><li>min: 1008x756 px</li><li>mean: 1450x1637 px</li><li>max: 2044x1851 px</li></ul> |
241
+ * Samples:
242
+ | query | image | negative_0 |
243
+ |:-----------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------|:---------------------------------------------------|
244
+ | <code>What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003?</code> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/image_0.jpg" width="200"> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/example_image_0.jpg" width="200"> |
245
+ | <code>What are the three main positions anthropologists have taken in relation to development, as discussed by David Lewis?</code> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/image_1.jpg" width="200"> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/example_image_0.jpg" width="200"> |
246
+ | <code>Who are the three sisters known as the Fates in Greek mythology?</code> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/image_2.jpg" width="200"> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr-headlr/resolve/main/assets/example_image_1.jpg" width="200"> |
247
+ * Loss: [<code>CachedMultiVectorMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/multi_vector_encoder/losses.html#cachedmultivectormultiplenegativesrankingloss) with these parameters:
248
+ ```json
249
+ {
250
+ "score_metric": "colbert_scores",
251
+ "mini_batch_size": 1,
252
+ "mini_batch_num_tokens": null,
253
+ "score_mini_batch_size": 1,
254
+ "scale": 1.0,
255
+ "size_average": true,
256
+ "gather_across_devices": false
257
+ }
258
+ ```
259
+
260
+ ### Training Hyperparameters
261
+ #### Non-Default Hyperparameters
262
+
263
+ - `per_device_train_batch_size`: 64
264
+ - `num_train_epochs`: 1
265
+ - `learning_rate`: 2e-05
266
+ - `warmup_steps`: 0.1
267
+ - `max_grad_norm`: 30.0
268
+ - `bf16`: True
269
+ - `learning_rate_mapping`: {'^(model\\.)?1\\.linear': 0.0002}
270
+
271
+ #### All Hyperparameters
272
+ <details><summary>Click to expand</summary>
273
+
274
+ - `per_device_train_batch_size`: 64
275
+ - `num_train_epochs`: 1
276
+ - `max_steps`: -1
277
+ - `learning_rate`: 2e-05
278
+ - `lr_scheduler_type`: linear
279
+ - `lr_scheduler_kwargs`: None
280
+ - `warmup_steps`: 0.1
281
+ - `optim`: adamw_torch_fused
282
+ - `optim_args`: None
283
+ - `weight_decay`: 0.0
284
+ - `adam_beta1`: 0.9
285
+ - `adam_beta2`: 0.999
286
+ - `adam_epsilon`: 1e-08
287
+ - `optim_target_modules`: None
288
+ - `gradient_accumulation_steps`: 1
289
+ - `average_tokens_across_devices`: True
290
+ - `max_grad_norm`: 30.0
291
+ - `label_smoothing_factor`: 0.0
292
+ - `bf16`: True
293
+ - `fp16`: False
294
+ - `bf16_full_eval`: False
295
+ - `fp16_full_eval`: False
296
+ - `tf32`: None
297
+ - `gradient_checkpointing`: False
298
+ - `gradient_checkpointing_kwargs`: None
299
+ - `torch_compile`: False
300
+ - `torch_compile_backend`: None
301
+ - `torch_compile_mode`: None
302
+ - `use_liger_kernel`: False
303
+ - `liger_kernel_config`: None
304
+ - `use_cache`: False
305
+ - `neftune_noise_alpha`: None
306
+ - `torch_empty_cache_steps`: None
307
+ - `auto_find_batch_size`: False
308
+ - `log_on_each_node`: True
309
+ - `logging_nan_inf_filter`: True
310
+ - `include_num_input_tokens_seen`: no
311
+ - `log_level`: passive
312
+ - `log_level_replica`: warning
313
+ - `disable_tqdm`: False
314
+ - `project`: huggingface
315
+ - `trackio_space_id`: None
316
+ - `trackio_bucket_id`: None
317
+ - `trackio_static_space_id`: None
318
+ - `per_device_eval_batch_size`: 8
319
+ - `prediction_loss_only`: True
320
+ - `eval_on_start`: False
321
+ - `eval_do_concat_batches`: True
322
+ - `eval_use_gather_object`: False
323
+ - `eval_accumulation_steps`: None
324
+ - `include_for_metrics`: []
325
+ - `batch_eval_metrics`: False
326
+ - `save_only_model`: False
327
+ - `save_on_each_node`: False
328
+ - `enable_jit_checkpoint`: False
329
+ - `push_to_hub`: False
330
+ - `hub_private_repo`: None
331
+ - `hub_model_id`: None
332
+ - `hub_strategy`: every_save
333
+ - `hub_always_push`: False
334
+ - `hub_revision`: None
335
+ - `load_best_model_at_end`: False
336
+ - `ignore_data_skip`: False
337
+ - `restore_callback_states_from_checkpoint`: False
338
+ - `full_determinism`: False
339
+ - `seed`: 42
340
+ - `data_seed`: None
341
+ - `use_cpu`: False
342
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
343
+ - `parallelism_config`: None
344
+ - `dataloader_drop_last`: False
345
+ - `dataloader_num_workers`: 0
346
+ - `dataloader_pin_memory`: True
347
+ - `dataloader_persistent_workers`: False
348
+ - `dataloader_prefetch_factor`: None
349
+ - `remove_unused_columns`: True
350
+ - `label_names`: None
351
+ - `train_sampling_strategy`: random
352
+ - `length_column_name`: length
353
+ - `ddp_find_unused_parameters`: None
354
+ - `ddp_bucket_cap_mb`: None
355
+ - `ddp_broadcast_buffers`: False
356
+ - `ddp_static_graph`: None
357
+ - `ddp_backend`: None
358
+ - `ddp_timeout`: 1800
359
+ - `fsdp`: None
360
+ - `fsdp_config`: None
361
+ - `deepspeed`: None
362
+ - `debug`: []
363
+ - `skip_memory_metrics`: True
364
+ - `do_predict`: False
365
+ - `resume_from_checkpoint`: None
366
+ - `warmup_ratio`: None
367
+ - `local_rank`: -1
368
+ - `prompts`: None
369
+ - `batch_sampler`: batch_sampler
370
+ - `multi_dataset_batch_sampler`: proportional
371
+ - `router_mapping`: {}
372
+ - `learning_rate_mapping`: {'^(model\\.)?1\\.linear': 0.0002}
373
+ - `max_length`: None
374
+
375
+ </details>
376
+
377
+ ### Training Logs
378
+ | Epoch | Step | Training Loss | vdr-eval-hard_maxsim_ndcg@10 |
379
+ |:------:|:----:|:-------------:|:----------------------------:|
380
+ | -1 | -1 | - | 0.8244 |
381
+ | 0.0510 | 8 | 2.2737 | - |
382
+ | 0.1019 | 16 | 0.6985 | 0.9132 |
383
+ | 0.1529 | 24 | 0.3765 | - |
384
+ | 0.2038 | 32 | 0.3179 | 0.9133 |
385
+ | 0.2548 | 40 | 0.2909 | - |
386
+ | 0.3057 | 48 | 0.2984 | 0.9184 |
387
+ | 0.3567 | 56 | 0.2649 | - |
388
+ | 0.4076 | 64 | 0.2771 | 0.9232 |
389
+ | 0.4586 | 72 | 0.2404 | - |
390
+ | 0.5096 | 80 | 0.2456 | 0.9271 |
391
+ | 0.5605 | 88 | 0.2933 | - |
392
+ | 0.6115 | 96 | 0.2549 | 0.9224 |
393
+ | 0.6624 | 104 | 0.2636 | - |
394
+ | 0.7134 | 112 | 0.2815 | 0.9202 |
395
+ | 0.7643 | 120 | 0.2829 | - |
396
+ | 0.8153 | 128 | 0.2592 | 0.9206 |
397
+ | 0.8662 | 136 | 0.2180 | - |
398
+ | 0.9172 | 144 | 0.2647 | 0.9206 |
399
+ | 0.9682 | 152 | 0.2411 | - |
400
+ | 1.0 | 157 | - | 0.9278 |
401
+
402
+
403
+ ### Training Time
404
+ - **Training**: 2.4 hours
405
+ - **Evaluation**: 26.8 minutes
406
+ - **Total**: 2.8 hours
407
+
408
+ ### Framework Versions
409
+ - Python: 3.12.12
410
+ - Sentence Transformers: 5.7.0.dev0
411
+ - Transformers: 5.14.1
412
+ - PyTorch: 2.13.0+cu130
413
+ - Accelerate: 1.14.0
414
+ - Datasets: 5.0.0
415
+ - Tokenizers: 0.22.2
416
+
417
+ ## Additional Resources
418
+
419
+ - [Sentence Transformers Documentation](https://www.sbert.net): the full documentation site, including training, evaluation, and pre-trained model catalogs.
420
+ - [PyLate](https://github.com/lightonai/pylate): the upstream library whose features were absorbed into Sentence Transformers for multi-vector / late-interaction models.
421
+
422
+ ## Citation
423
+
424
+ ### BibTeX
425
+
426
+ #### Sentence Transformers
427
+ ```bibtex
428
+ @inproceedings{reimers-2019-sentence-bert,
429
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
430
+ author = "Reimers, Nils and Gurevych, Iryna",
431
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
432
+ month = "11",
433
+ year = "2019",
434
+ publisher = "Association for Computational Linguistics",
435
+ url = "https://arxiv.org/abs/1908.10084",
436
+ }
437
+ ```
438
+
439
+ #### CachedMultiVectorMultipleNegativesRankingLoss
440
+ ```bibtex
441
+ @misc{gao2021scaling,
442
+ title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
443
+ author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
444
+ year={2021},
445
+ eprint={2101.06983},
446
+ archivePrefix={arXiv},
447
+ primaryClass={cs.LG}
448
+ }
449
+ ```
450
+
451
+ <!--
452
+ ## Glossary
453
+
454
+ *Clearly define terms in order to be accessible across audiences.*
455
+ -->
456
+
457
+ <!--
458
+ ## Model Card Authors
459
+
460
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
461
+ -->
462
+
463
+ <!--
464
+ ## Model Card Contact
465
+
466
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
467
+ -->
assets/example_image_0.jpg ADDED

Git LFS Details

  • SHA256: e00af5845ec1e18a719d7e35696e12e7c683763ec09efa924ac112ca8e4994fa
  • Pointer size: 131 Bytes
  • Size of remote file: 346 kB
assets/example_image_1.jpg ADDED

Git LFS Details

  • SHA256: 8af4ebbad9cf67d577eda579c29a921f3dc5486b72cdee1f990400fdf2bbe12c
  • Pointer size: 131 Bytes
  • Size of remote file: 298 kB
assets/image_0.jpg ADDED

Git LFS Details

  • SHA256: a635c8d8b536176b9ba192ac06e12544aa691830e0cb4aa97c8b5d669cd1355c
  • Pointer size: 131 Bytes
  • Size of remote file: 334 kB
assets/image_1.jpg ADDED

Git LFS Details

  • SHA256: 84d3a1e93d5ffb8872960ad41922a472863f7dfa3c131174dca039a57266fb23
  • Pointer size: 131 Bytes
  • Size of remote file: 319 kB
assets/image_2.jpg ADDED

Git LFS Details

  • SHA256: 11cfde9d8ef369931db15420b0c07543ebd70937781c216077b5989cc87ce325
  • Pointer size: 131 Bytes
  • Size of remote file: 144 kB
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,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3VLModel"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "eos_token_id": 151645,
7
+ "image_token_id": 151655,
8
+ "model_type": "qwen3_vl",
9
+ "pad_token_id": 151643,
10
+ "text_config": {
11
+ "attention_bias": false,
12
+ "attention_dropout": 0.0,
13
+ "bos_token_id": 151643,
14
+ "dtype": "bfloat16",
15
+ "eos_token_id": 151645,
16
+ "head_dim": 128,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 2048,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 6144,
21
+ "max_position_embeddings": 262144,
22
+ "model_type": "qwen3_vl_text",
23
+ "num_attention_heads": 16,
24
+ "num_hidden_layers": 28,
25
+ "num_key_value_heads": 8,
26
+ "pad_token_id": null,
27
+ "rms_norm_eps": 1e-06,
28
+ "rope_parameters": {
29
+ "mrope_interleaved": true,
30
+ "mrope_section": [
31
+ 24,
32
+ 20,
33
+ 20
34
+ ],
35
+ "rope_theta": 5000000,
36
+ "rope_type": "default"
37
+ },
38
+ "tie_word_embeddings": true,
39
+ "use_cache": true,
40
+ "vocab_size": 151936
41
+ },
42
+ "tie_word_embeddings": true,
43
+ "transformers_version": "5.14.1",
44
+ "use_cache": false,
45
+ "video_token_id": 151656,
46
+ "vision_config": {
47
+ "deepstack_visual_indexes": [
48
+ 5,
49
+ 11,
50
+ 17
51
+ ],
52
+ "depth": 24,
53
+ "dtype": "bfloat16",
54
+ "hidden_act": "gelu_pytorch_tanh",
55
+ "hidden_size": 1024,
56
+ "in_channels": 3,
57
+ "initializer_range": 0.02,
58
+ "intermediate_size": 4096,
59
+ "model_type": "qwen3_vl_vision",
60
+ "num_heads": 16,
61
+ "num_position_embeddings": 2304,
62
+ "out_hidden_size": 2048,
63
+ "patch_size": 16,
64
+ "spatial_merge_size": 2,
65
+ "temporal_patch_size": 2
66
+ },
67
+ "vision_end_token_id": 151653,
68
+ "vision_start_token_id": 151652
69
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "pytorch": "2.13.0+cu130",
4
+ "sentence_transformers": "5.7.0.dev0",
5
+ "transformers": "5.14.1"
6
+ },
7
+ "default_prompt_name": "default",
8
+ "model_type": "MultiVectorEncoder",
9
+ "prompts": {
10
+ "default": "Represent the user's input.",
11
+ "document": "",
12
+ "query": ""
13
+ },
14
+ "similarity_fn_name": "maxsim"
15
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba87e275316ff2a6e1f8cec80c20757909e0bd05f8e790c965d364e94acd0683
3
+ size 4255136560
modules.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Dense",
12
+ "type": "sentence_transformers.base.modules.dense.Dense"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_MultiVectorMask",
18
+ "type": "sentence_transformers.multi_vector_encoder.modules.multi_vector_mask.MultiVectorMask"
19
+ },
20
+ {
21
+ "idx": 3,
22
+ "name": "3",
23
+ "path": "3_Normalize",
24
+ "type": "sentence_transformers.sentence_transformer.modules.normalize.Normalize"
25
+ }
26
+ ]
processor_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "do_convert_rgb": true,
6
+ "do_normalize": true,
7
+ "do_rescale": true,
8
+ "do_resize": true,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_processor_type": "Qwen2VLImageProcessor",
15
+ "image_std": [
16
+ 0.5,
17
+ 0.5,
18
+ 0.5
19
+ ],
20
+ "merge_size": 2,
21
+ "patch_size": 16,
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "longest_edge": 360000,
26
+ "shortest_edge": 784
27
+ },
28
+ "temporal_patch_size": 2
29
+ },
30
+ "processor_class": "Qwen3VLProcessor",
31
+ "video_processor": {
32
+ "data_format": "channels_first",
33
+ "default_to_square": true,
34
+ "do_convert_rgb": true,
35
+ "do_normalize": true,
36
+ "do_rescale": true,
37
+ "do_resize": true,
38
+ "do_sample_frames": true,
39
+ "fps": 2,
40
+ "image_mean": [
41
+ 0.5,
42
+ 0.5,
43
+ 0.5
44
+ ],
45
+ "image_std": [
46
+ 0.5,
47
+ 0.5,
48
+ 0.5
49
+ ],
50
+ "max_frames": 768,
51
+ "merge_size": 2,
52
+ "min_frames": 4,
53
+ "patch_size": 16,
54
+ "resample": 3,
55
+ "rescale_factor": 0.00392156862745098,
56
+ "return_metadata": false,
57
+ "size": {
58
+ "longest_edge": 25165824,
59
+ "shortest_edge": 4096
60
+ },
61
+ "temporal_patch_size": 2,
62
+ "video_processor_type": "Qwen3VLVideoProcessor"
63
+ }
64
+ }
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
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4deec245f9380efa31abe72adbcae78599405bf2e69e5828180a5a6e116c67d
3
+ size 11423970
tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "is_local": false,
9
+ "local_files_only": false,
10
+ "max_pixels": 360000,
11
+ "min_pixels": 784,
12
+ "model_max_length": 262144,
13
+ "pad_token": "<|endoftext|>",
14
+ "processor_class": "Qwen3VLProcessor",
15
+ "split_special_tokens": false,
16
+ "tokenizer_class": "Qwen2Tokenizer",
17
+ "unk_token": null
18
+ }