Views
No views yet

colpali-engine==0.3.14.
bfloat16 format, use low-rank adapters (LoRA)
with alpha=32 and r=32 on the transformer layers from the language model,
as well as the final randomly initialized projection layer, and use a paged_adamw_8bit optimizer.
We train on 2*NVIDIA A100 80GB GPUs setup with data parallelism, a learning rate of 5e-5 with linear decay with 2.5% warmup steps, and a batch size of 64.| model | BioMedicalLectures-french | BioMedicalLectures-spanish | BioMedicalLectures-english | BioMedicalLectures-german | EconomicsReports-french | EconomicsReports-spanish | EconomicsReports-english | EconomicsReports-german | ESGReports-french | ESGReports-spanish | ESGReports-english | ESGReports-german | ESGReportsHL |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| colqwen3-v0.1 | 55.32 | 56.35 | 58.87 | 51.73 | 40.77 | 41.38 | 57.22 | 44.38 | 50.51 | 47.12 | 51.34 | 48.08 | 55.75 |
| colqwen3-v0.2 | 57.40 | 58.67 | 62.37 | 56.45 | 50.18 | 52.90 | 63.24 | 53.58 | 52.97 | 50.89 | 50.81 | 52.61 | 52.87 |
| Model | ArxivQ | DocQ | InfoQ | TabF | TATQ | Shift | AI | Energy | Gov. | Health. | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|
Unstructured (text-only) | |||||||||||
| - BM25 | - | 34.1 | - | - | 44.0 | 59.6 | 90.4 | 78.3 | 78.8 | 82.6 | - |
| - BGE-M3 | - | 28.4 (↓5.7) | - | - | 36.1 (↓7.9) | 68.5 (↑8.9) | 88.4 (↓2.0) | 76.8 (↓1.5) | 77.7 (↓1.1) | 84.6 (↑2.0) | - |
Unstructured + OCR | |||||||||||
| - BM25 | 31.6 | 36.8 | 62.9 | 46.5 | 62.7 | 64.3 | 92.8 | 85.9 | 83.9 | 87.2 | 65.5 |
| - BGE-M3 | 31.4 (↓0.2) | 25.7 (↓11.1) | 60.1 (↓2.8) | 70.8 (↑24.3) | 50.5 (↓12.2) | 73.2 (↑8.9) | 90.2 (↓2.6) | 83.6 (↓2.3) | 84.9 (↑1.0) | 91.1 (↑3.9) | 66.1 (↑0.6) |
Unstructured + Captioning | |||||||||||
| - BM25 | 40.1 | 38.4 | 70.0 | 35.4 | 61.5 | 60.9 | 88.0 | 84.7 | 82.7 | 89.2 | 65.1 |
| - BGE-M3 | 35.7 (↓4.4) | 32.9 (↓5.4) | 71.9 (↑1.9) | 69.1 (↑33.7) | 43.8 (↓17.7) | 73.1 (↑12.2) | 88.8 (↑0.8) | 83.3 (↓1.4) | 80.4 (↓2.3) | 91.3 (↑2.1) | 67.0 (↑1.9) |
| Contrastive VLMs | |||||||||||
| Jina-CLIP | 25.4 | 11.9 | 35.5 | 20.2 | 3.3 | 3.8 | 15.2 | 19.7 | 21.4 | 20.8 | 17.7 |
| Nomic-vision | 17.1 | 10.7 | 30.1 | 16.3 | 2.7 | 1.1 | 12.9 | 10.9 | 11.4 | 15.7 | 12.9 |
| SigLIP (Vanilla) | 43.2 | 30.3 | 64.1 | 58.1 | 26.2 | 18.7 | 62.5 | 65.7 | 66.1 | 79.1 | 51.4 |
| SigLIP (Vanilla) | 43.2 | 30.3 | 64.1 | 58.1 | 26.2 | 18.7 | 62.5 | 65.7 | 66.1 | 79.1 | 51.4 |
| BiSigLIP (+fine-tuning) | 58.5 (↑15.3) | 32.9 (↑2.6) | 70.5 (↑6.4) | 62.7 (↑4.6) | 30.5 (↑4.3) | 26.5 (↑7.8) | 74.3 (↑11.8) | 73.7 (↑8.0) | 74.2 (↑8.1) | 82.3 (↑3.2) | 58.6 (↑7.2) |
| BiPali (+LLM) | 56.5 (↓2.0) | 30.0 (↓2.9) | 67.4 (↓3.1) | 76.9 (↑14.2) | 33.4 (↑2.9) | 43.7 (↑17.2) | 71.2 (↓3.1) | 61.9 (↓11.7) | 73.8 (↓0.4) | 73.6 (↓8.8) | 58.8 (↑0.2) |
| ColPali (+Late Inter.) | 79.1 (↑22.6) | 54.4 (↑24.5) | 81.8 (↑14.4) | 83.9 (↑7.0) | 65.8 (↑32.4) | 73.2 (↑29.5) | 96.2 (↑25.0) | 91.0 (↑29.1) | 92.7 (↑18.9) | 94.4 (↑20.8) | 81.3 (↑22.5) |
| Ours | |||||||||||
| Colqwen3-v0.1 (+Late Inter.) | 80.1 (↑1.0) | 55.8 (↑1.4) | 86.7 (↑5.9) | 82.1 (↓1.8) | 70.8 (↑5.0) | 75.9 (↑2.7) | 99.1 (↑2.9) | 95.6 (↑4.6) | 96.1 (↑3.4) | 96.8 (↑2.4) | 83.9 (↑2.6) |
| Colqwen3-v0.2 (+Late Inter.) | 85.7 (↑6.6) | 52.3 (↓2.1) | 86.2 (↑5.4) | 87.3 (↑3.4) | 75.8 (↑10.0) | 82.0 (↑9.8) | 99.1 (-) | 95.3 (↑4.3) | 93.5 (↑0.8) | 96.6 (↑2.2) | 85.4 (↑4.3) |
colpali-engine is installed from source or with a version superior to 0.3.4.
transformers version must be >= 4.57.1.(compatible with Qwen3-VL interface)pip install git+https://github.com/Mungeryang/colqwen31import torch
2from PIL import Image
3from transformers.utils.import_utils import is_flash_attn_2_available
4
5from colpali_engine.models import ColQwen3, ColQwen3Processor
6
7model = ColQwen3.from_pretrained(
8 "goodman2001/colqwen3-v0.1",
9 torch_dtype=torch.bfloat16,
10 device_map="cuda:0", # or "mps" if on Apple Silicon
11 attn_implementation="flash_attention_2" if is_flash_attn_2_available() else None,
12).eval()
13processor = ColQwen3Processor.from_pretrained("goodman2001/colqwen3-v0.1")
14
15# Your inputs
16images = [
17 Image.new("RGB", (128, 128), color="white"),
18 Image.new("RGB", (64, 32), color="black"),
19]
20queries = [
21 "Is attention really all you need?",
22 "What is the amount of bananas farmed in Salvador?",
23]
24
25# Process the inputs
26batch_images = processor.process_images(images).to(model.device)
27batch_queries = processor.process_queries(queries).to(model.device)
28
29# Forward pass
30with torch.no_grad():
31 image_embeddings = model(**batch_images)
32 query_embeddings = model(**batch_queries)
33
34scores = processor.score_multi_vector(query_embeddings, image_embeddings)apache2.0 license. The adapters attached to the model are under MIT license.[!WARNING] Thanks to the Colpali team and Qwen team for their excellent open-source works! I accomplished this work by standing on the shoulders of giants~

1@misc{faysse2024colpaliefficientdocumentretrieval,
2 title={ColPali: Efficient Document Retrieval with Vision Language Models},
3 author={Manuel Faysse and Hugues Sibille and Tony Wu and Bilel Omrani and Gautier Viaud and Céline Hudelot and Pierre Colombo},
4 year={2024},
5 eprint={2407.01449},
6 archivePrefix={arXiv},
7 primaryClass={cs.IR},
8 url={https://arxiv.org/abs/2407.01449},
9}