Views
No views yet

SentenceTransformer(
(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): Pooling({'embedding_dimension': 2048, 'pooling_mode': 'lasttoken', 'include_prompt': True})
(2): Normalize({})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2# Download from the 🤗 Hub
3model = SentenceTransformer("Omartificial-Intelligence-Space/Qwen3-VL-Embedding-2B-Arabic-VDR")
4# Run inference
5queries = [
6 'ما اسم هذه الزهور البيضاء الصغيرة التي تنمو بين الصخور؟',
7]
8documents = [
9 'https://i.ibb.co/svZf6D92/image1.jpg',
10 'https://i.ibb.co/spFmq82S/image2.jpg',
11 'https://i.ibb.co/mF5BDDsB/image3.jpg'
12]
13query_embeddings = model.encode_query(queries)
14document_embeddings = model.encode_document(documents)
15print(query_embeddings.shape, document_embeddings.shape)
16# [1, 2048] [3, 2048]
17# Get the similarity scores for the embeddings
18similarities = model.similarity(query_embeddings, document_embeddings)
19print(similarities)
20# tensor([[ 0.5869, -0.1090, 0.1076]])query, image, and negative_0| query | image | negative_0 | |
|---|---|---|---|
| type | string | image | image |
| details |
|
|
|
| query | image | negative_0 |
|---|---|---|
ما هي التحديات التي تواجه الحرف التقليدية كما يظهر في الصورة، وما هي الحلول الممكنة لمواجهة هذه التحديات؟ | ![]() | ![]() |
إذا شاركت في ورشة عمل لتعلم كيفية صنع الآلة التي يظهر في الصورة، ما هي الخطوات التي ستحتاج إلى اتباعها لصنعها بشكل صحيح؟ | ![]() | ![]() |
كيف يختلف العزف على الآلة التي يظهر في الصورة عن العزف على الآلات الوترية الأخرى في المنطقة، وما هي الخصائص الفريدة لهذه الآلة؟ | ![]() | ![]() |
MatryoshkaLoss with these parameters:
1{
2 "loss": "CachedMultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 2048,
5 1536,
6 1024,
7 512,
8 256,
9 128,
10 64
11 ],
12 "matryoshka_weights": [
13 1,
14 1,
15 1,
16 1,
17 1,
18 1,
19 1
20 ],
21 "n_dims_per_step": -1
22}per_device_train_batch_size: 64num_train_epochs: 2learning_rate: 1e-05warmup_steps: 0.03bf16: Trueper_device_eval_batch_size: 64batch_sampler: no_duplicates1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{kusupati2024matryoshka,
2 title={Matryoshka Representation Learning},
3 author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
4 year={2024},
5 eprint={2205.13147},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}1@misc{gao2021scaling,
2 title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
3 author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
4 year={2021},
5 eprint={2101.06983},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}1@inproceedings{alwajih-etal-2025-pearl,
2 title = "Pearl: A Multimodal Culturally-Aware {A}rabic Instruction Dataset",
3 author = "Alwajih, Fakhraddin and
4 Magdy, Samar M. and
5 El Mekki, Abdellah and
6 Nacar, Omer and
7 Nafea, Youssef and
8 Abdelfadil, Safaa Taher and
9 Yahya, Abdulfattah Mohammed and
10 Luqman, Hamzah and
11 Almarwani, Nada and
12 Aloufi, Samah and
13 Qawasmeh, Baraah and
14 Atou, Houdaifa and
15 Sibaee, Serry and
16 Alsayadi, Hamzah A. and
17 Al-Dhabyani, Walid and
18 Al-shaibani, Maged S. and
19 El aatar, Aya and
20 Qandos, Nour and
21 Alhamouri, Rahaf and
22 Ahmad, Samar and
23 AL-Ghrawi, Mohammed Anwar and
24 Yacoub, Aminetou and
25 AbuHweidi, Ruwa and
26 Lemin, Vatimetou Mohamed and
27 Abdel-Salam, Reem and
28 Bashiti, Ahlam and
29 Ammar, Adel and
30 Alansari, Aisha and
31 Ashraf, Ahmed and
32 Alturayeif, Nora and
33 Alcoba Inciarte, Alcides and
34 Elmadany, AbdelRahim A. and
35 Tourad, Mohamedou Cheikh and
36 Berrada, Ismail and
37 Jarrar, Mustafa and
38 Shehata, Shady and
39 Abdul-Mageed, Muhammad",
40 editor = "Christodoulopoulos, Christos and
41 Chakraborty, Tanmoy and
42 Rose, Carolyn and
43 Peng, Violet",
44 booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2025",
45 month = nov,
46 year = "2025",
47 address = "Suzhou, China",
48 publisher = "Association for Computational Linguistics",
49 url = "[https://aclanthology.org/2025.findings-emnlp.1254/](https://aclanthology.org/2025.findings-emnlp.1254/)",
50 pages = "23048--23079",
51 ISBN = "979-8-89176-335-7"
52}