tomaarsen/ColQwen3-VL-Embedding-2B-vdr
Multi-Vector Encoder
This is a Multi-Vector Encoder model finetuned from Qwen/Qwen3-VL-Embedding-2B on the llamaindex-vdr-en-train-preprocessed dataset using the sentence-transformers 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.
Model Details
Model Description
- Model Type: Multi-Vector Encoder
- Base model: Qwen/Qwen3-VL-Embedding-2B <!-- at revision 9f2f7e710d6d81056aa5c0a4f04764fec6bb7bda -->
- Maximum Sequence Length: 262144 tokens
- Output Dimensionality: 128 dimensions
- Similarity Function: maxsim
- Supported Modalities: Text, Image, Video, Message
- Training Dataset:
- llamaindex-vdr-en-train-preprocessed <!-- - Language: Unknown --> <!-- - License: Unknown -->
Model Sources
- Documentation: Sentence Transformers Documentation
- Documentation: Multi-Vector Encoder Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Multi-Vector Encoders on Hugging Face
Full Model Architecture
MultiVectorEncoder(
(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'})
(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'})
(2): MultiVectorMask({'skiplist_words': [], 'keep_only_token_ids': None})
(3): Normalize({'module_input_name': 'token_embeddings', 'module_output_name': 'token_embeddings'})
)Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformersThen you can load this model and run inference.
from sentence_transformers import MultiVectorEncoder
# Download from the 🤗 Hub
model = MultiVectorEncoder("tomaarsen/ColQwen3-VL-Embedding-2B-vdr")
# Run inference: each input becomes a sequence of per-token vectors (variable length).
queries = [
'What are the new anthropological perspectives on development as discussed by Quarles Van Ufford and Giri in 2003?',
]
documents = [
'https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr/resolve/main/assets/image_0.jpg',
'https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr/resolve/main/assets/image_1.jpg',
'https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr/resolve/main/assets/image_2.jpg',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings[0].shape, document_embeddings[0].shape)
# (48, 128) (352, 128)
# Get the MaxSim similarity scores
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[37.0712, 33.5348, 23.2705]])<!--
Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details> -->
<!--
Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details> -->
<!--
Out-of-Scope Use
List how the model may foreseeably be misused and address what users ought not to do with the model. -->
Evaluation
Metrics
Multi Vector Information Retrieval
- Dataset:
vdr-eval-hard - Evaluated with <code>MultiVectorInformationRetrievalEvaluator</code>
<!--
Bias, Risks and Limitations
What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->
<!--
Recommendations
What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->
Training Details
Training Dataset
llamaindex-vdr-en-train-preprocessed
- Dataset: llamaindex-vdr-en-train-preprocessed
- Size: 10,000 training samples
- Columns: <code>query</code>, <code>image</code>, and <code>negative_0</code>
- Approximate statistics based on the first 100 samples: | | query | image | negative_0 | |:---------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------| | type | string | image | image | | modality | text | image | image | | 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> |
- Samples: | query | image | negative0 | |:-----------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------|:---------------------------------------------------| | <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/resolve/main/assets/image0.jpg" width="200"> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr/resolve/main/assets/exampleimage0.jpg" width="200"> | | <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/resolve/main/assets/image1.jpg" width="200"> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr/resolve/main/assets/exampleimage0.jpg" width="200"> | | <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/resolve/main/assets/image2.jpg" width="200"> | <img src="https://huggingface.co/tomaarsen/ColQwen3-VL-Embedding-2B-vdr/resolve/main/assets/exampleimage1.jpg" width="200"> |
- Loss: <code>CachedMultiVectorMultipleNegativesRankingLoss</code> with these parameters:
{
"score_metric": "colbert_scores",
"mini_batch_size": 1,
"mini_batch_num_tokens": null,
"score_mini_batch_size": 1,
"scale": 1.0,
"size_average": true,
"gather_across_devices": false
}Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size: 64num_train_epochs: 1learning_rate: 2e-05warmup_steps: 0.1max_grad_norm: 30.0bf16: Truelearning_rate_mapping: {'^(model\\.)?1\\.linear': 0.0002}
All Hyperparameters
<details><summary>Click to expand</summary>
per_device_train_batch_size: 64num_train_epochs: 1max_steps: -1learning_rate: 2e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamwtorchfusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 30.0label_smoothing_factor: 0.0bf16: Truefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 8prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Noneremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonewarmup_ratio: Nonelocal_rank: -1prompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {'^(model\\.)?1\\.linear': 0.0002}max_length: None
</details>
Training Logs
Training Time
- Training: 2.4 hours
- Evaluation: 26.8 minutes
- Total: 2.8 hours
Framework Versions
- Python: 3.12.12
- Sentence Transformers: 5.7.0.dev0
- Transformers: 5.14.1
- PyTorch: 2.13.0+cu130
- Accelerate: 1.14.0
- Datasets: 5.0.0
- Tokenizers: 0.22.2
Additional Resources
- Sentence Transformers Documentation: the full documentation site, including training, evaluation, and pre-trained model catalogs.
- PyLate: the upstream library whose features were absorbed into Sentence Transformers for multi-vector / late-interaction models.
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}CachedMultiVectorMultipleNegativesRankingLoss
@misc{gao2021scaling,
title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
year={2021},
eprint={2101.06983},
archivePrefix={arXiv},
primaryClass={cs.LG}
}<!--
Glossary
Clearly define terms in order to be accessible across audiences. -->
<!--
Model Card Authors
Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->
<!--
Model Card Contact
Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->
