Views
No views yet
pillow
transformers>=4.57.0
qwen-vl-utils>=0.0.14
torch==2.8.01import torch
2from PIL import Image
3from scripts.ops_colqwen3_embedder import OpsColQwen3Embedder
4
5images = [Image.new("RGB", (32, 32), color="white"), Image.new("RGB", (16, 16), color="black")]
6queries = ["Is attention really all you need?", "What is the amount of bananas farmed in Salvador?"]
7
8embedder = OpsColQwen3Embedder(
9 model_name="OpenSearch-AI/Ops-Colqwen3-4B",
10 dims=2560,
11 dtype=torch.float16,
12 attn_implementation="flash_attention_2",
13)
14
15query_embeddings = embedder.encode_queries(queries)
16image_embeddings = embedder.encode_images(images)
17print(query_embeddings[0].shape, image_embeddings[0].shape) # (23, 2560) (18, 2560)
18
19scores = embedder.compute_scores(query_embeddings, image_embeddings)
20
21print(f"Scores:\n{scores}")| Model | Dim | Vidore v1+v2 | Vidore v2 | Vidore v1 |
|---|---|---|---|---|
| Ops-Colqwen3-4B | 2560 | 84.87 | 68.7 | 91.4 |
| Ops-Colqwen3-4B | 1280 | 84.71 | 68.2 | 91.3 |
| Ops-Colqwen3-4B | 640 | 84.39 | 67.7 | 91.1 |
| Ops-Colqwen3-4B | 320 | 84.12 | 67.0 | 91.0 |
| Ops-Colqwen3-4B | 128 | 84.04 | 66.9 | 90.9 |
| tomoro-colqwen3-embed-8b | 320 | 83.52 | 65.4 | 90.8 |
| EvoQwen2.5-VL-Retriever-7B-v1 | 128 | 83.41 | 65.2 | 90.7 |
| tomoro-colqwen3-embed-4b | 320 | 83.18 | 64.7 | 90.6 |
| llama-nemoretriever-colembed-3b-v1 | 3072 | 83.10 | 63.3 | 91.0 |
| SauerkrautLM-ColQwen3-8b-v0.1 | 128 | 82.91 | 62.5 | 91.1 |
| EvoQwen2.5-VL-Retriever-3B-v1 | 128 | 82.76 | 63.0 | 90.7 |
| SauerkrautLM-ColQwen3-4b-v0.1 | 128 | 81.97 | 59.9 | 90.8 |
| jina-embedding-v4 | 128 | 81.17 | 58.2 | 90.4 |
| Model | Dim | PUB AVG |
|---|---|---|
| Ops-Colqwen3-4B | 2560 | 61.27 |
| Ops-Colqwen3-4B | 1280 | 61.32 |
| Ops-Colqwen3-4B | 640 | 61.21 |
| Ops-Colqwen3-4B | 320 | 60.88 |
| Ops-Colqwen3-4B | 128 | 60.23 |
| tomoro-colqwen3-embed-4b | 320 | 60.19 |
| SauerkrautLM-ColQwen3-8b-v0.1 | 128 | 58.55 |
| jina-embedding-v4 | 128 | 57.54 |
| llama-nemoretriever-colembed-3b-v1 | 3072 | 57.07 |
| SauerkrautLM-ColQwen3-4b-v0.1 | 128 | 56.03 |
With only 128 dimensions,Ops-Colqwen3-4Boutperforms other 4B-parameter models such astomoro-colqwen3-embed-4b, making it well-suited for latency- and memory-constrained applications.
1@misc{ops_colqwen3_4b,
2 author = {{OpenSearch-AI}},
3 title = {{Ops-Colqwen3: State-of-the-Art Multimodal Embedding Model for Visual Document Retrieval}},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/OpenSearch-AI/Ops-Colqwen3-4B}},
6}