TomoroAI/tomoro-colqwen3-embed-4b
⚡ Executive Summary
TomoroAI/tomoro-colqwen3-embed-4b is a state-of-the-art
ColPali-style multimodal embedding model. It maps text queries, visual documents (images, PDFs) or short videos into aligned multi-vector embeddings.
Built by merging
Qwen/Qwen3-VL-4B-Instruct with
Qwen/Qwen3-Embedding-4B, this model inherits robust text retrieval capabilities while preserving a full vision stack. It has been fine-tuned on a curated mixture of
VDR,
ViDoRe-ColPali-Training,
VisRAG-Ret-Train-Synthetic-data, and
VisRAG-Ret-Train-In-domain-data. It achieves SOTA or competitive performance across
ViDoRe V1-V3 (English and Multilingual) while offering a significantly reduced embedding footprint compared to other full-dim Colpali model alternatives.
🛠️ Model Specifications
| Feature | Detail |
|---|
| Architecture | Qwen3-VL 4B (Encoder-only variant) + 320-dim Projection Head |
| Methodology | ColPali-style Late Interaction (MaxSim scoring) |
| Token Budget | Up to 1,280 visual tokens per page or 5120 visual tokens per video (text prompts constrained only by the base context window) |
| Context Window | 32k (inherited from base), typical usage < 2k tokens |
| Output | Multi-vector (Seq_Len × 320), L2-normalized |
| Supported Modalities | Text Queries, RGB Images, Synthetic Documents, Short Video (Frame-wise) |
| Precision | bfloat16 weights, FlashAttention 2 enabled |
Key Properties
- Merged Encoders: Combines the Qwen3-VL vision encoder (patch-grid tokens with spatial merge) and language encoder.
- Projection: A custom 320-dim head projects every token (text or visual) into a vector.
- Processing:
- Queries: Left-padded text sequences.
- Documents: Rendered with a lightweight vision prompt and flattened into image tokens.
- Video: Supports video retrieval by decoding videos into frames and processing via the vision stack (generalization capability, not explicitly fine-tuned; dedicated benchmark coming soon).
- Storage Efficiency:
- Baseline (NVIDIA Nemo-3B): Stores 1,802 tokens @ 3,072 dims (≈10.3 TB for 1M images).
- Tomoro ColQwen3: Stores max 1,280 tokens @ 320 dims (≈0.82 TB for 1M images).
- Result: 13× smaller footprint with higher performance.
📊 Evaluation Results
We report results on the ViDoRe benchmark suite. The model sets new standards on multilingual and English splits on ViDoRe V2 and V3 while maintaining comparable high performance on ViDoRe V1.
ViDoRe V3 (Latest)
English nDCG@5
Multilingual nDCG@5 (Excluding English Subsets)
ViDoRe V2
English nDCG@5
Multilingual nDCG@5
ViDoRe V1 (English nDCG@5)
Video Retrieval Evaluation
To demonstrate that Tomoro ColQwen3 strongly generalizes to video retrieval, we evaluated the models on the
CareBench for text to video (General Retrieval) task and
MMEB-V2 video_ret benchmark.
CareBench Evaluation
For this evaluation, we utilized a raw video encoding approach: our models encoded the video files directly without any additional textual annotations or metadata inputs. This highlights the model's ability to perform retrieval based purely on visual semantics.
MMEB-V2 video_ret Evaluation
All below evaluations are using Hit@1 metric.
IFM-TTE-7B and seed-1.6-embedding utilize video-text fine-tuning, whereas the Tomoro ColQwen series relies solely on image-text data.
💻 Usage
The processor exposes process_texts, process_images, and score_multi_vector.
Prerequisites
We strongly suggest flash-attn to be installed. If not, please change to attention_impl="sdpa"
Currently we only support torch==2.8.0, for higher pytorch version, please build flash attention manually, otherwise performance throughput could be low.
1pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128
2pip install transformers pillow requests
3pip install flash-attn --no-build-isolation
Inference Code
1import torch
2from transformers import AutoModel, AutoProcessor
3from PIL import Image, UnidentifiedImageError
4import requests
5from io import BytesIO
6
7# Configuration
8MODEL_ID = "TomoroAI/tomoro-colqwen3-embed-4b"
9DTYPE = torch.bfloat16
10DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
11
12# Load Model & Processor
13processor = AutoProcessor.from_pretrained(
14 MODEL_ID,
15 trust_remote_code=True,
16 max_num_visual_tokens=1280,
17)
18model = AutoModel.from_pretrained(
19 MODEL_ID,
20 dtype=DTYPE,
21 attn_implementation="flash_attention_2",
22 trust_remote_code=True,
23 device_map=DEVICE,
24).eval()
25
26# Sample Data
27queries = [
28 "Retrieve the city of Singapore",
29 "Retrieve the city of Beijing",
30 "Retrieve the city of London",
31]
32docs = [
33 "https://upload.wikimedia.org/wikipedia/commons/2/27/Singapore_skyline_2022.jpg",
34 "https://upload.wikimedia.org/wikipedia/commons/6/61/Beijing_skyline_at_night.JPG",
35 "https://upload.wikimedia.org/wikipedia/commons/4/49/London_skyline.jpg",
36]
37
38def load_image(url: str) -> Image.Image:
39 # Some CDNs (e.g., Wikimedia) expect a browser-like UA to avoid 403s.
40 for headers in ({}, {"User-Agent": "Mozilla/5.0 (compatible; ColQwen3-demo/1.0)"}):
41 resp = requests.get(url, headers=headers, timeout=10)
42 if resp.status_code == 403:
43 continue
44 resp.raise_for_status()
45 try:
46 return Image.open(BytesIO(resp.content)).convert("RGB")
47 except UnidentifiedImageError as e:
48 raise RuntimeError(f"Failed to decode image from {url}") from e
49 raise RuntimeError(f"Could not fetch image (HTTP 403) from {url}; try downloading locally and loading from file path.")
50
51# Helper Functions
52def encode_queries(texts, batch_size=8):
53 outputs = []
54 for start in range(0, len(texts), batch_size):
55 batch = processor.process_texts(texts=texts[start : start + batch_size])
56 batch = {k: v.to(DEVICE) for k, v in batch.items()}
57 with torch.inference_mode():
58 out = model(**batch)
59 vecs = out.embeddings.to(torch.bfloat16).cpu()
60 outputs.extend(vecs)
61 return outputs
62
63def encode_docs(urls, batch_size=4):
64 pil_images = [load_image(url) for url in urls]
65 outputs = []
66 for start in range(0, len(pil_images), batch_size):
67 batch_imgs = pil_images[start : start + batch_size]
68 features = processor.process_images(images=batch_imgs)
69 features = {k: v.to(DEVICE) if isinstance(v, torch.Tensor) else v for k, v in features.items()}
70 with torch.inference_mode():
71 out = model(**features)
72 vecs = out.embeddings.to(torch.bfloat16).cpu()
73 outputs.extend(vecs)
74 return outputs
75
76# Execution
77query_embeddings = encode_queries(queries)
78doc_embeddings = encode_docs(docs)
79
80# MaxSim Scoring
81scores = processor.score_multi_vector(query_embeddings, doc_embeddings)
82print(scores)
🎞️ Lightweight Video Retrieval
ColQwen3 generalizes to short videos while learning from image-text retrieval task. This minimal example samples a clip with torchvision, encodes queries and frames, then pools frame embeddings with a per-dimension max before MaxSim scoring.
We recommand use of maximum 5120 visual tokens for video retrieval task for best performance.
1from pathlib import Path
2
3import torch
4from transformers import AutoModel, AutoProcessor
5
6MODEL_ID = "TomoroAI/tomoro-colqwen3-embed-4b"
7DTYPE = torch.bfloat16
8DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
9
10processor = AutoProcessor.from_pretrained(
11 MODEL_ID,
12 trust_remote_code=True,
13 max_num_visual_tokens=5120,
14)
15model = AutoModel.from_pretrained(
16 MODEL_ID,
17 dtype=DTYPE,
18 attn_implementation="flash_attention_2",
19 trust_remote_code=True,
20 device_map=DEVICE,
21).eval()
22
23queries = ["Retrieve the football video", "Find the basketball clip", "Find the swimming clip", "Find the wrestling clip"]
24videos = ["/root/sample_videos/football.mp4", "/root/sample_videos/basketball.mp4", "/root/sample_videos/swimming.mp4", "/root/sample_videos/wrestling.mp4"]
25
26
27def encode_queries(texts):
28 batch = processor.process_texts(texts=texts)
29 batch = {k: v.to(DEVICE) for k, v in batch.items()}
30 with torch.inference_mode():
31 out = model(**batch)
32 return out.embeddings.to(torch.bfloat16).cpu()
33
34def encode_videos(paths):
35 vids = [str(Path(p).expanduser()) for p in paths]
36 feats = processor(
37 videos=vids,
38 padding="longest",
39 return_tensors=None, # keep metadata as Python objects until we drop it
40 videos_kwargs={"return_metadata": True},
41 )
42 feats.pop("video_metadata", None) # drop metadata before forwarding to the model
43 feats = feats.convert_to_tensors(tensor_type="pt")
44 feats = {k: v.to(DEVICE) if isinstance(v, torch.Tensor) else v for k, v in feats.items()}
45 with torch.inference_mode():
46 out = model(**feats)
47 return out.embeddings.to(torch.bfloat16).cpu()
48
49q_emb = encode_queries(queries)
50v_emb = encode_videos(videos)
51scores = processor.score_multi_vector(q_emb, v_emb)
52print(scores)
⚖️ Strengths & Limitations
Strengths
- Performance: State of the art retrieval performance on ViDoRe V2 & V3 dataset with excellent performance on multimodal document retrieval.
- Complex Layouts: Excellent handling of chart-rich PDFs, domain-specific documents.
- End-to-end Retrieval: Capable of OCR-free retrieval on unseen multimodal documents without using an intermediate vision LLM to generate summary for retrieval.
- Retrieval Task Transfer: Inherited strong text retrieval performance from the merged vector of the Qwen3-Embedding-8B model.
- Multilingualism: Strong performance on non-English document inputs.
Limitations
- Video Support: The retrieval model generalizes to video retrieval on our preliminary findings, however it's not fine-tuned on large-scale video retrieval datasets, we plan to further improve this in the future.
- Storage Cost: Still larger than single‑vector baselines despite the smaller token dimension.
- Retrieval Instructions: The model currently is not fine-tuned with diverse system instructions similar to Qwen3-Embedding models, we intent to improve this with more synthetic dataset in the future.
License & Data
Distributed under Apache 2.0.
- Weights: Upstream Qwen checkpoints retain their community licenses; ensure compliance when mixing.
- Data: Training data includes ViDoRe/MTEB corpora and synthetic VisRAG assets.
Acknowledgement
We gratefully acknowledge the support of
Tomoro AI, a leading AI engineering firm dedicated to delivering high-quality enterprise solutions that accelerate complex R&D and business transformation. This work is directly applied to enhance Tomoro’s customized multimodal agentic RAG pipelines, empowering the autonomous agents to parse, reason over, and retrieve from large-scale enterprise
internal documentation. By bridging the gap between vision and language, this model supports Tomoro AI's mission to
accelerate the delivery of high-quality enterprise multimodal solutions and deploy robust, production-grade intelligence across high-stakes industries.
📚 Citation
If you use this model, please cite:
1@misc{huang2025beyond,
2 author = {Huang, Xin and Tan, Kye Min},
3 title = {Beyond Text: Unlocking True Multimodal, End-to-end RAG with Tomoro ColQwen3},
4 year = {2025},
5 url = {https://tomoro.ai/insights/beyond-text-unlocking-true-multimodal-end-to-end-rag-with-tomoro-colqwen3},
6 publisher = {Tomoro.ai}
7}